Repository navigation
Conversation
Co-locate Rotation, ExpandInCollapseOut, and FadeInSlideOut stories into packages/gamut/src/Animation (behavior + a11y via play), and remove the old styleguide Animations folder. Also drop the now-empty Atoms About/AboutToC. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-locate Button atoms (ButtonExamples, CTAButton, FillButton, IconButton, StrokeButton, TextButton) as stories under Actions/Buttons, folding the old IconButton/TextButton node tests into play assertions. Add a variant argType + full variant/size matrix (with a labeled column) to the examples grid, and a storySort pinning Button Examples first in the folder. Remove the old styleguide Buttons folder and the Button __tests__. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-locate Badge, ProgressBar, RadialProgress, Shimmer, Spinner, and FeatureShimmer as stories under the Status category, with behavior/a11y assertions in play functions. Keep node tests only where a browser play can't reach: ProgressBar's useLogicalProperties width matrix and FeatureShimmer's reduced-motion hook mock (both co-located). Remove the old styleguide folders (Badge, ProgressBar, RadialProgress, FeatureShimmer, Loaders) and the Button-style __tests__ dirs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-locate the story under Navigation and move the href check into a play function. Remove the Jest test and the old styleguide story. Co-Authored-By: Grok 4.7 <noreply@x.ai> Co-authored-by: Cursor <cursoragent@cursor.com>
Co-locate both under Utilities, fold their Jest coverage into play functions, and remove the old styleguide stories and node tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-locate both under Containers. Fold the Card render tests and the Drawer expand/collapse tests into play functions, keep only the node-only useCardElevation logic, and add variant/shadow/borderRadius argTypes to Card. Remove the old styleguide stories. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-locate both under Actions and fold their Jest coverage into play functions (roles, callbacks, disabled states, aria-label), then remove the node tests and old styleguide stories. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-locate the story under Overlays and move the node tests out of __tests__ (PopoverContainer.test.tsx, hooks.test.tsx, testUtils.ts), excluding the test helper from the lib build. Disable FocusTrap autofocus in the catalog stories so the docs page no longer hijacks scroll, and remove the old styleguide story. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Move the useCardElevation test to Card/Card.test.tsx to match the co-located convention used by the other migrated components. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-locate all Form stories under Inputs & forms (inputs un-nested, form elements in a Form subfolder). Fold the input node tests (Input, Select, Checkbox, Radio, RadioGroup, FormGroup) into play functions and relocate the SelectDropdown suites, utils, and hook out of __tests__ as node Jest. Add a core open-and-select play for SelectDropdown. Remove the old styleguide FormElements and FormInputs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Move Checkbox, Radio, and SelectDropdown into their own folders under Form/inputs, each with an index and co-located styles - Replace the Form/styles barrel with Form/styles.ts - Migrate SelectDropdown jest tests (default, empty, grouped) to story play functions and remove the now-unused Form/__fixtures__ - Leave stories failing with TODOs where plays expose real component bugs: Remove all button aria-hidden-focus, empty menu listbox aria-required-children, and duplicate ids breaking inputProps.combobox Co-authored-by: Cursor <cursoragent@cursor.com>
Tighten Form story assertions, rename Error stories to ErrorState, and add coverage for SelectDropdown inputProps and validation message precedence. Convert multi-line TODO comments to block comments. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
@skillsoft/eslint-plugin-gamut
@skillsoft/gamut
@skillsoft/gamut-agent-tools
@skillsoft/gamut-codemods
@skillsoft/gamut-icons
@skillsoft/gamut-illustrations
@skillsoft/gamut-patterns
@skillsoft/gamut-styles
@skillsoft/gamut-tests
@skillsoft/variance
commit: |
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Drop inherited aria-hidden from RemoveAllButton, disable aria-required-children on empty-menu stories, and use distinct id/name in Custom Input Props. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Separate ValueWithoutOptions into empty and undefined options stories, and keep the component JSDoc off the Storybook docs page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
The move breaks codemod manifest resolution and documentation story IDs, while the clear control lacks Space and click activation.
1 open issue
What changed in this PR
Migrates Form components into Gamut’s colocated Storybook setup, replacing browser-facing Jest tests with story plays while retaining logic tests beside their source.
Changes:
- Moves Form stories under Inputs & forms and removes the legacy styleguide pages and test fixtures.
- Colocates Checkbox, Radio, and SelectDropdown implementations and styles while preserving public exports.
- Removes inherited
aria-hiddenfrom SelectDropdown’s clear-all control so screen readers can discover it.
| File | Description |
|---|---|
packages/styleguide/src/lib/Atoms/FormInputs/TextArea/TextArea.mdx |
Removes legacy TextArea documentation. |
packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/translationsTable.tsx |
Removes the legacy translations table. |
packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/SelectDropdown.mdx |
Removes legacy SelectDropdown documentation. |
packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/creatablePropsTable.tsx |
Removes the legacy creatable-props table. |
packages/styleguide/src/lib/Atoms/FormInputs/SelectDropdown/controlledModeTable.tsx |
Removes the legacy selection-mode table. |
packages/styleguide/src/lib/Atoms/FormInputs/Select/Select.mdx |
Removes legacy Select documentation. |
packages/styleguide/src/lib/Atoms/FormInputs/Radio/Radio.stories.tsx |
Removes the old Radio stories. |
packages/styleguide/src/lib/Atoms/FormInputs/Radio/Radio.mdx |
Removes legacy Radio documentation. |
packages/styleguide/src/lib/Atoms/FormInputs/Input/Input.mdx |
Removes legacy Input documentation. |
packages/styleguide/src/lib/Atoms/FormInputs/Checkbox/Checkbox.mdx |
Removes legacy Checkbox documentation. |
packages/styleguide/src/lib/Atoms/FormInputs/About.mdx |
Removes the old inputs index. |
packages/styleguide/src/lib/Atoms/FormElements/FormRequiredText/FormRequiredText.mdx |
Removes legacy required-text documentation. |
packages/styleguide/src/lib/Atoms/FormElements/FormGroupLabel/FormGroupLabel.mdx |
Removes legacy group-label documentation. |
packages/styleguide/src/lib/Atoms/FormElements/FormGroupDescription/FormGroupDescription.mdx |
Removes legacy group-description documentation. |
packages/styleguide/src/lib/Atoms/FormElements/FormGroup/FormGroup.mdx |
Removes legacy FormGroup documentation. |
packages/styleguide/src/lib/Atoms/FormElements/Form/Form.mdx |
Removes legacy Form documentation. |
packages/styleguide/src/lib/Atoms/FormElements/About.mdx |
Removes the old form-elements index. |
packages/gamut/src/Form/utils.tsx |
Updates relocated SelectDropdown type imports. |
packages/gamut/src/Form/utils.test.tsx |
Colocates utility tests and updates imports. |
packages/gamut/src/Form/styles/index.ts |
Removes the shared styles barrel. |
packages/gamut/src/Form/styles.ts |
Houses shared form styling. |
packages/gamut/src/Form/inputs/TextArea.stories.tsx |
Colocates TextArea stories and adds a value assertion. |
packages/gamut/src/Form/inputs/SelectDropdown/types/styles.ts |
Relocates styling types. |
packages/gamut/src/Form/inputs/SelectDropdown/types/options.ts |
Updates option-type imports after relocation. |
packages/gamut/src/Form/inputs/SelectDropdown/types/internal.ts |
Updates internal-type imports after relocation. |
packages/gamut/src/Form/inputs/SelectDropdown/types/index.ts |
Relocates the type export barrel. |
packages/gamut/src/Form/inputs/SelectDropdown/types/component-props.ts |
Updates component-prop imports after relocation. |
packages/gamut/src/Form/inputs/SelectDropdown/SelectDropdown.tsx |
Relocates the dropdown implementation. |
packages/gamut/src/Form/inputs/SelectDropdown/SelectDropdown.stories.tsx |
Colocates stories and adds interaction plays. |
packages/gamut/src/Form/inputs/SelectDropdown/index.tsx |
Preserves dropdown exports at the new location. |
packages/gamut/src/Form/inputs/SelectDropdown/hooks/useSelectOptions.ts |
Updates option-hook imports after relocation. |
packages/gamut/src/Form/inputs/SelectDropdown/hooks/useSelectHandlers.ts |
Updates handler-hook imports after relocation. |
packages/gamut/src/Form/inputs/SelectDropdown/hooks/useNoOptionsAnnouncement.ts |
Relocates announcement logic. |
packages/gamut/src/Form/inputs/SelectDropdown/hooks/useNoOptionsAnnouncement.test.tsx |
Colocates announcement-hook tests. |
packages/gamut/src/Form/inputs/SelectDropdown/elements/options.tsx |
Updates option-element imports after relocation. |
packages/gamut/src/Form/inputs/SelectDropdown/elements/multi-value.tsx |
Exposes the clear-all control to screen readers. |
packages/gamut/src/Form/inputs/SelectDropdown/elements/index.ts |
Relocates dropdown element exports. |
packages/gamut/src/Form/inputs/SelectDropdown/elements/controls.tsx |
Relocates the dropdown indicator. |
packages/gamut/src/Form/inputs/SelectDropdown/elements/containers.tsx |
Relocates react-select wrappers. |
packages/gamut/src/Form/inputs/SelectDropdown/elements/constants.ts |
Relocates indicator constants. |
packages/gamut/src/Form/inputs/SelectDropdown/core/utils.ts |
Updates core utility imports after relocation. |
packages/gamut/src/Form/inputs/SelectDropdown/core/utils.test.tsx |
Colocates dropdown utility tests. |
packages/gamut/src/Form/inputs/SelectDropdown/core/translations.ts |
Relocates translation definitions and defaults. |
packages/gamut/src/Form/inputs/SelectDropdown/core/styles.ts |
Updates relocated style dependencies. |
packages/gamut/src/Form/inputs/SelectDropdown/core/constants.ts |
Relocates component overrides and constants. |
packages/gamut/src/Form/inputs/Select.stories.tsx |
Colocates Select stories and option assertions. |
packages/gamut/src/Form/inputs/Radio/styles.ts |
Colocates Radio styles. |
packages/gamut/src/Form/inputs/Radio/RadioGroup.tsx |
Relocates RadioGroup and updates imports. |
packages/gamut/src/Form/inputs/Radio/Radio.tsx |
Updates Radio imports for its new folder. |
packages/gamut/src/Form/inputs/Radio/Radio.stories.tsx |
Adds colocated Radio and RadioGroup plays. |
packages/gamut/src/Form/inputs/Radio/index.tsx |
Exports Radio and RadioGroup together. |
packages/gamut/src/Form/inputs/Input.stories.tsx |
Colocates Input stories and adds type/icon assertions. |
packages/gamut/src/Form/inputs/Checkbox/types.tsx |
Colocates Checkbox prop unions. |
packages/gamut/src/Form/inputs/Checkbox/styles.ts |
Colocates Checkbox styles. |
packages/gamut/src/Form/inputs/Checkbox/index.tsx |
Preserves Checkbox component and type exports. |
packages/gamut/src/Form/inputs/Checkbox/Checkbox.tsx |
Updates Checkbox imports for its new folder. |
packages/gamut/src/Form/inputs/Checkbox/Checkbox.stories.tsx |
Adds state, callback, and InfoTip plays. |
packages/gamut/src/Form/index.tsx |
Redirects public exports to relocated components. |
packages/gamut/src/Form/elements/FormRequiredText.stories.tsx |
Colocates required-text stories. |
packages/gamut/src/Form/elements/FormGroupLabel.stories.tsx |
Colocates group-label stories. |
packages/gamut/src/Form/elements/FormGroupDescription.stories.tsx |
Colocates group-description stories. |
packages/gamut/src/Form/elements/FormGroup.stories.tsx |
Adds label, error, and InfoTip assertions. |
packages/gamut/src/Form/elements/Form.stories.tsx |
Colocates Form stories and adds a render check. |
packages/gamut/src/Form/__tests__/testUtils.ts |
Removes obsolete test helpers. |
packages/gamut/src/Form/__tests__/SelectDropdownGrouped.test.tsx |
Removes grouped-dropdown Jest tests. |
packages/gamut/src/Form/__tests__/SelectDropdownEmpty.test.tsx |
Removes empty-dropdown Jest tests. |
packages/gamut/src/Form/__tests__/SelectDropdown.test.tsx |
Removes dropdown behavior Jest tests. |
packages/gamut/src/Form/__tests__/Select.test.tsx |
Removes Select Jest tests. |
packages/gamut/src/Form/__tests__/RadioGroup.test.tsx |
Removes RadioGroup Jest tests. |
packages/gamut/src/Form/__tests__/Radio.test.tsx |
Removes Radio Jest tests. |
packages/gamut/src/Form/__tests__/Input.test.tsx |
Removes Input Jest tests. |
packages/gamut/src/Form/__tests__/FormGroup.test.tsx |
Removes FormGroup Jest tests. |
packages/gamut/src/Form/__tests__/Checkbox.test.tsx |
Removes Checkbox Jest tests. |
packages/gamut/src/Form/__snapshots__/utils.test.tsx.snap |
Relocates retained utility snapshots. |
packages/gamut/src/Form/__fixtures__/utils.tsx |
Removes obsolete dropdown fixtures. |
packages/gamut-agent-tools/skills/gamut-forms/SKILL.md |
Updates Radio source and story references. |
.changeset/quiet-forms-move.md |
Records the migration and accessibility patch. |
Review effort: Balanced
| export * from './inputs/Checkbox'; | ||
| export * from './inputs/Select'; | ||
| export * from './SelectDropdown'; | ||
| export * from './inputs/SelectDropdown'; |
This branch has not been deployed
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.

