Repository navigation
fix(core): a two-lane Toolbar wraps instead of squeezing its start lane - #12391
josephfarina wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the two-lane row now wraps as the Toolbar record's FR2 requires, but a wrapped end lane does not stay at the inline end.
- On its own line the end lane's controls sit at the inline start:
edgeCompSlot.inset(...)atToolbar.tsx:492comes afterstyles.twoLaneEndand replaces itsmarginInlineStart: 'auto', so the description's "The end lane stays at the inline end, also on its own line" and the comment atToolbar.tsx:124are not true at this head.
To fix it, give the two-lane end lane flexGrow: 1 so endSlot's justifyContent: 'flex-end' holds its controls at the inline end (as sideLane does), or apply twoLaneEnd after the inset, and assert in ToolbarTwoLaneWrap.a11y.chromium.spec.ts that the end lane's last control ends at the toolbar's inline end. Everything else checked out: the new story fails on main and passes here at 390 px, fitting toolbars are pixel-identical, and no public API changed. CI has not run on this head yet.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims (changeset and description):
- A two-lane toolbar that does not fit wraps, the end content moving to the next line instead of squeezing the title and cutting the badge: verified (new story at 390 px on
mainand at this head). - Each lane keeps its controls on one line, and a lane wider than the toolbar wraps its own controls: verified (390 px and 240 px).
- A toolbar that fits looks the same as before: verified (fitting stories identical at 390 and 1280 px).
- A wrapped end lane stays at the inline end: false (
Toolbar.tsx:125-127,:492; end lane at 24-248 in a 28-362 toolbar at 390 px). - A vertical toolbar is unchanged: verified (vertical toolbar story identical).
- With a bottom divider, a wrapped two-lane row keeps the tab indicator on its tab: verified (
Toolbar.tsx:342-355; indicator offset unset only while wrapped). - The two-lane lanes follow the three-lane side-lane rule: partly; the minimum width matches, but the three-lane end lane grows and aligns its controls to the end, and the two-lane one does not.
- The record keeps FR2's text and changes only its compatibility lines, one verification row and
verified_by: verified (record diff). - No API change and no new props: verified (API surface comparison: 0 rows).
- The kanban board template is not edited: verified (file list).
- The new spec fails on
mainand passes with this change at 390 px: verified by reproducing its assertions in Chromium; the spec file itself was not run. - The Toolbar and Section unit tests pass: verified (71 tests passed); the browser specs were not run.
- Among toolbar stories only Tab Navigation, the toolbar pattern (LTR and RTL) and the edge-compensation comparison change at 390 px: verified for the 16 stories captured.
- The kanban board header now fits a phone, and other template pages are unchanged: not checked (template pages not rendered).
Files:
.changeset/toolbar-two-lane-wrap.md: clear.apps/storybook/stories/Toolbar.stories.tsx: clear.docs/specs/components/Toolbar/Toolbar.spec.md: clear.packages/core/src/Toolbar/Toolbar.tsx: finding,twoLaneEndoverridden (:125-127,:492).packages/core/src/Toolbar/__tests__/ToolbarTwoLaneWrap.a11y.chromium.spec.ts: finding, no end-alignment assertion (:71).
|
Owner decision (engineering owner, covering this pull request): a two-lane Toolbar wraps its lanes onto separate rows when they do not fit, instead of squeezing its start lane, so a toolbar header stays usable on a phone. Wide layouts are unchanged. The Toolbar record's compatibility and verification lines state this, and a Chromium spec covers it. |
|
/approve-spec 5450967 |
|
/approve-spec 3f46b2c |
There was a problem hiding this comment.
Changes requested. The follow-up fixes the end-lane placement, so a wrapped end lane now keeps its controls at the inline end, but two claims in the release note and the description still misstate what changes; no code change is needed.
- Miss:
.changeset/toolbar-two-lane-wrap.md:5says "Each side keeps its controls on one line", but a lane wider than the toolbar wraps its own controls (the new story at 240 px, and the kanban header's end controls at 390 px), so please qualify it, for example "while it fits the toolbar's width". - Miss: the description says the edge-compensation comparison story's end lane "ran 4 px past the toolbar" and now wraps, but that 4 px is edge compensation on both base and head and the Ghost toolbar does not wrap; what changes is that the Solid toolbar, which fit on one line by widening its
1frcolumn, now wraps Save onto a second line, so please correct that entry and add to User impact that a container sized by its content no longer widens for a two-lane toolbar.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none
- Claim, changeset: a two-lane toolbar moves its end content to the next line instead of squeezing the start content: verified (browser measurement at 390 px; the new spec passes)
- Claim, changeset: each side keeps its controls on one line: false (240 px story; kanban header at 390 px)
- Claim, changeset and description: a toolbar that fits looks the same as before: verified in fixed-width containers (pixel-identical stories and template pages); not true in a content-sized container (comparison story)
- Claim, changeset: the kanban header now fits a phone: verified (390 px: title and count on one line, nothing clipped, no sideways scroll)
- Claim: before, both lanes stayed on one line however narrow, and the kanban header broke its title and clipped its badge at 390 px: verified (base code; browser measurements of main)
- Claim: the end lane fills the rest of its line and keeps its controls at the inline end: verified (Toolbar.tsx:126-128; browser measurements at 390 px in LTR and RTL)
- Claim: a lane wider than the toolbar wraps its own controls: verified (browser measurement at 240 px)
- Claim: a vertical toolbar is unchanged: verified (pixel-identical vertical story)
- Claim: with a bottom divider a wrapped two-lane row keeps the indicator on its tab: verified (Toolbar.tsx:343-356; Tab Navigation measurement; text-size spec passes)
- Claim: the record's FR2 already states the wrap and only the three-lane layout did it: verified (record FR2; base Toolbar.tsx)
- Claim: no API change and no new props; the kanban template is not edited: verified (the API report finds no change; changed-file list)
- Claim: the record keeps FR2, names the two-lane layout in its compatibility lines, and adds a verification row and the spec to verified_by: verified (record diff)
- Claim: the new story and spec check what the description lists, and the 390 px case fails on main and passes here: verified (spec lines 67-83; main measurement; spec passes on the head Storybook)
- Claim: the other Toolbar browser specs, the text-size spec, and the Toolbar and Section unit tests pass: verified (43, 6 and 71 tests passed)
- Claim: template pages that use Toolbar change only for the kanban header at 390 px: verified for seven of eight pages at 390, 768 and 1280 px
- Claim: among the Toolbar stories only the listed ones change, at 390 px: verified for the set; false for the comparison story's explanation
- Claim: prettier, eslint and the knowledge check are clean: verified (Lint workflow; knowledge check run)
- Claim: a build replay set shows no suggestion changes: not verified here
- File
.changeset/toolbar-two-lane-wrap.md: finding (line 5) - File
apps/storybook/stories/Toolbar.stories.tsx: clear - File
docs/specs/components/Toolbar/Toolbar.spec.md: clear - File
packages/core/src/Toolbar/Toolbar.tsx: clear - File
packages/core/src/Toolbar/__tests__/ToolbarTwoLaneWrap.a11y.chromium.spec.ts: clear
|
/approve-spec 695b6bd |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because its run found no room under the CI ceiling and cancelled the heavy jobs, so it needs a re-run before merge.
The narrowed release note and the corrected description now match what the change does, and the two-lane wrap holds in the new Chromium spec, which fails on main and passes here.
- Non-blocking: the description says the ghost toolbar in the edge-compensation comparison story "does not change"; it keeps one line and its 4 px overhang, but at 390 px it is 10 px wider because the solid column no longer takes that width, so "keeps one line; its column is 10 px wider" would be exact.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0): none
- Claim, changeset: a two-lane toolbar moves its end content to the next line instead of squeezing the start content until its title wraps and its badge is cut: verified (390 px probes on main and head; the new spec fails on main and passes here)
- Claim, changeset: each side keeps its controls on one line while it fits the toolbar's width: verified (390 px one row; at 240 px the end lane wraps its controls only once wider than the toolbar)
- Claim, changeset and description: a toolbar that fits its container looks the same as before: verified (40 of 46 Toolbar stories at 390 px, the new story at 1024 px and the kanban header at 768 and 1280 px are pixel-identical)
- Claim, changeset: the kanban board template header now fits a phone: verified (390 px: title and count on one line, nothing clipped, no sideways scroll)
- Claim: before, both lanes stayed on one line however narrow, and the kanban header broke its title, clipped its badge and squeezed its controls at 390 px: verified (base code; 390 px probes of main)
- Claim: a container sized by its content no longer widens to hold a two-lane toolbar on one line: verified (comparison story at 390 px)
- Claim: the end lane fills the rest of its line and keeps its controls at the inline end: verified (Toolbar.tsx:124-128; 390 px probes in LTR and RTL)
- Claim: a lane wider than the toolbar wraps its own controls, and the kanban header's end controls take two lines at 390 px: verified (240 px story; kanban 390 px)
- Claim: a vertical toolbar is unchanged: verified (pixel-identical vertical story; Toolbar.tsx:79-83, :473-475)
- Claim: with a bottom divider a wrapped two-lane row keeps the tab indicator on its tab: verified (Toolbar.tsx:343-356; Tab Navigation probe; text-size spec passes)
- Claim: the record's FR2 already requires the wrap and only the three-lane layout did it: verified (record FR2; base Toolbar.tsx)
- Claim: the two-lane lanes take the three-lane side-lane rule and the divider check watches the two-lane row: verified (Toolbar.tsx:106-128, :343-346)
- Claim: no API change and no new props; the kanban template is not edited: verified (the API report finds no change; changed-file list)
- Claim: the record keeps FR2's text, names the two-lane layout in its compatibility lines, and adds a verification row and the spec to verified_by: verified (record diff)
- Claim: writing rubric results: verified against the record diff (present tense, no narration or status)
- Claim: the new story and spec check what the description lists, and the 390 px case fails on main and passes here: verified (spec lines 67-83; run on both)
- Claim: the other Toolbar browser specs, the text-size spec, and the Toolbar and Section unit tests pass: verified (13, 6 and 71 tests passed)
- Claim: template pages that use Toolbar change only for the kanban header at 390 px: verified for the kanban page; the other pages not re-rendered here
- Claim: where a toolbar fits one line its last control ends at the same pixel as before: verified (Tab Navigation at 1280 px; fitting stories pixel-identical)
- Claim: the kanban header at 1280 px is pixel-identical: verified in the default theme
- Claim: among the Toolbar stories only the listed ones change, all at 390 px: verified (exactly those five stories change)
- Claim: in the comparison story the solid toolbar now wraps Save, and the ghost toolbar does not change apart from its edge-compensation overhang: verified for its layout and overhang; its box is 10 px wider (non-blocking note)
- Claim: a build replay set shows no suggestion changes: not verified here
- Claim: prettier, eslint and the knowledge check are clean: verified (Lint workflow at this head; knowledge check run)
- File
.changeset/toolbar-two-lane-wrap.md: clear - File
apps/storybook/stories/Toolbar.stories.tsx: clear - File
docs/specs/components/Toolbar/Toolbar.spec.md: clear - File
packages/core/src/Toolbar/Toolbar.tsx: clear - File
packages/core/src/Toolbar/__tests__/ToolbarTwoLaneWrap.a11y.chromium.spec.ts: clear
|
/approve-spec 695b6bd |
- #12680 perf(cli): a template's component line resolves its names in one pass, not one full lookup per name Author: Joey <[email protected]> - #12180 fix(core): Calendar weekday names widen their column instead of overlapping Author: Joey <[email protected]> - #12159 feat(cli): make an icon set inside your own app Author: Joey Farina <[email protected]> - #12383 fix(Grid): a responsive column shrinks to a container narrower than minWidth Author: Joey Farina <[email protected]> - #12374 [fix] Icon: a glyph given as name renders and warns, instead of crashing Author: Joey Farina <[email protected]> - #12453 fix(charts): line, area and band default to straight segments Author: josephfarina <[email protected]> - #12296 fix(core): a neutral Badge in a primary or destructive Button meets 4.5:1 on its fill Author: Joey Farina <[email protected]> - #12395 fix(CodeBlock): without a code string, CodeBlock names the prop and the fix in development Author: Joey Farina <[email protected]> - #12260 fix(cli): `astryx component Flex` names Stack first Author: Joey Farina <[email protected]> - #12391 fix(core): a two-lane Toolbar wraps instead of squeezing its start lane Author: Joey Farina <[email protected]> - #12427 fix(core): checkbox and radio marks keep their share of the box a theme sizes Author: josephfarina <[email protected]> - #12725 [experimental] cli: with no icon set, experimental icon names the discover search where it lists packs Author: Joey Farina <[email protected]>
|
Landed in #12738. |
Record change (
component:Toolbar): FR2's rule is unchanged; the compatibility lines now name the two-lane layout, and FR2's verification table gains a row for the new browser spec.Proof: the new browser spec fails on main (the title wraps to two lines at 390 px) and passes with this change; wide-screen template pages are pixel-identical before and after; the build replay set shows no suggestion changes.
User impact
A
Toolbarwith start and end content kept both on one line, however narrow its container. On a phone the start lane was squeezed until its title wrapped and its controls were cut. The kanban board template's header shows it at 390 px: "Sprint Board" broke onto two lines, its count badge was clipped, and the sprint selector and actions were pushed into a narrow second column.Now the row wraps: the end lane moves to the next line, and each lane keeps its controls on one line.
Problem and solution fit
The component record already states this for every horizontal toolbar (
component:ToolbarFR2): "No lane clips or overlaps another; when the lanes do not fit one row at their minimum widths, the row wraps and the end lane moves to a following line." Only the three-lane layout did it. The two-lane layout was a no-wrapspace-betweenrow whose lanes could shrink below their content.The fix gives the two-lane layout the rule the three-lane side lanes already follow. The row may wrap, and each lane's minimum width is its full row of controls, capped at the toolbar's width. The end lane grows to fill the rest of its line, and its controls already align to the end, so they stay at the inline end on any line. The divider's indicator check now also watches a horizontal two-lane row.
No API change and no new props. The kanban board template is not edited; it is fixed by the component.
Record
component:Toolbarkeeps FR2's text. Its compatibility lines now name the two-lane layout beside the three-lane one, and a new verification row names the browser spec below.verified_bylists the spec.Writing rubric results
R1 narration: none; the changed compatibility lines are template-required lifecycle fields and stay in the present tense.
R2 research: none.
R3 evidence: the new verification cell names the spec file and its widths, not a pull request.
R4 rejected alternatives: none recorded.
R5 change references: none.
R6 open questions: none touched.
R7 project status: none.
Tests
Readiness: two lanes on a narrow screen(a title with a count badge, and three end actions).ToolbarTwoLaneWrap.a11y.chromium.spec.ts. At 390 px it checks that the title stays on one line, no lane control is cut, the end lane starts below the start lane and stays inside the toolbar, and the page does not scroll sideways. On both widths it checks that the end lane's last control ends at the toolbar's inline end. At 1024 px it also checks that the row keeps one line. The 390 px case fails on main (the title takes two lines) and passes with this change.Evidence
Wide widths are unchanged (picture check). Screenshots of every template page that uses
Toolbarwere compared before and after at 768 and 1280 px, and they are pixel-identical. At 390 px only the kanban board changes. Where a toolbar fits one line, the end lane's box is now wider, but its last control ends at the same pixel as before on every page, so nothing moves.Toolbar(AI chat, canvas editor, editor, file explorer, kanban board, settings sidebar, inbox table, tree table) at 390, 768 and 1280 px: only the kanban board at 390 px changes. Every other page is pixel-identical.With Tab Navigation: the "New item" button was cut off at the card edge.astryx buildon a build replay set: no start, alternative or block suggestion changes.Scope
Components: core (Toolbar), its record
Testing
pnpm check:knowledge: records aligned.pnpm test:a11y-contracton the new spec against Storybook builds of main and of this change: fails, then passes.