Repository navigation
fix(Stepper): simplify collapse and context APIs - #6097
Conversation
|
/approve-spec 9aaf104 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
That The gate only accepts the exact current head, so post this instead: A new commit invalidates the command, so repeat it after any push. |
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsStepper (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. Stepper - 1 issue(s)
Visual RegressionStatus: No visual change across 2 compared shot(s). Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
9aaf104 to
a1d38d5
Compare
|
/approve-spec 9aaf104 |
|
That The gate only accepts the exact current head, so post this instead: A new commit invalidates the command, so repeat it after any push. |
|
/approve-spec a1d38d5 |
cixzhang
left a comment
There was a problem hiding this comment.
Custom descendants using the new registration API can still send users to a disabled step. After getIsDisabled() changes, Next keeps the target captured during the Stepper’s last render: the probe selected step 2, then selected step 3 only after an unrelated parent render. Please make compact activation use the current registration state without requiring that rerender.
Also, the NarrowCollapse story still calls its numeric 64 example “4rem.”
[Reviewed by Robohands]
1f79767 to
ac85d65
Compare
cixzhang
left a comment
There was a problem hiding this comment.
JavaScript consumers still receive stepCount, isCompact, and summarySlot from useStepperContext(), because the public hook returns the same runtime object as the internal hook. That leaves compact-layout implementation reachable despite the new contract and makes the cleanup incomplete. Please project a genuinely public value from useStepperContext() and add a runtime key assertion; keep useStepperInternalContext() for Step.
The stale registration target and “4rem” story label from the prior review are fixed.
[Reviewed by Robohands]
|
Thanks for the follow-up. The two findings from the prior review are addressed on
I also see the new runtime-surface finding: |
ac85d65 to
67b7cb7
Compare
|
Addressed the runtime-surface follow-up in
The prior findings remain fixed: activation re-reads Validation: 95 focused tests pass; core typecheck, strict lint, core build, knowledge, and changeset checks pass. Independent focused review found no findings. Ready for Robohands re-review. |
|
/approve-spec 67b7cb7 |
|
All checks on exact head |
cixzhang
left a comment
There was a problem hiding this comment.
Thanks, this resolves our stale registration, story label, and public runtime-context asks. The 447/448px boundary and focused tests are clean.
[Reviewed by Robohands]
Two commits, no conflicts, no file overlap with this branch's 22. - #6120 gives AvatarGroupOverflow its own audit coverage and story; - #6097 simplifies Stepper's collapse and context APIs. Stepper renders an IconButton, which this branch binds to the button pattern, so that coupling was checked rather than assumed: the incoming diff does not touch the IconButton call, and nothing here changes component behaviour. Neither commit touches internal/a11y-spec, the a11y stories, the workflows, or the Playwright config.
Summary
Stepper'shorizontalOptions.minimumStepWidthto numeric pixel values.registerStepfrom a disabled boolean to an optional{getIsDisabled}options object, withStepsupplying the getter.useStepperContext()receives exactly the supported runtime keys, while the built-inStepreceives compact-layout coordination throughuseStepperInternalContext().previousActiveStepandregisterStepon the public context while removingstepCount,isCompact,summarySlot,minimumStepWidth, andminStepWidthMeasureReffromStepperContextValueanduseStepperContextat both type and runtime boundaries.Public API
component:Stepper(authority: current)'7rem'with their intended pixel number; replaceregisterStep(index, isDisabled)withregisterStep(index, {getIsDisabled})or omit the options; stop reading the removed context fields.Testing
pnpm exec vitest run packages/core/src/Stepper/Stepper.test.tsx packages/core/src/Stepper/Stepper.public.test.ts— 95 tests passedpnpm -F @astryxdesign/core typecheckpnpm lint:strict— 0 errors (repository baseline warnings only)pnpm -F @astryxdesign/core buildpnpm check:knowledgepnpm check:changesets