jwt-ui icon indicating copy to clipboard operation
jwt-ui copied to clipboard

Updated ratatui to avoid mismatch (fixes #35)

Open tolik518 opened this issue 1 year ago • 4 comments

This pr should fix #35.

The compile error in #35 is thrown due to a ratatui version mismatch. Some code had to be adjusted for the new version, but these were only minor changes

Also Im think its good to keep the libraries up to date :)

tolik518 avatar May 06 '24 07:05 tolik518

Additionally, I had to swap the multibyte checkmark icon with a single-byte checkmark icon since it was breaking tests. Also, it could break the UI since it's rendered differently on different systems

Edit: even if the multibyte X was not breaking tests, it still might break the UI, so I swapped it also

tolik518 avatar May 06 '24 07:05 tolik518

Thank you. I'll check and merge

deepu105 avatar May 20 '24 07:05 deepu105

Pull Request Test Coverage Report for Build 9162133625

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 7 of 8 (87.5%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.3%) to 67.226%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/ui/decoder.rs 5 6 83.33%
<!-- Total: 7 8
Files with Coverage Reduction New Missed Lines %
src/app/mod.rs 1 65.33%
<!-- Total: 1
Totals Coverage Status
Change from base Build 7646784226: 0.3%
Covered Lines: 1513
Relevant Lines: 1920

💛 - Coveralls

coveralls avatar May 20 '24 07:05 coveralls

@deepu105 I'm not sure why clippy is failing as I haven't touched AppResource

Edit: Since clippy is failing not as a result of my changes, I added an attribute which makes clippy skip that one particular trait. It looks like AppResource should be ultimately removed though. Could you trigger the pipeline once again?

tolik518 avatar May 20 '24 16:05 tolik518

Thank you @tolik518 , Any reason you changed the icons for tick and cross? now they are not that obvious

deepu105 avatar May 23 '24 16:05 deepu105

Hey @deepu105, yes, they were multi byte characters, which means that they get rendered differently depending on which font, shell and or terminal you use.
Futhermore a test was failing for me with the old icons which I could have fixed with some hacks, but that would make the tests more obscure and I don't think that would have been good practice.

Edit: I guess the tests weren't failing before that because ratatui might have changed some behavior for multi byte characters?

tolik518 avatar May 23 '24 16:05 tolik518

Ya seems like something changed at ratatui. I'll keep the ones you proposed for now

deepu105 avatar May 23 '24 16:05 deepu105