Overview
Moves the Form components into the gamut Storybook, the same way the earlier Atoms and Status migrations did. Their stories now live next to the source and run as tests through
@storybook/addon-vitest. The old styleguideFormElementsandFormInputsfolders are deleted.What moved
Form,FormGroup,FormGroupDescription,FormGroupLabel,FormRequiredText): stories are now inpackages/gamut/src/Form/elements/, under "Inputs & forms" in Storybook.Input,Select,TextArea,Checkbox,Radio/RadioGroup,SelectDropdown): stories are now inpackages/gamut/src/Form/inputs/.Checkbox,Radio, andSelectDropdowneach get their own folder with anindex.tsxand their ownstyles.ts, so each component's styles sit with the component instead of in a sharedForm/styles/folder.Form/styles/is gone: its only file left,shared-system-props.ts, is nowForm/styles.ts.Checkbox-styles.tsandRadio-styles.tsbecameinputs/Checkbox/styles.tsandinputs/Radio/styles.ts.Form/index.tsxpoints at the new paths. The public exports are unchanged:RadioGroupand the checkbox types still come out of the new folderindex.tsxfiles.Tests → plays
Checkbox,FormGroup,Input,Radio,RadioGroup,Select, and the threeSelectDropdownfiles covering default, empty, and grouped) is now a storyplay. That covers roles, labels,aria-*wiring, change and create callbacks, keyboard navigation, the no-options announcement, translations,inputProps(hidden and combobox), and which validation message wins when several are set. The only Jest tests left are logic tests a browserplaycan't reach:Form/utils.test.tsx,SelectDropdown/core/utils.test.tsx, andSelectDropdown/hooks/useNoOptionsAnnouncement.test.tsx. Each one now sits next to its source instead of in__tests__/.Form/__fixtures__/andForm/__tests__/testUtils.tsare deleted because nothing uses them anymore.gamut-formsagent skill now points at the new Radio file paths and uses the Radio story as its reference instead of the deleted.mdx.Bugs the plays found
Every story now runs an axe a11y check after its
play. The old Jest suites never opened the menu or left multi-select values selected, so these bugs never showed up before.aria-hidden(fixed). react-select passesaria-hidden="true"in the clear indicator'sinnerProps.RemoveAllButtonspread those props onto a div that also hasrole="button"andtabIndex={0}. Keyboard users could tab to it, but screen readers didn't announce it.RemoveAllButtonnow drops the inheritedaria-hidden, so it's announced as "Remove all selected" (or the translated label). This is the only runtime change in the PR.aria-required-children(rule disabled, follow-up needed). When there are no options, react-select still rendersrole="listbox", with only the "No options" text inside it.BaseandSearchableturn that rule off and carry a TODO. The fix is to stop rendering the message inside the listbox. Screen reader users don't lose anything: the message is already announced by SelectDropdown's own live region.idandnamedropsinputProps.comboboxwhen not searchable (story changed, component unchanged). Whenid === name, the container div and the combobox input end up with the same id.CustomValueContainerusesdocument.getElementByIdto find the input. It finds the container first and quietly skips applying the combobox props. TheCustom Input Propsstory now uses different values foridandname, andCustom Input Props Distinct Idsstill covers that path. The component bug is still there for any consumer who passes the same value for both.Known limitations
aria-required-childrenstays off forBaseandSearchableuntil the empty-menu fix lands.Notes for reviewers
SelectDropdown/elements/multi-value.tsx.SelectDropdown.stories.tsxis big (~2.5k lines) because it now holds all three old SelectDropdown Jest files.LinkToids in other styleguide.mdxfiles are left alone on purpose, since those files are being deleted.PR Checklist
Testing Instructions
yarn test:stories packages/gamut/src/Form(Node 22.22.2). All 11 files and 119 tests should pass.yarn nx test gamutand check that the remaining Form Jest tests pass.yarn start:storybookand open "Inputs & forms". Check that every Form element and input story renders and that the old styleguide Form pages are gone.🤖 Generated with Claude Code