refactor(web-react): extract HelperText and move useAriaIds to shared hooks#2541
Closed
crishpeen wants to merge 1 commit intorelease/v5-essencefrom
Closed
refactor(web-react): extract HelperText and move useAriaIds to shared hooks#2541crishpeen wants to merge 1 commit intorelease/v5-essencefrom
HelperText and move useAriaIds to shared hooks#2541crishpeen wants to merge 1 commit intorelease/v5-essencefrom
Conversation
…ared hooks #DS-2398
✅ Deploy Preview for spirit-design-system ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
|
Update the demo to match the web! |
literat
reviewed
Mar 16, 2026
dlouhak
reviewed
Mar 16, 2026
Contributor
dlouhak
left a comment
There was a problem hiding this comment.
Could you please take a look on this custom form field components? It's not valid due to extractions.
(also in Checkbox, Radio)
packages/web-react/src/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.tsx
Show resolved
Hide resolved
packages/web-react/src/components/UNSTABLE_FileUpload/UNSTABLE_FileUpload.tsx
Show resolved
Hide resolved
Member
Author
|
fixed comments in #2547, closing this in its favour |
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.
Description
Extract
HelperTextinto its own component and moveuseAriaIdsto shared hooks.Fieldto standaloneHelperTextcomponent with its own folder (stories, demo, figma, tests, README). UsesPropsContextforisDisabledandformFieldVariant; prop priority is direct props > context > defaultProps. IntroducedFormFieldVariantsconstant (BOX, INLINE, ITEM) and use it everywhere instead of string literals.components/Field/useAriaIds.tsxtohooks/useAriaIds.ts; re-exported fromFieldfor backward compatibility. Tests moved tohooks/__tests__/useAriaIds.test.tsxand expanded.PropsProviderwithisDisabledandformFieldVariantsoHelperText(and later ValidationText) receive correct styling.Additional context
HelperTextis no longer exported fromField; import fromHelperTextor the package root.HelperText.test.tsxanduseAriaIdstests inhooks/__tests__/useAriaIds.test.tsx.Issue reference
https://jira.almacareer.tech/browse/DS-2398