Skip to content

feat(tabs): uniform responsive tab widths (180px cap, equal shrink) - #596

Merged
danshapiro merged 1 commit into
mainfrom
feat/uniform-tab-width
Aug 1, 2026
Merged

feat(tabs): uniform responsive tab widths (180px cap, equal shrink)#596
danshapiro merged 1 commit into
mainfrom
feat/uniform-tab-width

Conversation

@danshapiro

Copy link
Copy Markdown
Owner

What changed

Tabs in the tab bar now have a uniform, responsive width instead of content-driven sizing with a hard 5rem title cap:

  • TabBar.tsx: each sortable tab wrapper gets w-[180px] min-w-[100px] shrink — tabs render at 180px when space allows and shrink equally down to a 100px floor before the strip starts scrolling. Applies in both single-row and multirow modes. The DragOverlay preview wrapper gets w-[180px] to match.
  • TabItem.tsx: tab root is w-full min-w-0; the title span changed from max-w-[5rem] to flex-1 min-w-0 truncate, pinning the close button to the right edge; icons, status dot, and close button are shrink-0; the rename input changed from w-32 to flex-1 min-w-0.

Why

Previously tab widths varied with content and titles were capped at 5rem, producing ragged, inconsistent tabs. Uniform widths with equal shrink give a predictable, browser-like tab strip.

How verified

121 tests pass across the TabItem, TabBar, overflow, multirow, a11y, and mobile suites:

npx vitest run --config config/vitest/vitest.config.ts \
  test/unit/client/components/TabItem.test.tsx \
  test/unit/client/components/TabBar*.test.tsx ...

The TabItem title-width-class test was updated to assert the new flexible classes (flex-1 min-w-0 truncate) instead of max-w-[5rem].

Breaking changes

None — visual/layout change only.

Generated with Amplifier

Co-Authored-By: Amplifier 240397093+microsoft-amplifier@users.noreply.github.com

Give every tab in the tab bar a uniform, responsive width instead of
content-driven sizing with a hard 5rem title cap:

- TabBar: each sortable tab wrapper gets w-[180px] min-w-[100px] shrink,
  so tabs are 180px when space allows and shrink equally to a 100px
  floor before the strip scrolls (single-row and multirow modes). The
  DragOverlay preview wrapper gets w-[180px] to match.
- TabItem: tab root is w-full min-w-0; title span uses flex-1 min-w-0
  truncate (close button pinned to the right edge); icons, status dot,
  and close button are shrink-0; rename input uses flex-1 min-w-0.
- Tests: title-width-class test asserts the new flexible classes.

Verified: 121 tests pass across TabItem, TabBar, overflow, multirow,
a11y, and mobile suites.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@danshapiro
danshapiro merged commit c7badcb into main Aug 1, 2026
3 checks passed
@danshapiro
danshapiro deleted the feat/uniform-tab-width branch August 1, 2026 06:47
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.

1 participant