fix: center Modern UI panel title tabs in the 32px header - #331612
fix: center Modern UI panel title tabs in the 32px header#331612Lee Murray (mrleemurray) merged 6 commits into
Conversation
Classic UI leaves a 1px top border on the bottom-panel title. Floating panels already make that border transparent, but the width still takes layout space and shifts the 32px pills off-center (5px top / 3px bottom instead of the editor tab bar's uniform 4px gutter). Fixes microsoft#331013
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates Modern UI styling so bottom panel title tabs aren’t visually offset by the classic 1px top border, and adds a regression test to ensure 32px tab “pills” remain vertically centered.
Changes:
- Add Modern UI CSS override to remove the bottom panel title’s classic top border width.
- Add a browser test asserting computed styles for panel title tabs in the bottom panel configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/modernUI/test/browser/modernUI.contribution.test.ts | Adds a regression test validating computed styles (border/padding/heights) for bottom panel title tabs. |
| src/vs/workbench/contrib/modernUI/browser/media/padding.css | Removes the classic 1px top border width on bottom panel composite titles in Modern UI to keep 32px pills centered. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Reset the whole border-top shorthand (none) instead of only its width so a future width re-introduction cannot silently restore the off-center gutter. Trim the regression test to assert only the properties this fix owns (border width/style and the pill gutter) rather than layout values owned by other rules. Co-authored-by: Copilot <198982749+copilot@users.noreply.github.com>
|
Akshat Anand (@cipheraxat) thanks for the PR! Can you review the Copilot feedback & resolve? |
|
Copilot feedback addressed in 4008ee0 and 74225c2:
Both review threads replied; marking as resolved. |
Lee Murray (mrleemurray)
left a comment
There was a problem hiding this comment.
Thank you!
|
Thanks Lee Murray (@mrleemurray) :) |
fix: center Modern UI panel title tabs in the 32px header
Fixes #331013
Modern UI editor tabs sit in a uniform 4px gutter (24px pill in a 32px title). Bottom-panel title tabs did not: classic UI still draws a 1px top border on
.part.panel.bottom .composite.title(panelpart.css). Floating panels already make that border transparent, but the width was still consuming a layout pixel, so the 32px pills sat off-center — 5px above the pill and 3px below it, vs 4px on the left.Dropping
border-top-widthto 0 when Modern UI is on restores the same 4px gutter as the editor tab bar.Measured against a 32px title (live Code OSS, Modern UI + floating panels):
border-top-widthHover bounding boxes already used the same 24px fill/indicator as the active pill; they now also share the same outer insets.