Skip to content

fix: center Modern UI panel title tabs in the 32px header - #331612

Merged
Lee Murray (mrleemurray) merged 6 commits into
microsoft:mainfrom
cipheraxat:fix/331013-panel-tab-padding
Aug 19, 2026
Merged

fix: center Modern UI panel title tabs in the 32px header#331612
Lee Murray (mrleemurray) merged 6 commits into
microsoft:mainfrom
cipheraxat:fix/331013-panel-tab-padding

Conversation

@cipheraxat

Copy link
Copy Markdown
Contributor

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-width to 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):

before after
editor fill vs title 4 / 4 / 4 4 / 4 / 4
panel indicator vs title 5 / 4 / 3 4 / 4 / 4
panel title border-top-width 1px (transparent) 0

Hover bounding boxes already used the same 24px fill/indicator as the active pill; they now also share the same outer insets.

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
Copilot AI balanced review requested due to automatic review settings August 19, 2026 07:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/vs/workbench/contrib/modernUI/browser/media/padding.css Outdated
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>
@mrleemurray

Copy link
Copy Markdown
Contributor

Akshat Anand (@cipheraxat) thanks for the PR! Can you review the Copilot feedback & resolve?

@cipheraxat

Copy link
Copy Markdown
Contributor Author

Copilot feedback addressed in 4008ee0 and 74225c2:

  1. Test assertion scope — trimmed the regression test from 7 assertions to the 3 properties this fix actually owns (titleBorderTopWidth, titleBorderTopStyle, actionItemBorderTop), removing layout values owned by other rules that made the test brittle.
  2. CSS reset robustness — switched border-top-width: 0border-top: none so a future width re-introduction cannot silently restore the off-center gutter while leaving a stale solid style behind.

Both review threads replied; marking as resolved.

@mrleemurray Lee Murray (mrleemurray) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@cipheraxat

Copy link
Copy Markdown
Contributor Author
@mrleemurray
Lee Murray (mrleemurray) merged commit c6f9c7c into microsoft:main Aug 19, 2026
27 checks passed
@vs-code-engineering vs-code-engineering Bot added this to the 1.135.0 milestone Aug 19, 2026
Dileep Yavanmandha (dileepyavan) pushed a commit that referenced this pull request Aug 19, 2026
fix: center Modern UI panel title tabs in the 32px header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants