Skip to content

fix(web): family tabs keep the lead on the row and fit short titles - #1018

Merged
badcuban merged 1 commit into
mainfrom
fix/family-tabs-overflow
Nov 20, 2026
Merged

badcuban merged 1 commit into
mainfrom
fix/family-tabs-overflow

Conversation

@badcuban

Copy link
Copy Markdown
Collaborator

The family tab row moved tabs behind "+N" by counting every tab at the 96px floor, so short titles like "UI" or "QA" went into the menu while the row still had room. On a narrow row, opening a thread could also push the parent's (lead's) tab into "+N".

Fit. fitFamilyTabs now always keeps the parent's tab and the open thread's tab on the row, and charges each tab its own width when that is under the 96px floor. Long titles still shrink to the floor before tabs move behind "+N", and the lead's tab never shrinks. Gaps between tabs count too.

Measuring. The row keeps hidden copies of every tab and of the "+N" button (aria-hidden, inert), drawn with the same markup and box classes as the real ones, and reads their widths. A ResizeObserver on the copies and the row re-fits when something changes: a larger browser font, a theme's font, or a font that loads late. An earlier version estimated widths with hard-coded sizes. Review found it broke with a larger root font, a fixed 44px "+N" width, rounding slack, and theme font switches, so it measures the copies instead.

Tests: unit tests for the fit (short titles cost their own width, gaps count, parent and open tab always kept). A browser test with nine short-titled tabs checks they all fit with no "+N" and no label cut, then switches to a 24px root font and checks that what stays on the row is whole and inside it.

The tab row moved tabs behind "+N" by counting every tab at the 96px
floor, so short titles like "UI" or "QA" went into the menu while the row
had room. On a narrow row, opening a thread could also push the parent's
tab into "+N".

The fit now keeps the parent's tab and the open thread's tab on the row,
and charges each tab its own width when that is under the floor. The row
reads those widths from hidden copies of its tabs and of "+N", drawn with
the same markup and classes, and re-fits when a copy resizes, so a larger
browser font, a theme font or a late font load stay correct.
@vercel

vercel Bot commented Nov 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
threadlines Skipped Skipped Nov 20, 2026 5:40pm UTC

Request Review

@badcuban
badcuban added this pull request to the merge queue Nov 20, 2026
Merged via the queue into main with commit 88fdec7 Nov 20, 2026
23 checks passed
@badcuban
badcuban deleted the fix/family-tabs-overflow branch November 20, 2026 17:52

This branch was previously deployed

1 inactive deployment
Preview — 80e71e54 Deployed Nov 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant