Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SEU Colors Feature #1878

Conversation

steph-beneschan-256
Copy link
Contributor

Changes

Update SEU Colors Feature

  • Updated SEUColorProvider.ts to address issue with overlapping characters (Show SEU Colors feature is overlaying characters  #1490) (the code now calculates ranges based on character count rather than byte count)

  • Updated the SEUColorProvider.ts code that looks for color code sequences in the source member to use a Map-based function rather than individually check against every possible color code for each byte (also updated SEUColors.ts to provide the aforementioned function)

  • When a color code is found, the styling now only applies until another color code is found (or until the line ends)

  • Added a function to SEUColors.ts that uses a Map to check whether a given byte sequence matches any of the color sequences

  • When reading bytes from a source member, SEUColorProvider.ts now uses the aforementioned Map-based function on each byte rather than individually checking it against every possible color sequence, to save time

Checklist

  • have tested my change
  • updated relevant documentation
  • Remove any/all console.logs I added
  • eslint is not complaining
  • have added myself to the contributors' list in CONTRIBUTING.md

* Updated SEUColorProvider to address issue with overlapping characters (SEUColorProvider now calculates Ranges based on character count rather than byte count)
* Updated the SEUColorProvider code that looks for color code sequences in the source member to use a Map-based function rather than individually check against every possible color code for each byte (also updated SEUColors to provide the aforementioned function)
* When a color code is found, the styling now only applies until another color code is found (or until the line ends)

* Added a function to SEUColors.ts that uses a Map to check whether a given byte sequence matches any of the color sequences
* When reading bytes from a source member, SEUColorProvider now uses the aforementioned Map-based function on each byte rather than individually checking it against every possible color sequence, to save time
* Addressed issue with overlapping characters
@worksofliam
Copy link
Contributor

@steph-beneschan-256 This PR is awesome. Any chance you can share the raw hex of a member that you tested this with? I'd like to be able to test this but I have no test data.

@steph-beneschan-256
Copy link
Contributor Author

Hello @worksofliam ! Here is the hex dump from the member that I used: COLORTEST.txt

@worksofliam worksofliam linked an issue Feb 28, 2024 that may be closed by this pull request
@worksofliam worksofliam added this to the 2.9.0 milestone Feb 28, 2024
@worksofliam worksofliam self-requested a review March 5, 2024 00:34
@worksofliam
Copy link
Contributor

@steph-beneschan-256 What is the record length for that source file you used? I am going to write a test case to create that member with an example.

@worksofliam
Copy link
Contributor

@steph-beneschan-256 Is it possible you could get me a hex dump to that member using SQL instead?

select hex(srcdta) from lib.sourcefile

You may have to create an alias to the member to read it with SQL.

@worksofliam worksofliam modified the milestones: 2.9.0, 3.0.0 Mar 26, 2024
@worksofliam worksofliam added the ready Ready for review label Apr 2, 2024
@worksofliam
Copy link
Contributor

@steph-beneschan-256 Please see my above comment, thanks!

@worksofliam worksofliam added stale Inactive and removed ready Ready for review labels May 15, 2024
@worksofliam
Copy link
Contributor

We are removing SEU colour support in 3.0.0, so I will close this PR. Thanks for you work, nonetheless!

https://github.com/orgs/codefori/discussions/2057

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Inactive
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show SEU Colors feature is overlaying characters
2 participants