Repository navigation
fix(core): a vertical Step with separated indicators keeps its content within the step - #12310
Conversation
The vertical step body is a flex item of the step row. Its default min-width: auto floored it at its content min-content width, so a wide field in an expanded step pushed the body past the step and the page scrolled sideways on a phone. The body now resets the floor, as the horizontal step and the on-track body already do.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Step | 31.6 kB (+2 B) · 5.6 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Stepper | 67.6 kB (0) · 10.9 kB CSS (0) | — | ✓ · ✓ · ✓ |
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.
Requesting changes for one wording fix; the layout fix itself is right.
- The release note and the title say every vertical
Stepperstep had this bug, but steps withindicatorPosition="on-track"already kept their content inside the step, so please name the separated (default) layout, for example: "A verticalStepperstep with separated indicators (the default) keeps its content within the step."
In Chromium the change does what it says for the default layout: at 390 and 375 px the inline form-wizard step stays on screen and the Selector menu opens inside the viewport, a long label ellipsizes at 320 px, and the 1280 px layout is pixel-identical. A non-blocking note on the new source comment's sentence length is inline.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Release note and title, a vertical step keeps its content within the step: false for on-track vertical steps, which already did (identical frames at 390 px); verified for the separated layout.
- Release note, before the fix a wide field pushed the body past the step, the page scrolled sideways, text was cut and the dropdown opened off-screen: verified for the separated layout (template step body to 441 px at 390 px; menu partly past the right edge).
- Release note, the body now shrinks to the step's width and content wraps inside it: verified (
Step.tsx:353; the template body ends at the step's edge). - Description, the body is a
flex: 1item floored bymin-width: auto: verified (Step.tsx:327-354). - Description, the horizontal step and the on-track vertical body already reset the floor: verified (
Step.tsx:372,Step.tsx:891). - Description, one declaration with no API, visual or default change: verified (public surface unchanged; frames identical when content fits).
- Description, measured widths before and after (content area, field anchor and menu at 390, 375 and 1280 px): verified in direction; offsets depend on the host page (here a 441 px body, field 87-396 px and menu 52-411 px before, field 87-309 px after at 390 px; menu 298-1012 px at 1280 px on both).
- Description, a wider phone and dark-mode page set passes: not reproduced; the set is not in the repository.
- Description, the new test fails without the fix: verified (fails on the base, passes on the head).
- Description, 118 Stepper tests pass: verified.
- Description, no new public API, default or interaction model: verified.
- Commit message, the body resets the floor as the horizontal and on-track bodies do: verified.
.changeset/stepper-vertical-body-fits.md: scope finding above.packages/core/src/Stepper/Step.tsx: clear; non-blocking comment-style note.packages/core/src/Stepper/Stepper.test.tsx: clear.
There was a problem hiding this comment.
Approved pending CI: CI is still running on this head.
The release note and the title now name the separated layout, and the source comment keeps only its reason, so both earlier points are resolved. In Chromium the fix does what it says: at 390 and 375 px the inline form-wizard step stays on screen and the Selector menu opens inside the viewport, a long label ellipsizes at 320 px, and on-track steps and the 1280 px layout are unchanged.
Claims and files checked
Review mode: incremental; reason: none
- Release note and title, a vertical step with separated indicators (the default) keeps its content within the step: verified (separated is the default position,
Stepper.tsx:244; the step body now ends at the step's edge). - Release note, before the fix a wide field pushed the body past the step, the page scrolled sideways, text was cut and the dropdown opened off-screen: verified at 390 and 375 px (template step body to 441 px; the menu ends past the right edge).
- Release note, the body now shrinks to the step's width and the content wraps inside it: verified (
Step.tsx:352); text that can wrap wraps, and one-line descriptions ellipsize under their own component's rule. - Description, the body is a
flex: 1item floored bymin-width: auto: verified (Step.tsx:327-353). - Description, the horizontal step and the on-track vertical body already reset the floor: verified (
Step.tsx:371,Step.tsx:890). - Description, content area, field and menu bounds before and after at 390, 375 and 1280 px: verified in direction; the offsets depend on the host page.
- Description, a wider phone and dark-mode page set gains this page and loses none: not reproduced; the set is not in the repository.
- Description, the new test fails without the fix: verified (fails on the base, passes on the head).
- Description, 118 Stepper tests pass: verified.
- Description, one declaration with no API, visual representation or default change: verified (public surface unchanged; frames identical where content fits).
- Latest commit message, the note names the separated layout and the comment is shorter: verified.
.changeset/stepper-vertical-body-fits.md: clear.packages/core/src/Stepper/Step.tsx: clear.packages/core/src/Stepper/Stepper.test.tsx: clear.
User impact
A vertical
Stepperwith separated indicators (the default) that expands a step's content (an inline wizard) breaks on a phone when that content holds a wide field such as aSelector. The step's body grows wider than the step, so the whole content area scrolls sideways, field text is cut at the right edge, and theSelectormenu opens partly off-screen. At 390 px and 375 px wide the content area was 425 px wide. After this fix it fits the screen.Problem and solution fit
flex: 1item in the step's row, and a flex item's defaultmin-width: autofloors it at its content's min-content width. One wide descendant sets that floor above the step's width.The fix resets the floor on the vertical body (
min-width: 0), as the horizontal step and the on-track vertical body already do. The body then takes the step's width, and its content wraps inside it.Expected behavior and authority
A step's content stays within the step. The horizontal step and the on-track vertical body already do this: each already resets the same floor for the same reason.
Smallest restoration
One declaration on the vertical step body. No API, visual or default changes.
Evidence
Selectoranchor spans 58 to 417 px and its menu 31 to 390 px.Selectoranchor spans 58 to 362 px, and its menu opens aligned with it.min-width: 0. It fails without the fix.Scope
Components: Stepper
Testing
vitest run packages/core/src/Stepper: 118 tests pass.Selectoranchor and menu bounds before and after the change.