Repository navigation
Give NumberInput steppers a dedicated icon slot - #5466
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 ComponentsIcon (@astryxdesign/core) · View in Storybook
NumberInput (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 1 accessibility violation(s) found — 1 serious. Icon - 1 issue(s)
Visual Regression6 of 1184 shot(s) changed. View the report To accept these exact frames: A change here is a question, not a failure: check whether the after is the
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
8770ad5 to
8fac0ee
Compare
8fac0ee to
7c28c26
Compare
cixzhang
left a comment
There was a problem hiding this comment.
Thanks Ruby — steppers wanting their own caret is a real gap, and the centring fix was a good catch.
Ruling: component-scoped icons go through the namespaced extension keys; the core IconName union stays for generic concepts. None of its 28 names names a component, and widening it adds a required key to every downstream IconRegistry — a CLI-scaffolded theme stops compiling on a patch bump. getExtendedIcon is the seam that exists for this, and the richtext toolbar already runs 15 namespaced keys through it.
<Icon icon="numberInput:stepperDown" size="xsm" color="inherit" />That doesn't typecheck yet — Icon.tsx:204 is IconType | IconName. That line is ours, not yours; PR going up now and I'll link it here.
One more, separable: the filled triangle in all seven bundled themes changes every themed app's steppers on a patch, and the body doesn't say the chevron was wrong.
[Reviewed by Robohands]
|
Correction — the head moved to Two things at the current head:
[Reviewed by Robohands] |
|
The enabling line is up: #5475. [Reviewed by Robohands] |
7c28c26 to
d8176bc
Compare
|
Addressed the review feedback in the latest revision:
The branch is temporarily stacked on #5475 so it typechecks before that PR lands. Core build, full Core tests, typechecks, changesets, formatting, and zero-warning changed-file strict lint pass locally. The unrelated visual harness fix is already separate in #5477. |
A glyph owned by one component or library gets a namespaced key (numberInput:stepperDown, richtext:bold) rather than a new member of the shared IconName union: adding to the union makes every downstream IconRegistry grow a required key, so a scaffolded theme stops compiling on a patch bump. The registry already resolved those keys; the prop, the hook and defineTheme did not accept them, so the only way to keep Icon's size, color and xstyle was to widen the union. They accept them now. getIconRegistry() still returns built-in names only.
Summary: - resolve both NumberInput steppers through `numberInput:stepperDown` - provide a compact centered Core fallback without widening `IconName` or requiring new keys in downstream theme registries - cover fallback and override behavior with focused tests and patch release metadata Test Plan: - pnpm -F @astryxdesign/core build - pnpm exec vitest run packages/core - pnpm exec vitest run packages/core/src/Icon/globalIconRegistry.test.tsx packages/core/src/NumberInput/NumberInput.test.tsx - pnpm -F @astryxdesign/core typecheck - pnpm -F @astryxdesign/core typecheck:docs - pnpm check:changesets - pnpm exec prettier --check <changed files> - ASTRYX_STRICT_LINT=1 pnpm exec eslint --max-warnings=0 <changed source files>
d8176bc to
b16aaf8
Compare
imdreamrunner
left a comment
There was a problem hiding this comment.
Cindy’s feedback is addressed: both steppers now use the namespaced numberInput:stepperDown key, IconName and downstream-required registry keys stay unchanged, bundled themes are untouched, and Core owns the fallback. The stray generated test file is gone and the changeset credit is corrected. I also verified the stacked #5475 files are byte-identical to its latest head. All substantive CI checks are green.\n\n[Reviewed by Agentcloud]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the mechanical main refresh; the reviewed change is unchanged.\n\n[Reviewed by Robohands]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the mechanical main refresh; the reviewed change is unchanged.
[Reviewed by Robohands]
cixzhang
left a comment
There was a problem hiding this comment.
Re-approving after the mechanical main refresh; the reviewed change is unchanged.
[Reviewed by Robohands]
|
/accept-visual 33045921337/1 These 208 frames add Icon and NumberInput coverage; no existing pixels changed, and engineering/design review verified the namespaced stepper icon behavior. |
|
Visual changes accepted for |



Summary
NumberInputstepper buttons through the component-ownednumberInput:stepperDownextension keychevronDownsemantic unchangedIconNameand the requiredIconRegistrykeys do not changeDependency
Depends on #5475 for typed namespaced icon keys. This branch is stacked on that PR so the implementation and tests typecheck together; it will collapse back to the six NumberInput-specific files once #5475 lands.
#5477 separately shipped the built theme artifacts. #5482 completes that infrastructure fix by rebuilding their Core dependency in
pr-visual; neither workflow change is included here.Test plan
pnpm -F @astryxdesign/core buildpnpm exec vitest run packages/core--max-warnings=0on all changed source filesVisual behavior
The fallback remains the approved compact chevron at
xsm(12×12px). The painted 6×3px chevron is horizontally centered; the increment stepper rotates the same glyph 180°. No horizontal translation is applied.