Repository navigation
fix(Collapsible): let the trigger label fill the row - #5933
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsCollapsible (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual RegressionStatus: No visual change across 2 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
|
Visual gate, for the record: no shot changed against the baseline. The twelve entries are all under Added — Accepting to record the new baselines. /accept-visual |
|
/accept-visual 33680104028/1 No frame changed against the baseline — the report lists all twelve shots under Added, not Changed. |
|
Visual acceptance refused: the reason must explain why the pixels are correct (12–500 characters). |
|
/accept-visual 33680104028/1 No frame changed against the baseline: the report lists all twelve shots under Added, not Changed. core-collapsible--single-mode had no baseline before this run, so these record new coverage rather than waving through a diff. Every Collapsible story that does have a baseline came back identical, which is what a label growing into space the text does not fill should do. |
|
/accept-visual Reviewed the report: no changed or removed baselines, only 12 added shots for |
|
Visual acceptance refused: copy the exact maintainer-only |
|
/accept-visual 33680104028/1 No frame changed against the baseline. The report lists all twelve shots under Added and has no Changed or Removed section: core-collapsible--single-mode had no prior baseline, so this run records new coverage rather than a regression. The twelve are that one story across six themes in light and dark, and each shows the intended effect of this PR — the trigger label filling the row so the chevron sits at the far right — with no clipping and no label/chevron overlap in any theme. |
|
Visual changes accepted for |
|
/accept-visual 33737107383/1 Re-accepting after the release-metadata push invalidated the prior approval; the frames are identical to the ones reviewed then. All 12 are Added, with no Changed or Removed section: core-collapsible--single-mode had no baseline, so this records new coverage rather than waving a diff through. They are that one story across six themes in light and dark, each showing the intended result — label flush to the start edge, chevron at the far end, no clipping and no label/chevron overlap. |
|
Visual acceptance hit an infrastructure error. Retry only after the latest PR report shows a maintainer command; if no report appears, rerun CI. See this workflow run for details. |
The trigger is a `space-between` flex row, but its label span had no `flex-grow`, so the free space collected between the label and the chevron. A composed trigger — an `HStack` with a date, a count or a status on its right — had that element parked against the label with the gap stranded after it, unable to reach the edge that `space-between` implies. `flexGrow: 1` on the label is the whole change. A plain text trigger does not move: the label was already flush to the start edge and the chevron to the end, and the box that grew is one the text does not fill. The flex floor is deliberately left at `auto`, so no label can now be squeezed narrower than its own content and start overlapping the chevron. Co-authored-by: Cursor <[email protected]>
The scoped audit reports zero failures for Collapsible but a coverage gap, because nothing had ever written down *why* it is not applicable. It is not: the trigger is a space-between flex row with no physical side anywhere in it, and the chevron turns on the one axis that does not mirror. Co-authored-by: Cursor <[email protected]>
721637f to
99f762d
Compare
|
The red
Fix is up as #5996 (one line). Once that lands I'll rebase this and the checks should clear. |
|
Correction to the note above: I've closed #5996 rather than landing it, since the break is not mine to fix. The diagnosis is preserved on that PR for whoever owns it. Nothing here changes — the red |
josephfarina
left a comment
There was a problem hiding this comment.
Reviewed at exact head 99f762d. This is a compatible layout fix with no public API change: letting the existing trigger label fill the row preserves plain labels and fixes composed-trigger alignment. No code blocker found. Current CI failures are the shared search type-generation failure, not this change.
What
Collapsible's trigger is aspace-betweenflex row, but its label span had noflex-grow. So the free space collected between the label and the chevron, and a composed trigger — anHStackcarrying a date, a count or a status on its right — had that element parked against the label with the gap stranded after it, unable to reach the edge thatspace-betweenimplies.flexGrow: 1on the label is the whole change.Before / after
Shot on the case that found it: a mail thread whose message headers put a timestamp out by the chevron. Same markup in both, only the
flex-growdiffers.Before — the dates trail the addresses, 583px short of the chevron:
After — they sit where the trigger's own
space-betweensays they should:Why it is safe
A plain text trigger does not move. The label was already flush to the start edge and the chevron to the end; the box that grew is one the text does not fill, so nothing repaints differently.
The flex floor is deliberately left at
autorather than dropped to0. That is the part worth reviewing: withmin-width: 0a long label could be squeezed narrower than its own content and start overlapping the chevron. Leaving the floor alone means the label can grow but never shrink belowmin-content, so no trigger that fits today stops fitting.Test plan
vitest run packages/core/src/Collapsible— 70 passed, no changes needed.Collapsibleand aCollapsibleGroupat every density for movement. None.Changeset included.
Made with Cursor