fix: SW-2044 consistent focus state in PlateMapEditor custom-render story#181
Open
boramyi-ts wants to merge 1 commit into
Open
fix: SW-2044 consistent focus state in PlateMapEditor custom-render story#181boramyi-ts wants to merge 1 commit into
boramyi-ts wants to merge 1 commit into
Conversation
…tory The "Form: custom render + integer parsing" story rendered the Custom field as a hand-rolled <input> with ad-hoc classes, so it fell back to the browser's default focus outline while the Count/Weight fields (ui-kit <Input>) showed the design-system focus ring (border-ring + shadow-focus). Within one form the focus states looked inconsistent. Use the ui-kit <Input> in the custom render so all three fields share the same focus treatment (and resting size/radius). The render prop still demonstrates a genuine custom composition (Input + "N sel" badge), and the aria-label is preserved so the play-function test is unaffected. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
boramyi-ts
temporarily deployed
to
artifactory-prod
July 16, 2026 16:47 — with
GitHub Actions
Inactive
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Coverage Report
File CoverageNo changed files found. |
boramyi-ts
enabled auto-merge (squash)
July 16, 2026 16:56
owilliams-tetrascience
approved these changes
Jul 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes SW-2044 — inconsistent focus states in the Plate Map Editor → "Form: custom render + integer parsing" story (a finding from the SW-2041 visual-design audit).
The story rendered the Custom field as a hand-rolled
<input>with ad-hoc classes (rounded border px-1 py-0.5 text-xs), so it fell back to the browser's default focus outline — while the sibling Count and Weight fields use the ui-kit<Input>, which shows the design-system focus treatment (border-ring+shadow-focus). Within a single form the three fields focused differently (and were different heights/radii at rest).Change
Use the ui-kit
<Input>inside the customrenderprop so all three fields share the same focus ring, height, and radius. The render prop still demonstrates a genuine custom composition (Input+ "N sel" badge in a flex row), and thearia-label="custom-render-input"is preserved so the play-function test is unchanged.Before / After
Story: Design Patterns → Plate Map Editor → "Form: custom render + integer parsing"
text-xs, thin square-ish borderborder-ring+shadow-focus| After | ui-kit ring:

border-ring+shadow-focus| ui-kit ring:border-ring+shadow-focus|Before screenshots are attached to the Jira ticket. After (all three fields now share the same focus ring and resting size) is shown in the PR discussion.
Verification
yarn typecheck— cleanyarn lint— clean for the changed file (pre-existing warnings are only in the untracked_prototypes/sample)yarn test:storybook(PlateMapEditor suite) — 44/44 pass, including this story's play functionborder-ring+shadow-focusringNotes
Scope is the Storybook demo only — no library/runtime code changed.
renderremains an arbitrary-JSX escape hatch; this just makes the shipped example model best practice (compose from the ui-kit).