Repository navigation
fix(fancy): replace width-1 icons for start and trace to fix timestamp alignment - #442
Closed
marceli1404 wants to merge 1 commit into
Closed
marceli1404 wants to merge 1 commit into
marceli1404 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe fancy reporter changes the Unicode icons for ChangesFancy reporter icon updates
Estimated code review effort: 1 (Trivial) | ~2 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #394
Root Cause
The fancy reporter calculates timestamp alignment using \stringWidth(left)\ where \left\ includes the type icon. All type icons have a \string-width\ of 2:
Because \start\ and \ race\ icons have \string-width\ 1 while every other type has 2, the \space\ calculation in \ormatLogObj\ gives them one extra space — shifting their timestamp one character to the right.
Fix
Replace the two outlier icons with ones that have \string-width\ 2:
Summary by CodeRabbit