Skip to content

editor: honor fixed width limits for Connected tabs - #348301

Merged
Cherry Wang (chryw) merged 2 commits into
mainfrom
dev/cherwan/agents/local-css-fix-vscode-340848
Nov 16, 2026
Merged

Cherry Wang (chryw) merged 2 commits into
mainfrom
dev/cherwan/agents/local-css-fix-vscode-340848

Conversation

@chryw

@chryw Cherry Wang (chryw) commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Connected editor tabs in fixed mode can start scrolling before they need to. Their extra 80px minimum prevents tabs from shrinking within the existing fixed-width range, and even overrides a configured maximum below 80px.

Remove that extra floor and reuse the shared fixed-sizing policy. Right-side actions inherit the shared rule; a scoped override prevents the legacy left-action minimum from taking precedence. This introduces no new sizing default. Compact/shrink sticky tabs use their own sizing rules rather than regular-tab bounds. Close visibility, action-space reservation, and fit/shrink behavior are preserved.

A crowded row with ordinary filenames

Eight files, a 560px editor group, and the default fixed-mode bounds of 50-160px. File icons and action-space reservation are enabled, Close is on the right, and the editor-group toolbar is hidden.

Before, tabs stop shrinking at 80px and the last file is offscreen. After, they shrink to about 69px and all eight fit without horizontal scrolling. Labels truncate more as tabs narrow; that is the intended fixed-sizing tradeoff, not a filename-readability or Close-visibility fix.

Headless production-component fixtures on Windows, using the pre-fix stylesheet for Before and the PR stylesheet for After. Content, theme, group width, selection, and scroll position are matched.

Dark 2026
Before - the 80px floor causes premature overflow
Before: eight ordinary file tabs in a 560px group stop shrinking at 80px, leaving README.md offscreen
After - tabs follow the existing fixed-width range and all eight fit
After: the same eight file tabs shrink to about 69px and fit, with Close contained in the active router.ts tab

Wider groups stay unchanged

With the same files in a 960px group, the tabs look unchanged. The fix is about respecting width constraints when they matter, not making every tab smaller.

Unchanged wide-row control in Dark 2026: ordinary filenames and Close render identically before and after

A separate check with a configured 70px maximum also renders 70px tabs instead of 80px, including with ordinary filenames and file icons.

Try it

  1. Enable Modern UI with Connected tabs, and open eight files as ordinary, non-sticky tabs.
  2. Set workbench.editor.tabSizing to fixed, with its minimum and maximum at 50 and 160.
  3. Narrow the editor group to roughly 560px. Tabs should shrink below 80px before the row starts scrolling. Continue narrowing: scrolling is still expected once the configured minimum is reached.
  4. With room available, set workbench.editor.tabSizingFixedMaxWidth to 70. Tabs should stop at 70px, not 80px.
  5. Repeat with left-side actions and with action-space reservation disabled. Close must stay inside its tab; disabling reservation should still let the visible action consume filename space without growing the tab. fit and shrink should retain their existing behavior; compact/shrink sticky tabs should retain their dedicated widths.

Checked default dark/light and high contrast, both action locations, and label/Close separation. Rendered regressions also cover configured bounds, sticky widths, action-space reservation, and the other sizing modes.

Related sizing test coverage: #335914.

Cherry Wang (chryw) and others added 2 commits November 13, 2026 18:28
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep ordinary trailing-action fixed tabs on the shared width rules and override only the legacy leading-action floor. Add focused min/max fixtures and pinned-width regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 14, 2026 02:49

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.

🟢 Approval recommended

No active review issues were identified for the Connected-tab fixed-width sizing changes.

No open issues 🎉

What changed in this PR

Makes Connected editor tabs honor the existing fixed-width settings instead of enforcing an 80px minimum, while preserving dedicated compact/shrink pinned-tab widths.

Changes:

  • Uses shared fixed-width rules, retaining a targeted override for left-side actions.
  • Adds sizing regressions covering width limits, action bounds, pinned tabs, and unchanged fit/shrink behavior.
  • Adds two component fixtures for narrow maximum and minimum widths.
File Description
src/​vs/​workbench/​test/​browser/​parts/​editor/​multiEditorTabsControl.test.ts Adds rendered sizing and compatibility regressions.
src/​vs/​workbench/​test/​browser/​componentFixtures/​editor/​tabs.fixture.ts Adds Connected-tab fixtures for both fixed-width limits.
src/​vs/​workbench/​contrib/​modernUI/​browser/​media/​connectedEditorTabs.css Replaces the broad 80px minimum with a targeted fixed-sizing override.

Review effort: Balanced

@chryw
Cherry Wang (chryw) marked this pull request as ready for review November 16, 2026 03:31
@chryw
Cherry Wang (chryw) added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit 32f1047 Nov 16, 2026
39 checks passed
@chryw
Cherry Wang (chryw) deleted the dev/cherwan/agents/local-css-fix-vscode-340848 branch November 16, 2026 05:40
@vs-code-engineering vs-code-engineering Bot added this to the 1.148.0 milestone Nov 16, 2026
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.

4 participants