Repository navigation
fix(Toolbar, OverflowList): a start lane's own OverflowList folds beside the end lane - #12238
Conversation
…ide the end lane A horizontal two-slot Toolbar sized its start lane from its content, and its automatic minimum counted an OverflowList's unfolded items. The list then never saw a narrower width, so it never folded, and the end lane was pushed past the toolbar's edge. When the start lane holds an OverflowList as its own child (:has(> .astryx-overflow-list)), it takes the width the end lane leaves (flex 1 1 0%) and drops its automatic minimum, so the list folds to fit. A lane whose list sits deeper, such as the table filter template's, keeps its layout. A single-row OverflowList publishes a minimum width of its folded set, measured from sub-pixel widths and rounded up, and never wider than its items, so a squeezed row keeps its trigger whole and a list with room is unchanged. Fixes #8804. Supersedes #11996. Co-authored-by: quocluongg <[email protected]>
In a single flex row a folded list is as wide as its folded items, so its own width never showed room returning, and it stayed folded after the row widened. A single-row list in such a row now adds the row's free width (the row's content width less its in-flow children and gaps) to its own, and also observes the row, so a widening row lets it unfold. The browser spec measures lanes from their own children, takes the frame's edge as the limit (edge compensation reaches into the toolbar's padding), handles a toolbar with one lane, and adds a widen-after-fold case. Co-authored-by: quocluongg <[email protected]>
A start-only toolbar's lane is flex 1 1 0% on main too, so the spec now checks the template's clauses, all shown at desktop width, instead of the lane's basis. Co-authored-by: quocluongg <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 9466a54 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| OverflowList · Storybook | 12.6 kB (+1.4 kB) · 3.7 kB CSS (+56 B) | 262 (+22) | ✓ · ✓ · ✓ |
| Tokenizer | 107.2 kB (+869 B) · 20.5 kB CSS (+27 B) | — | — · — · — |
| PowerSearch | 311.9 kB (+859 B) · 25.8 kB CSS (+27 B) | — | — · — · — |
96 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TableSelectionToolbar | 77.2 kB (+115 B) · 14.3 kB CSS (+64 B) | — | — · — · — |
| Toolbar · Storybook | 47.6 kB (+65 B) · 8.3 kB CSS (+72 B) | 360 (+15) | ✓ · ✓ · — |
| AlertDialog | 130.3 kB (+83 B) · 15.6 kB CSS (0) | — | — · — · — |
| TopNavHeading | 83.8 kB (+66 B) · 12.1 kB CSS (0) | — | — · — · — |
| TopNavMenu | 83.3 kB (+64 B) · 12.1 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 78.0 kB (+62 B) · 12.7 kB CSS (0) | — | — · — · — |
| SideNavHeading | 84.2 kB (+61 B) · 12.2 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 104.8 kB (+61 B) · 19.3 kB CSS (0) | — | — · — · — |
| TableCell | 105.0 kB (+60 B) · 19.5 kB CSS (0) | — | — · — · — |
| IconButton | 66.7 kB (+59 B) · 10.8 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 19.0 kB (+59 B) · 4.3 kB CSS (0) | — | — · — · — |
| Thumbnail | 71.2 kB (+59 B) · 12.4 kB CSS (0) | — | — · — · — |
| ButtonGroup | 44.5 kB (+58 B) · 3.7 kB CSS (0) | — | — · — · — |
| DateRangeInput | 101.3 kB (+57 B) · 13.4 kB CSS (0) | — | — · — · — |
| Banner | 68.8 kB (+56 B) · 11.4 kB CSS (0) | — | — · — · — |
| ChatSendButton | 67.1 kB (+56 B) · 10.9 kB CSS (0) | — | — · — · — |
| DrawerHeader | 70.0 kB (+56 B) · 14.0 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 41.7 kB (+56 B) · 3.7 kB CSS (0) | — | — · — · — |
| Toast | 106.3 kB (+55 B) · 11.1 kB CSS (0) | — | — · — · — |
| Calendar | 77.9 kB (+54 B) · 11.5 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 83.9 kB (+54 B) · 12.2 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 83.9 kB (+54 B) · 12.2 kB CSS (0) | — | — · — · — |
| Carousel | 76.8 kB (+53 B) · 11.8 kB CSS (0) | — | — · — · — |
| DialogHeader | 69.8 kB (+53 B) · 12.5 kB CSS (0) | — | — · — · — |
| InputGroup | 61.7 kB (+53 B) · 7.9 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 67.0 kB (+51 B) · 10.8 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 98.4 kB (+49 B) · 13.4 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 67.3 kB (+49 B) · 10.9 kB CSS (0) | — | — · — · — |
| Markdown | 205.7 kB (+49 B) · 22.4 kB CSS (0) | — | — · — · — |
| Popover | 100.7 kB (+49 B) · 15.2 kB CSS (0) | — | — · — · — |
| Stepper | 68.5 kB (+49 B) · 11.0 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 80.0 kB (+48 B) · 11.8 kB CSS (0) | — | — · — · — |
| Button | 66.7 kB (+48 B) · 10.8 kB CSS (0) | — | — · — · — |
| MobileNav | 78.1 kB (+48 B) · 11.5 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 67.6 kB (+48 B) · 10.9 kB CSS (0) | — | — · — · — |
| TextArea | 93.0 kB (+47 B) · 9.4 kB CSS (0) | — | — · — · — |
| ToggleButton | 94.1 kB (+47 B) · 11.0 kB CSS (0) | — | — · — · — |
| DropdownMenu | 109.2 kB (+46 B) · 19.1 kB CSS (0) | — | — · — · — |
| Field | 60.1 kB (+46 B) · 7.3 kB CSS (0) | — | — · — · — |
| Lightbox | 150.3 kB (+46 B) · 12.0 kB CSS (0) | — | — · — · — |
| MultiSelector | 103.9 kB (+46 B) · 18.1 kB CSS (0) | — | — · — · — |
| RadioListItem | 76.8 kB (+46 B) · 10.8 kB CSS (0) | — | — · — · — |
| Switch | 110.2 kB (+46 B) · 10.1 kB CSS (0) | — | — · — · — |
| FileInput | 75.7 kB (+45 B) · 11.8 kB CSS (0) | — | — · — · — |
| MoreMenu | 109.5 kB (+45 B) · 19.1 kB CSS (0) | — | — · — · — |
| Pagination | 148.1 kB (+45 B) · 19.3 kB CSS (0) | — | — · — · — |
| CodeBlock | 82.2 kB (+44 B) · 12.2 kB CSS (0) | — | — · — · — |
| RadioList | 61.4 kB (+44 B) · 7.4 kB CSS (0) | — | — · — · — |
| Selector | 115.2 kB (+44 B) · 18.9 kB CSS (0) | — | — · — · — |
| Typeahead | 89.6 kB (+44 B) · 13.5 kB CSS (0) | — | — · — · — |
| ChatLayout | 90.4 kB (+43 B) · 11.4 kB CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 67.3 kB (+43 B) · 11.0 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 80.9 kB (+43 B) · 12.2 kB CSS (0) | — | — · — · — |
| ContextMenu | 103.8 kB (+43 B) · 19.0 kB CSS (0) | — | — · — · — |
| Slider | 115.4 kB (+43 B) · 8.9 kB CSS (0) | — | — · — · — |
| SideNavItem | 78.6 kB (+42 B) · 12.0 kB CSS (0) | — | — · — · — |
| Table | 122.0 kB (+41 B) · 20.1 kB CSS (0) | — | — · — · — |
| TopNav | 79.8 kB (+40 B) · 11.8 kB CSS (0) | — | — · — · — |
| ChatComposer | 86.3 kB (+39 B) · 13.0 kB CSS (0) | — | — · — · — |
| InfoTip | 51.0 kB (+39 B) · 5.4 kB CSS (0) | — | — · — · — |
| CheckboxList | 73.8 kB (+38 B) · 7.8 kB CSS (0) | — | — · — · — |
| ComplexSelector | 79.2 kB (+38 B) · 12.7 kB CSS (0) | — | — · — · — |
| NumberInput | 104.5 kB (+38 B) · 12.3 kB CSS (0) | — | — · — · — |
| TabMenu | 80.5 kB (+38 B) · 12.0 kB CSS (0) | — | — · — · — |
| CheckboxInput | 70.1 kB (+37 B) · 10.3 kB CSS (0) | — | — · — · — |
| DateTimeInput | 227.2 kB (+37 B) · 19.8 kB CSS (0) | — | — · — · — |
| ListItem | 80.1 kB (+37 B) · 12.2 kB CSS (0) | — | — · — · — |
| DateInput | 203.7 kB (+35 B) · 18.1 kB CSS (0) | — | — · — · — |
| TextInput | 99.4 kB (+35 B) · 12.0 kB CSS (0) | — | — · — · — |
| AppShell | 99.6 kB (+34 B) · 14.6 kB CSS (0) | — | — · — · — |
| FieldLabel | 56.0 kB (+33 B) · 5.8 kB CSS (0) | — | — · — · — |
| TimeInput | 178.4 kB (+31 B) · 17.0 kB CSS (0) | — | — · — · — |
| SideNav | 122.9 kB (+21 B) · 12.2 kB CSS (0) | — | — · — · — |
| Timestamp | 30.8 kB (0) · 11.1 kB CSS (0) | — | — · — · — |
| SegmentedControl | 102.6 kB (−1 B) · 7.0 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 123.1 kB (new) · 773 B CSS (new) | — | — · — · — |
| lab/ChatReactionBar | 124.3 kB (new) · 1.1 kB CSS (new) | — | — · — · — |
| lab/CommentComposer | 181.0 kB (new) · 1.9 kB CSS (new) | — | — · — · — |
| lab/Comments | 381.0 kB (new) · 2.5 kB CSS (new) | — | — · — · — |
| lab/CommentThread | 374.0 kB (new) · 2.4 kB CSS (new) | — | — · — · — |
| lab/DialogHeroHeader | 91.0 kB (new) · 372 B CSS (new) | — | — · — · — |
| lab/DiffViewer | 94.9 kB (new) · 2.1 kB CSS (new) | — | — · — · — |
| lab/EmojiPicker | 119.1 kB (new) · 751 B CSS (new) | — | — · — · — |
| lab/ListInput | 95.7 kB (new) · 922 B CSS (new) | — | — · — · — |
| lab/PageControl | 78.5 kB (new) · 709 B CSS (new) | — | — · — · — |
| lab/Schedule | 116.5 kB (new) · 3.9 kB CSS (new) | — | — · — · — |
| lab/SelectableCardGroup | 69.6 kB (new) · 162 B CSS (new) | — | — · — · — |
| lab/TabBar | 84.2 kB (new) · 1.8 kB CSS (new) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (new) · 1.8 kB CSS (new) | — | — · — · — |
| lab/TabBarMoreList | 102.9 kB (new) · 1.8 kB CSS (new) | — | — · — · — |
| lab/TourStep | 95.5 kB (new) · 691 B CSS (new) | — | — · — · — |
| lab/TransferList | 137.0 kB (new) · 1.2 kB CSS (new) | — | — · — · — |
| lab/TransferListSelector | 145.9 kB (new) · 1.4 kB CSS (new) | — | — · — · — |
| richtext/RichTextEditor | 308.6 kB (new) · 2.7 kB CSS (new) | — | — · — · — |
| richtext/RichTextEditorToolbar | 309.9 kB (new) · 454 B CSS (new) | — | — · — · — |
| richtext/RichTextView | 285.9 kB (new) · 2.4 kB CSS (new) | — | — · — · — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: unknown (base surface unavailable): richtext, theme-butter, theme-chocolate, theme-gothic, theme-matcha, theme-neutral, theme-stone, theme-y2k
Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: the Toolbar lane fix works for one list, but the new flex-row free-width measurement breaks rows that hold two lists.
- Every single-row
OverflowListin a flex row adds the row's whole free width to its own (useOverflow.ts:566-569), so two lists in one row, including two lists as a Toolbar start lane's own children, flicker every frame after a resize between folded and clipped, with items cut off and no "+N" trigger half the time; share the free width among the row's folded lists and add a browser test with two lists in one row.
Two smaller notes: public useOverflow now returns an extra inlineBounds key at runtime (remove it where remeasure is removed), and two new comments run past the comment style's sentence length (see the inline comments). The single-list case is solid: in the overflow-actions story the actions fold beside Clear from 400 px down to 160 px and unfold again, where the base pushes Clear out of the toolbar.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: an OverflowList that is a horizontal Toolbar start lane's own child folds beside the end lane instead of pushing it out. Verified in the overflow-actions story at 400 to 160 px (base: Clear leaves the frame).
- Claim: the actions unfold again when the row widens. Verified for one list (all six return at 900 px).
- Claim: a single-row OverflowList never shrinks below its folded width and is never wider than its items. Verified (
OverflowList.tsx:418-422). - Claim: a squeezed row keeps its trigger whole. False with two lists in one row (see the blocking finding).
- Claim: the fix covers the reported selection-toolbar case. Verified:
TableSelectionToolbarpassesstartContenttoToolbarunchanged. - Claim: a deeper-nested list and the table filter template keep their layout. Verified (nested lane basis stays
auto; template shows 3 of 3 clauses, identical frames). - Claim: no new public prop or data attribute. Verified (no API surface change).
- Claim:
useOverflow's public return is unchanged. True for its type; at runtime it gains aninlineBoundskey. - Claim: the Toolbar, OverflowList and useOverflow unit suites pass. Verified.
- File
.changeset/toolbar-start-lane-overflow-folds.md: the trigger-whole sentence does not hold for two lists in one row. - File
apps/storybook/stories/OverflowList.stories.tsx: clear. - File
apps/storybook/stories/Toolbar.stories.tsx: clear. - File
packages/core/src/OverflowList/OverflowList.tsx: non-blocking comment wording. - File
packages/core/src/Toolbar/Toolbar.tsx: clear. - File
packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear; it has no two-list case. - File
packages/core/src/hooks/useOverflow.ts: blocking free-width finding; non-blocking runtimeinlineBoundskey and comment wording.
Each single-row list in a flex row added the row's whole free width to its own. Two lists in one row then both unfolded into the same space, the row overflowed, both clipped, the next measurement folded them, and the cycle repeated every frame. The lists that may unfold into a row now split its free width, so together they never claim more than it. The public useOverflow no longer returns the internal inline bounds. A Toolbar story holds two lists as the start lane's own children, and the browser spec checks that they settle without clipping or flicker at 380, 530 and 900 px. Co-authored-by: quocluongg <[email protected]>
|
/approve-spec bc82097 |
The no-clip, no-flicker cases pass on main too, since main never folds. This case needs both lists to fold into their own triggers beside the end lane, without clipping and steady across frames: main fails it (no fold), and so did the head before the lists shared the row's free width (flicker). Co-authored-by: quocluongg <[email protected]>
|
/approve-spec 2832696 |
The floor is the smaller of the folded and unfolded widths. Both were rounded up, so a list whose items span a sub-pixel width (a one-item list of 42.7 px) grew to the next pixel. Only the folded width now rounds up, so its trigger never clips; the unfolded width stays exact. The browser spec checks the one-item list's width to a tenth of a pixel. Co-authored-by: quocluongg <[email protected]>
|
/approve-spec 30514ed |
A single row is never narrower than the smaller of its fully folded width and its unfolded width, so its indicator is never clipped. In a narrower parent the list overflows the parent, and the parent's own overflow decides what shows. Browser cases cover a list in a parent narrower than its folded width (indicator whole) and a list with room (floor no wider than its items). Co-authored-by: quocluongg <[email protected]>
|
/approve-spec 9c969c3 |
|
/approve-spec 76274d5 |
There was a problem hiding this comment.
Approved pending CI. CI has not run on this head yet: a draft runs no CI, and marking it ready for review runs the required checks. There are no blocking findings; the open inline comment-writing suggestions stay non-blocking.
Claims and files checked
Review mode: same-head; reason: none
changed rules (0): none
Claims:
- Changeset: a start lane's own list folds beside the end content instead of pushing it out: verified (380 px capture: Clear ends at 404 of 412 px, where the base pushes it to 616 px; the 380 px browser case).
- Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (capture narrowed to 140 px then widened to 900 px: all ten items in each list, where the base stays folded).
- Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (a 30 px width and a 30 px flex basis both hold a 41 px list showing a whole "+6").
- Changeset: in a flex row the list's width is its unfolded items up to the row's width, and content after it sits after that width: verified (300 px capture: the folded list keeps 218.5 px and "After" sits whole at the row's end).
- Changeset: in a block parent the list fills the line as before: verified (block-parent list as wide as its parent on both sides).
- Changeset: a caller's width, max-width or flex basis still sets the width: verified (200 px width and max-width hold 200 px, a calc() cap holds its computed width; a narrower width or basis keeps the folded floor, as the description states).
- Description: no public API change, no new prop or data attribute, and the public hook's return is unchanged: verified (named exports only; the public hook strips the internal fields).
- Description: a nested list and the table filter template keep their layout, and a list with room shows every item: verified (nested, template and content-sized browser cases).
- Description: in a parent narrower than its folded width the list overflows the parent instead of clipping its trigger: verified (30 px parent cases).
- Description: the width is published in a flex row only, in layout pixels, capped by the visible-item cap, and follows a parent that switches between a flex row and a block: verified (source; capped-list capture shows three items and "+3"; display-flip case).
- Description: nothing is read before the first client measurement, so server markup is unchanged: verified (no size style until the first measurement).
- Description: the list shrinks before its siblings, so a badge or button keeps its label until the list is fully folded: verified (badge and following-button cases; "After" uncut at 300 px).
- Description: a set that fits whole reserves no indicator space: verified (new unit case).
- Description: a start lane whose own child is a list takes the width the end lane leaves, in plain CSS with no new attribute: verified (source).
- Description: the row free-width share is removed: verified (no share code at this head).
- Description: the scale read goes through the existing hit-area helper with its own tolerance, hit areas keep theirs, and the helper stays internal: verified (source; hit-area browser and unit suites pass, 28 browser cases where the description counts 26 from a different set).
- Description: below the folded start lane's width the lanes overlap, recorded as a gap, with no overlap down to 160 px and a 320 px guard: verified (record gap bullet; first-meet scans).
- Description: the browser spec passes 32 of 32 in both browsers, units 1710 of 1710 and Toolbar accessibility 13 of 13, and the evidence table's main column: verified (runs at this head; 11 of 32 fail on the base with this branch's stories, matching the table).
- Description: the record changes were ruled within the records: verified as far as the repository shows (an engineering owner approved the record changes at this head).
- Description: fixes the reported selection-toolbar bug: verified (the selection toolbar passes its start content straight to the toolbar's start lane).
- Description: notes on earlier commits: consistent with the reviews of those commits.
Files:
.changeset/toolbar-start-lane-overflow-folds.md: clear.apps/storybook/stories/OverflowList.stories.tsx: clear.apps/storybook/stories/Toolbar.stories.tsx: clear.docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).docs/specs/components/Toolbar/Toolbar.spec.md: clear.packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).packages/core/src/Toolbar/Toolbar.tsx: clear.packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.packages/core/src/hooks/computeOverflow.test.ts: clear.packages/core/src/hooks/computeOverflow.ts: clear.packages/core/src/hooks/useOverflow.ts: non-blocking (a stale comment onrenderedand long comment sentences).packages/core/src/utils/hitArea.ts: clear.
| /** | ||
| * The list counts any scale beyond the computed width's rounding (six | ||
| * significant digits), however close to 1: the last frames of a layer | ||
| * scaling in still shorten its measured items. | ||
| */ |
There was a problem hiding this comment.
Non-blocking (comment style): this is one 30-word sentence with two topics. Suggest: "The computed width keeps six significant digits. The list counts any larger scale, however close to 1. The last frames of a scale-in still shorten its items."
…he scaled rect A scaled rect is rounded on screen, so a width divided by the scale could come out a layout unit short. The list then published a width a unit narrower than its items, and an item shrank below its text: Firefox cut 'Save' and 'Duplicate' with an ellipsis under scale(0.5), and folded 'Delete' after a scale-in from 0.9. Under a scale, an item's width now comes from its computed style, through a new layoutSize helper that hitArea's screenScale also uses, plus half of the serialized width's last digit so the sum is never short. A browser case sweeps letter-spacing under scale(0.5) and scale(0.9) and checks that no item is narrower than its text; it fails at the previous head in Chromium and Firefox and passes here.
|
/approve-spec d1826cc |
There was a problem hiding this comment.
Changes requested. The code at this head holds up: a start lane's own list folds beside Clear, a folded list unfolds when its row widens, and under a scaled ancestor every item now keeps its whole label (the new scale sweep fails on the previous head and passes here in Chromium and Firefox). One thing blocks approval, and it needs only a description edit, no new commit:
- The pull request description is out of date for this head: its opening note names the previous commit as the current head, its Change bullet says scaled item widths are "divided by the list's screen-to-layout ratio from
screenScale" whileuseOverflow.ts:142-151now reads them from the computed style through the newlayoutSizeexport, and its Scale read bullet names onlyscreenScaleas the newhitArea.tsexport.
Two non-blocking comment-style suggestions are inline; the earlier comment-style threads stay open as non-blocking.
Claims and files checked
Review mode: incremental; reason: none
changed rules (0): none
Claims:
- Changeset: a start lane's own list folds beside the end content instead of pushing it out: verified (380 px browser case in both engines; Clear ends inside the toolbar, where the base pushes it past the edge).
- Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (widen-after-fold case: all ten items in each list).
- Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (30 px parent, 30 px width and 30 px flex basis cases keep a whole "+6").
- Changeset: in a flex row the list's width is its unfolded items up to the row's width, and content after it sits after that width: verified (button-after-list case; the list's dynamic width style).
- Changeset: in a block parent the list fills the line as before: verified (block-parent case).
- Changeset: a caller's width, max-width or flex basis still sets the width: verified (200 px width, 200 px max-width and calc() cases).
- Description: the opening note names the current head: false (it names the previous commit).
- Description: a single row's width uses item widths divided by the screen-to-layout ratio: false under a scale (widths now come from the computed style through
layoutSize,useOverflow.ts:142-151). - Description: the scale read goes through the existing hit-area helper with its own tolerance, hit areas keep theirs, and the helper stays internal: verified, but incomplete (it also adds and uses
layoutSize). - Description: no public API change, no new prop or data attribute, and the public hook's return is unchanged: verified (the API surface generator lists no change; the public hook strips the internal fields).
- Description: the minimum is the folded width rounded up and never wider than the unfolded items: verified (source; one-item floor case).
- Description: the list shrinks before its siblings and folds against the width it gets: verified (shrink factor in source; the button after the list keeps its whole label).
- Description: a set that fits whole reserves no indicator space: verified (new unit case).
- Description: a start lane whose own child is a list takes the width the end lane leaves, in plain CSS: verified (source; 380 px and 320 px cases).
- Description: the share math is removed: verified (none at this head).
- Description: a nested list and the table filter template keep their layout, and a list with room shows every item: verified (nested, template and content-sized cases).
- Description: below the folded start lane's width the lanes overlap, recorded as a gap, with a 320 px guard: verified (record gap bullet; no overlap found down to 160 px).
- Description: the evidence table's results for this pull request: verified at this head (the browser spec passes every case in both engines); the runs and stills from earlier commits are consistent with earlier reviews and were not re-run.
- Description: the record changes are approved: verified (an engineering owner approved this exact head).
Files:
.changeset/toolbar-start-lane-overflow-folds.md: clear.apps/storybook/stories/OverflowList.stories.tsx: clear.apps/storybook/stories/Toolbar.stories.tsx: clear.docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).docs/specs/components/Toolbar/Toolbar.spec.md: clear.packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).packages/core/src/Toolbar/Toolbar.tsx: clear.packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.packages/core/src/hooks/computeOverflow.test.ts: clear.packages/core/src/hooks/computeOverflow.ts: clear.packages/core/src/hooks/useOverflow.ts: non-blocking (the new width comment, a stale comment onrendered, long comment sentences).packages/core/src/utils/hitArea.ts: non-blocking (the file header grows to 16 lines).
| * without layout. Under a scale, the width comes from the computed style: a | ||
| * scaled rect is rounded on screen, and divided by the scale it can be a | ||
| * layout unit short, which shrinks an item below its text. The computed | ||
| * width keeps six significant digits, so half of its last digit is added | ||
| * back: the sum of the widths is then never short of the items. |
There was a problem hiding this comment.
Non-blocking (comment style): the second sentence is 36 words with three topics, and the last one is passive. Suggest, for the sentences after the first:
* Under a scale, read the width from the computed style. The browser rounds
* a scaled rect, so the rect divided by the scale can be one layout unit
* short, and the item shrinks below its text. The computed width keeps six
* significant digits. Add half of its last digit, so the sum is never short
* of the items.| * `screenScale` reads how far transforms scale a box, and `layoutSize` a | ||
| * box's untransformed size (hooks/useOverflow.ts uses both) |
There was a problem hiding this comment.
Non-blocking (file header): the header now runs 16 lines. These two lines fit in one:
* `screenScale` and `layoutSize` also serve hooks/useOverflow.ts.There was a problem hiding this comment.
Approved pending CI. CI has not run on this head yet: a draft runs no CI, and marking the pull request ready for review starts it. A start lane's own list now folds beside Clear, a folded list unfolds when its row widens, every item keeps its whole label under a scaled ancestor, and the description now matches the code. The comment-style and record-sentence suggestions in the open inline threads are non-blocking.
Claims and files checked
Review mode: same-head; reason: none
changed rules (0): none
Claims:
- Changeset: a list placed directly in a toolbar's start content folds beside the end content instead of pushing it out: verified (380 px browser case in Chromium and Firefox; the end lane stays inside the frame).
- Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (widen-after-fold case, including a start-folding list, a one-kept list and a text indicator).
- Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (30 px parent, 30 px width and 30 px flex-basis cases keep a whole "+6").
- Changeset: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified (published width and max-width in
OverflowList.tsx; button-after-list case). - Changeset: in a block parent the list fills the line as before: verified (block-parent case; no width is published outside a flex row).
- Changeset: a caller's width, max-width or flex basis still sets the list's width: verified (200 px width, 200 px max-width and
calc()cases; the caller's style wins by the cascade). - Description: the opening note names the current head and the merged base: verified.
- Description: the share math is gone; the list owns its width in CSS and the toolbar lane rule is plain CSS: verified (no share code; the
:has()lane rule). - Description: user impact (fold beside the end content, unfold on widening from either side and with any indicator, nested list and template unchanged, block parent unchanged, overflow instead of clipping in a too-narrow parent, no API change): verified (browser cases and source).
- Description: the cause (a folded list's box follows its folded items; the lane's automatic minimum counts every item): verified (base code).
- Description: the single row's width uses each item's rect without a scale and its computed style through
layoutSizeunder a scale, plus padding and border, capped at the row, only in a flex row and only withoutobserveParent: verified (useOverflow.ts). - Description: a capped list is as wide as the allowed items plus the indicator: verified (source; three-item cap case).
- Description: the parent's layout is read at every measurement and the parent is observed, so a flex-to-block switch is followed: verified (source; display-flip case).
- Description: nothing is published before the first client measurement: verified (initial bounds are zero, which gates both styles).
- Description: the minimum is the folded width rounded up and never wider than the unfolded items: verified (source; one-item floor case).
- Description: the list shrinks before its siblings and a too-narrow basis or width holds the folded width with "+N": verified (shrink factor; sibling and narrow cases).
- Description: a set that fits whole reserves no indicator space: verified (new unit case).
- Description:
hitArea.tsexportsscreenScalewith a tolerance and the newlayoutSize,useOverflowcalls both, hit areas keep their tolerance, the list uses a relative tolerance of six millionths, andhitArea.tsstays internal: verified (source). - Description: a scaled rect divided by the scale could be one layout unit short, so widths under a scale now come from the computed style with half of the last digit added back: verified (source; the scale sweep fails on the previous commit by 1/64 px in Chromium and 1/60 px in Firefox and passes here).
- Description: no new prop or data attribute, and the public hook's return is unchanged: verified (the public hook strips the internal field; API surface unchanged).
- Description: below the folded start lane's width the lanes overlap, recorded as a gap, with no overlap found down to 160 px and a 320 px guard: verified (record gap bullet; first-meet scan).
- Description: the authority bullets match the current Toolbar and OverflowList records, and the record changes carry an engineering owner's approval for this head: verified.
- Description: the head's local runs (33 of 33 browser cases in both engines; the new sweep fails on the previous commit): verified at this head; the full unit and hit-area totals are the author's runs and match the subsets run here; historical rows at earlier commits match the earlier reviews of those commits.
- Description: the writing rubric (one gap bullet and one verification row; the longest added sentence is 31 words): verified for added sentences; the changed performance sentence is 42 words (non-blocking thread).
Files:
.changeset/toolbar-start-lane-overflow-folds.md: clear.apps/storybook/stories/OverflowList.stories.tsx: clear.apps/storybook/stories/Toolbar.stories.tsx: clear.docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long performance sentence).docs/specs/components/Toolbar/Toolbar.spec.md: clear.packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).packages/core/src/Toolbar/Toolbar.tsx: clear.packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.packages/core/src/hooks/computeOverflow.test.ts: clear.packages/core/src/hooks/computeOverflow.ts: clear.packages/core/src/hooks/useOverflow.ts: non-blocking (a stale comment onrendered, long comment sentences).packages/core/src/utils/hitArea.ts: non-blocking (the file header grows to 16 lines).
# Conflicts: # docs/specs/components/Toolbar/Toolbar.spec.md # packages/core/src/OverflowList/OverflowList.tsx # packages/core/src/hooks/useOverflow.ts
…draws Main now reads the gap a list renders (the computed column-gap of its measurement copy) for the fold. The width a single row publishes for itself still summed its items with the fixed gap table, so in a theme whose gap step draws wider (matcha, y2k: 12 px for step 2) the list published a width narrower than its items and folded one with room. It now sums them with the drawn gap. A browser case in matcha checks the list shows all six items with none narrower than its text and a width that holds its drawn gaps; it fails with the table gap (five items) and passes here.
|
/approve-spec 30e81e8 |
There was a problem hiding this comment.
Changes requested: the single-row width contract holds outside a toolbar, but since main was merged a start lane's own list no longer folds beside its badge, which is this pull request's main scenario.
- Regression: with
main's two-lane wrap styles (twoLanegives the start laneflex-wrap: wrapandtwoLaneEndgives the end laneflex-grow: 1), thestartFoldsrule inToolbar.tsxlets the list wrap onto its own line under "5 selected" and take only half the free width, so at 900 px the overflow-actions toolbar grows to two rows and still shows "+1", against Toolbar FR2; keep the lane on one line and let it outgrow the end lane under the:has()condition, and make the spec's 900 px and unfold cases fail when a+Ntrigger shows, since today they count the trigger as an action.
startFolds also drops twoLane's min-width: fit-content from every horizontal start lane, so restoring it in the same fix is worthwhile. The comment-style suggestions in the open inline threads are non-blocking, and CI has not run on this draft head.
Claims and files checked
Review mode: same-head; reason: none
Claims:
- Changeset: a list placed directly in a toolbar's start content folds beside the end content instead of pushing it out: partly false (it folds and the end content stays inside, but the list wraps under the badge).
- Changeset: a folded single-row list in a flex row unfolds when the row widens: verified outside a toolbar; false inside the toolbar's start lane at 900 px.
- Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified (narrow parent, width and flex-basis cases).
- Changeset: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified (button-after-list case).
- Changeset: in a block parent the list fills the line: verified.
- Changeset: a caller's width, max-width or flex basis still sets the list's width: verified (fixed width, max-width and
calc()cases). - Description: the toolbar lane takes the width the end lane leaves: false (the end lane's grow takes half the free width).
- Description: every action and no trigger when the row has room: false (the test passes because it counts the trigger).
- Description: the actions unfold when the row widens again: false inside the toolbar at 900 px.
- Description: share math removed; width in a flex row only, in layout pixels, from each item's rect or, under a scale, its computed style; padding and border added; capped at the row; parent observed: verified.
- Description: a capped list is as wide as the allowed items and its indicator; nothing is published before measurement; the minimum is rounded up and never wider than the unfolded items: verified.
- Description: a set that fits whole reserves no indicator space: verified (new unit case).
- Description: the published width sums items with the gap the theme draws: verified (matcha case).
- Description: hit areas keep their scale tolerance, the list uses its own, and the helper stays internal: verified.
- Description: no new prop or data attribute, and the public hook's return is unchanged: verified.
- Description: nested lists and the table filter template keep their layout: verified.
- Description: the record changes carry an engineering owner's approval for this head: verified.
- Description: the local browser run passes all cases at this head: verified in Chromium.
Files:
.changeset/toolbar-start-lane-overflow-folds.md: first claim partly false (part of the blocking finding).apps/storybook/stories/OverflowList.stories.tsx: clear.apps/storybook/stories/Toolbar.stories.tsx: clear.docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long performance sentence).docs/specs/components/Toolbar/Toolbar.spec.md: clear.packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).packages/core/src/Toolbar/Toolbar.tsx: blocking (start-lane regression); non-blocking (dropped two-lane minimum).packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: part of the blocking finding (the 900 px and unfold cases count the trigger).packages/core/src/hooks/computeOverflow.test.ts: clear.packages/core/src/hooks/computeOverflow.ts: clear.packages/core/src/hooks/useOverflow.ts: non-blocking (stale comment onrendered, long comment sentences).packages/core/src/utils/hitArea.ts: non-blocking (file header length).
…de the two-lane wrap Main's two-lane wrap gives the end lane flex-grow 1 and the start lane flex-wrap: wrap. With a start lane that folds its OverflowList (flex 1 1 0%), the lanes then split the row's free space, and the wrapping start lane moved the list, at its unfolded width, to a line of its own: the badge sat above the actions and the list folded with room. Such a lane now takes all the free space (flex-grow 1000000) and does not wrap, so the end lane stays at its content width and the list folds. Two-lane rows without a list keep the wrap. A browser case checks the overflow-actions toolbar at 1280 px in Y2K and matcha and at 390 px in neutral: badge and list on one line, the end lane at its content width, and every action shown at 1280 px; it fails at the previous head and passes here.
|
/approve-spec 2f6de0f |
There was a problem hiding this comment.
Changes requested: the start lane's own list now folds beside Clear and stays on one line with main's two-lane wrap (at 900 px the toolbar matches main exactly), but the lane rule now also stops every other two-lane start lane from wrapping.
startFoldsinToolbar.tsxgives itsflexWrapandminWidthanulldefault and is applied to every horizontal start lane, so StyleX dropstwoLane'sflex-wrap: wrapandmin-width: fit-contentfrom two-lane toolbars that hold noOverflowList, and a start lane wider than its toolbar now runs off it (the Default story at 390 px with 200% text ends 92 px past the toolbar and scrolls the page 20 px), against Toolbar FR2's "a start or end lane whose controls do not fit a line of their own wraps them"; keeptwoLane's values on the default branch for a two-lane start lane and add a browser case for a wide start lane without a list.
The description's "Two-lane rows without a list keep main's wrap" becomes true with that fix. Separately, the 900 px, 1280 px and unfold "every action" assertions still count the "+N" trigger as an action, and the comment-style threads stay open; both are non-blocking. CI has not run on this draft head.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- Changeset: a list placed directly in a toolbar's start content folds beside the end content instead of pushing it out: verified (380 and 320 px).
- Changeset: a folded single-row list in a flex row unfolds when the row widens: verified (320 to 900 px).
- Changeset: a single-row list never shrinks below its folded width, so its trigger stays whole: verified in the last review; code unchanged.
- Changeset: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified in the last review; code unchanged.
- Changeset: in a block parent the list fills the line: verified in the last review; code unchanged.
- Changeset: a caller's width, max-width or flex basis still sets the list's width: verified in the last review; code unchanged.
- Description: a start lane holding a list takes all the free space, the end lane keeps its content width, and the lane does not wrap: verified (neutral, Y2K and matcha).
- Description: two-lane rows without a list keep the base branch's wrap: false (their start lanes no longer wrap; part of the blocking finding).
- Description: every action and no trigger when the row has room: verified by probe at 900 and 1280 px (the test counts the trigger).
- Description: the actions unfold when the row widens again: verified.
- Description: a nested list and the table filter template keep their layout: verified (same as the base at 1280 to 320 px).
- Description: lanes stay apart across the tested range, guarded at 320 px: verified (down to 180 px).
- Description: no new prop or data attribute, and the public hook's return is unchanged: verified (no API rows).
- Description: share math removed; width in a flex row only, in layout pixels; scale reads; drawn gap; capped width; rounded minimum; a set that fits reserves no indicator: verified in the last review; code unchanged.
- Description: the record changes carry an engineering owner's approval for this head: verified.
- Description: local runs pass every case at this head, including the two-lane wrap spec: not re-run; that spec's story fits its start lane, so it does not exercise the regression.
Files:
.changeset/toolbar-start-lane-overflow-folds.md: clear.apps/storybook/stories/OverflowList.stories.tsx: clear.apps/storybook/stories/Toolbar.stories.tsx: clear.docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).docs/specs/components/Toolbar/Toolbar.spec.md: clear.packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).packages/core/src/Toolbar/Toolbar.tsx: blocking (start-lane wrap removed from two-lane toolbars without a list).packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: non-blocking ("every action" assertions count the trigger); a wide start lane without a list has no case.packages/core/src/hooks/computeOverflow.test.ts: clear.packages/core/src/hooks/computeOverflow.ts: clear.packages/core/src/hooks/useOverflow.ts: non-blocking (stalerenderedcomment, long comment sentences).packages/core/src/utils/hitArea.ts: non-blocking (file header length).
…s it holds a list The start-lane fold's style set flex-wrap and min-width to null outside its :has() condition, and it came after the two-lane style, so it dropped the two-lane start lane's wrap and fit-content width from every two-lane toolbar, list or not. A two-lane start lane now takes one merged style: wrap and fit-content by default, and only under the :has() condition nowrap, min-width 0, a 0% basis and the large grow. Other start lanes keep the original fold. A browser case reads a two-lane start lane without a list (fit-content, wrap, no grow); it fails at the previous head (min-width auto) and passes here. The 900 px and widen cases, and the wide-theme case at 1280 px, now also fail when a +N trigger shows, since the label count includes it.
|
/approve-spec 81191dd |
There was a problem hiding this comment.
Approved: CI passed on this head, including the full browser interaction suite and the touched-component visual and accessibility checks.
The start lane's own list folds beside Clear on one row and unfolds as the row widens, and two-lane toolbars without a list keep the base branch's start-lane wrap, rendering identically to it. The open comment-style threads are non-blocking.
Claims and files checked
Review mode: same-head; reason: none
Claims:
- Release note: a list placed directly in a horizontal toolbar's start content folds into its trigger beside the end content instead of pushing it out: verified (380 and 320 px browser cases pass at this commit and fail on the base).
- Release note: a folded single-row list in a flex row unfolds when the row widens: verified (320 to 900 px; the row-widens case).
- Release note: the list never shrinks below its folded width, so its trigger stays whole: verified (narrow-parent and 30 px cases).
- Release note: in a flex row the list is as wide as its unfolded items, at most the row, and content after it sits after that width: verified (followed-by-sibling and parent-flip cases).
- Release note: in a block parent it fills the line: verified (block-parent case).
- Release note: a caller's width, max-width or flex basis still sets the width: verified (caller-limited cases).
- Description: the end content stays inside the toolbar, the actions fold with the trigger whole and unfold when the row widens: verified (browser cases).
- Description: any single-row list in a flex row unfolds, whichever side it folds from and whatever its indicator: verified (start-folding, one-kept and text-indicator rows).
- Description: a nested list and the table filter template keep their layout, and a list with room keeps its items' width: verified.
- Description: the flex-row trade-off, unchanged block parents and a list wider than a narrow parent: verified.
- Description: the width is published only in a flex row, in layout pixels, follows a parent that switches between flex and block, and is not read before the first client measurement: verified (
useOverflow.ts:660,:795-805;OverflowList.tsx:433-444; the parent-flip case). - Description: the minimum is rounded up and never wider than the unfolded items, the list shrinks before its siblings, and a narrow basis holds the folded width: verified (
useOverflow.ts:161-205;OverflowList.tsx:81-91). - Description: a set that fits reserves no indicator: verified (
computeOverflow.ts:84-89and its new unit case). - Description: a two-lane start lane holding a list does not wrap, drops its minimum and takes the free width, and one without a list keeps the base branch's wrap and width exactly: verified (
Toolbar.tsx:150-158; six toolbars render identically to the base). - Description: the earlier free-width share and its observer are removed: verified.
- Description: hit areas keep their own tolerance, the list uses a finer one, and the helper stays internal: verified (
hitArea.ts:477,useOverflow.ts:158; not re-exported from the utilities entry). - Description: the published width sums the gap the browser draws, and scaled widths come from the computed style: verified (
useOverflow.ts:595-597,:142-151; wide-gap theme and scaled-sweep cases). - Description: no new public prop or data attribute, and the public hook's return is unchanged: verified (no public API rows;
useOverflow.ts:468-475). - Description: below the folded width the lanes still overlap, recorded as a Toolbar gap and guarded at 320 px: verified (record bullet; first-meet case).
- Description: the record changes carry an engineering owner's approval for this commit: verified.
- Description: the fix is carried without the shared styling module the superseded pull request added: verified.
- Description: the new browser spec passes every case in Chromium and Firefox at this commit, with the text-size spec: verified (Chromium phone; Firefox phone and desktop).
- Description: the Toolbar and OverflowList accessibility specs, hit-area specs, unit tests and knowledge check pass: verified (the component audits run in CI, which passed at this commit).
- Description: the evidence table's base column: consistent (14 of the 36 cases fail on the base with this branch's stories).
- Description: runs and stills from earlier commits: historical, not re-run.
- Description: the longest added record sentence is 31 words: verified for added sentences; the edited measurement sentence is 42 words (non-blocking note).
Files:
.changeset/toolbar-start-lane-overflow-folds.md: clear.apps/storybook/stories/OverflowList.stories.tsx: clear.apps/storybook/stories/Toolbar.stories.tsx: clear.docs/specs/components/OverflowList/OverflowList.spec.md: non-blocking (one long PR1 sentence).docs/specs/components/Toolbar/Toolbar.spec.md: clear.packages/core/src/OverflowList/OverflowList.tsx: non-blocking (long comment sentences).packages/core/src/Toolbar/Toolbar.tsx: non-blocking (one long comment sentence).packages/core/src/Toolbar/__tests__/ToolbarOverflowList.interaction.browser.spec.ts: clear.packages/core/src/hooks/computeOverflow.test.ts: clear.packages/core/src/hooks/computeOverflow.ts: clear.packages/core/src/hooks/useOverflow.ts: non-blocking (stalerenderedcomment, long comment sentences).packages/core/src/utils/hitArea.ts: non-blocking (file header length).
| // A two-lane start lane: `twoLane`, except that a lane holding an | ||
| // OverflowList folds it. Such a lane takes all the free space, because the | ||
| // end lane grows by 1 and this factor dwarfs it, so the end lane stays at | ||
| // its content width. It does not wrap, because a wrapping lane would move | ||
| // the list, at its unfolded width, to a line of its own. |
There was a problem hiding this comment.
Non-blocking (comment style): the second sentence is 29 words and joins a cause and its result. Suggest:
// A two-lane start lane: `twoLane`, except that a lane holding an
// OverflowList folds it. Such a lane takes all the free space: the end lane
// grows by 1, and this factor dwarfs it. The end lane stays at its content
// width. It does not wrap, because a wrapping lane would move the list, at
// its unfolded width, to a line of its own.
Primary intent
Fix: an
OverflowListplaced directly in a horizontalToolbar'sstartContentfolds its actions into its overflow trigger besideendContent. Before, it pushed the end content past the toolbar's edge. Fixes #8804. Supersedes #11996.User impact
FollowedBySibling).width,max-width(includingcalc()andmin()) or flex basis still sets the list's width.Cause
A list in a flex row was as wide as its shown content. Once it folded, its box shrank to the folded items, so it never saw the room to unfold. A Toolbar start lane also counted the list's unfolded items in its automatic minimum, so the list never got a narrower width to fold into.
Change
layoutSizeinutils/hitArea.ts, so a scale changes nothing; plus its own padding and border), at most the row's width (max-width: 100%), when it does not observe its parent. WithmaxVisibleItems, the width is the items the cap allows plus the indicator. The parent's layout is read at every measurement, and the list also measures when its parent resizes, so a parent that switches between a flex row and a block is followed. In a block, grid or column parent the width stays automatic. Nothing is read before the first client measurement, so server markup is unchanged.OverflowListas its own child (:has(> .astryx-overflow-list)), the lane takes the width the end lane leaves (flex: 1 1 0%,min-width: 0). This is plain CSS, with no new attribute and no measuring.utils/hitArea.tsnow exports two helpers, anduseOverflowcalls both: its existingscreenScale, with a tolerance parameter, decides whether the list is scaled, and the newlayoutSize(whichscreenScalealso uses) gives an element's untransformed border-box size (architecture:react-component-runtimeINV16: extend the shared owner). Hit areas keep their tolerance, a one-pixel shortcut and a thousandth of a ratio; hit-area browser specs pass 26/26. The list passes no pixel shortcut and a relative tolerance of six millionths, inside the computed width's six significant digits, so a scale however close to 1 counts while a wide unscaled list settles.hitArea.tsstays internal (not re-exported fromutils).flex-grow: 1and its start laneflex-wrap: wrap. A two-lane start lane takes one merged style: main'sflex-wrap: wrapandmin-width: fit-contentby default, and only when it holds an OverflowList (:has()),nowrap,min-width: 0, a0%basis andflex-grow: 1000000, so the end lane keeps its content width and the list folds instead of moving to a line of its own. Two-lane rows without a list keep main's wrap and width exactly.column-gap). The width a single row publishes for itself now sums its items with that same drawn gap, not the fixed gap table. In a theme whose gap step draws wider (matcha and y2k draw step 2 at 12 px, where the table says 8 px), the old sum was narrower than the items, so a list with room folded one away.layoutSizehelper inhitArea.tsthatscreenScalealso uses. Half of the serialized width's last digit is added back, so the sum is never short. With no scale, widths still come from the rect.useOverflow's public return is unchanged.Limit
Below the folded start lane's width, the Toolbar's start lane still overlaps the end lane instead of wrapping. The lane gives up its automatic minimum so the list, whose own width is its unfolded width, can shrink. That is recorded as an FR2 gap. The lanes stay apart across the spec's tested range (down to 160 px), and the 320 px no-overlap test guards the supported range.
Authority
min-width).Evidence
Real Chromium and Firefox (Playwright 1.61.1),
ToolbarOverflowList.interaction.browser.spec.ts. The main arm is main 484f7af with this branch's stories and spec copied in.width: 200pxandmax-width: 200pxlists fold within 200 pxminVisibleItems={1}list and a plain-text indicator unfold when a narrow row widens to 900 pxcalc(25% + 30px)cap holds one fold across 12 framesflex: 0 0 30pxlist and awidth: 30pxlist hold "+6" across 10 framesmin-width: fit-content,flex-wrap: wrapand no growmin-width: autoat 2f6de0f)check:knowledgeis clean.computeOverflowcase that fails on main), Breadcrumbs, TabList and Tokenizer pass 1710/1710. Toolbar a11y (Chromium) passes 13/13.calc()cap (0/5), and 87637c6 fixed both (5/5), in Chromium and Firefox. Both cases are kept here as regression tests.Stills (real Chromium and Firefox, main 2ff1afc vs head 89f9b52, from vjeux's farm):
Scaled and capped rows (main 2ff1afc vs head 37fdd5c, from vjeux's farm; labels):
maxVisibleItems={3}in a 700 px row (outlined)maxVisibleItems={3}in a 700 px row (outlined)Writing rubric results
Credit
Thanks to @quocluongg, whose #11996 found the cause and whose tests and stories this builds on (co-authored). This PR carries the fix from main, without the shared styling module #11996 added, and narrows the lane rule to a list that is the lane's own child.
Owner and land path
Overlap checked: #11996 (superseded: this carries its fix from main without the shared styling module it added, so its approved head stays untouched; reviewers close #11996 in favor of this PR)