-
Couldn't load subscription status.
- Fork 35.8k
fix: file-found Badge vertical #273098
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
base: main
Are you sure you want to change the base?
fix: file-found Badge vertical #273098
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a vertical alignment issue with the file-found badge in the Explorer view by applying a small upward translation. The fix addresses issue #235159 while being careful not to reintroduce regression #273052.
Key Changes:
- Applied a specific vertical translation to the count badge when displayed in collapsed folder rows in the Explorer view
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
|
|
||
| .explorer-folders-view .monaco-list-row[aria-expanded="false"] .explorer-item.highlight-badge .monaco-count-badge { | ||
| display: inline-block; | ||
| transform: translateY(-1.5px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain the math behind this? How do you get to 1.5px?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original value was -2px because the .monaco-tl-contents element has a height of 22px and a line height of 22px.
However, since .monaco-count-badge has a line-height of 11px, it was slightly misaligned (0.5px too high), so I adjusted the value to -1.5px instead.
I think using flex would be the cleanest approach, but it might affect properties like text-overflow: ellipsis or other layout behavior, so I only moved this specific part.
|
|
||
| .explorer-folders-view .monaco-list-row[aria-expanded="false"] .explorer-item.highlight-badge .monaco-count-badge { | ||
| display: inline-block; | ||
| transform: translateY(-1.5px); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@benibenj using the .5 here is likely to cause blurriness on low DPI displays. I'm unsure whether the use of transform here will create a new render layer and the overhead associated with that.
Fixed #235159
This caused a regression in #273052, so I've fixed the specific line to avoid side effects.
Fixes #235159
Addresses #273052
FIXED ScreenShot