Skip to content

Conversation

@ohah
Copy link
Contributor

@ohah ohah commented Oct 24, 2025

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

스크린샷 2025-10-24 오후 9 10 19 스크린샷 2025-10-24 오후 9 13 10

Copilot AI review requested due to automatic review settings October 24, 2025 12:14
Copy link
Contributor

Copilot AI left a 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

@vs-code-engineering
Copy link

vs-code-engineering bot commented Oct 24, 2025

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/contrib/files/browser/media/explorerviewlet.css


.explorer-folders-view .monaco-list-row[aria-expanded="false"] .explorer-item.highlight-badge .monaco-count-badge {
display: inline-block;
transform: translateY(-1.5px);
Copy link
Contributor

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?

Copy link
Contributor Author

@ohah ohah Oct 24, 2025

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.

스크린샷 2025-10-25 오전 1 07 46 스크린샷 2025-10-25 오전 1 08 01 스크린샷 2025-10-25 오전 1 17 08

@benibenj benibenj enabled auto-merge (squash) October 27, 2025 09:09
@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 27, 2025

.explorer-folders-view .monaco-list-row[aria-expanded="false"] .explorer-item.highlight-badge .monaco-count-badge {
display: inline-block;
transform: translateY(-1.5px);
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Number-of-files-found Badge is not at the center of the list item vertically

3 participants