Repository navigation
Conversation
Add disabled to BaseInputProps and ButtonBaseProps so Storybook's propFilter keeps it. Move label from BaseInputProps to FormGroup, its only consumer, and fix the FormGroupDefault story's htmlFor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Wire args through in LayoutGrid, GridBox, InfoTip, Tabs, ListCol, FormGroup and SelectDropdown playgrounds; drop GridBox FourColumnGrid. Co-Authored-By: Claude Opus 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: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
=========================================
+ Coverage 0 77.20% +77.20%
=========================================
Files 0 464 +464
Lines 0 32091 +32091
Branches 0 1494 +1494
=========================================
+ Hits 0 24776 +24776
- Misses 0 7308 +7308
- Partials 0 7 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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
This is the first phase of the Storybook story audit. The goal of the audit is to delete stories that exist only to show a single prop or variant, since the playground and its controls should cover those. Before deleting anything, the playgrounds need to actually work, so this PR fixes the playgrounds and controls that were broken or missing. Removals and merges come in a follow-up branched off this one.
disabledcontrols for inputs and buttonsRoot cause: the
propFilterinpackages/.storybook/main.tsdrops props that are only declared innode_modules.disabledcame from React'sInputHTMLAttributes/ButtonHTMLAttributes, so it never showed up in the props table or controls for Input, TextArea, Select, Radio, RadioGroup, Checkbox, or any button.Fix: declare
disabled?: booleanonBaseInputPropsandButtonBasePropsso docgen sees it in gamut source. The input components now pick or extend it fromBaseInputPropsinstead of the HTML attribute types. The button version has a JSDoc noting that a disabled button with anhrefrenders as abutton. This fixes the type at the source rather than adding argTypes to each story, and it removes the manualdisabledargTypes from the FillButton and Pagination stories.While in there:
label?: stringmoved offBaseInputProps.FormGroupwas its only real consumer, so it's declared there now (and onDatePickerInputProps, which relied on it). Radio and TextArea no longer needOmit<BaseInputProps, 'label'>.requiredredeclaration fromConnectedFormGroupBaseProps.htmlForJSDoc that was sitting on the wrong props (FormGroup, FormGroupLabelinfotip, Inputplaceholder). FormGroupLabel'sinfotipnow has its real description.placeholderso it shows up in controls.Input/FormGroupDefaultpassedidtoFormGroupinstead ofhtmlFor, so the label wasn't associated with the input.Playgrounds that ignored their args
These stories either didn't spread
argsinto the component or didn't render enough for the controls to do anything visible:rowHeightdefaults to'75'so changes are visible.Defaultnow starts as a four-column grid (columnGap,gridAutoColumns,gridAutoFlowin meta args) with four children.FourColumnGridis deleted since the playground now shows the same thing, and its section ingrid-box.mdxis folded into the Playground section.Defaultrenders the tip next to some text so placement and alignment controls have context.Defaultno longer force-mounts panels, so it reflects the component's real behavior. Its play checks that an inactive panel isn't rendered.ListCol(with a highlighted background sosize,fill, andjustifyare visible) instead of onto the parentList. Stories are typedStoryObj<typeof ListCol>throughout, and the shared scrolling list is pulled into one helper.DefaultwireshtmlForto the input'sid, passesdisabled/errorthrough to the input, and its play checks the label association.Defaultis now the first story, andinputWidth/dropdownWidthget text controls (they'restring | number, which Storybook has no built-in control for).Known limitations
labeloffBaseInputPropschanges an exported type, so this needs one before merging.fillattribute warning (already ticketed) and ListColHeaderColumnCellsrenderingtheadinsidetbody(existing TODO).organisms-story ids. Fixing those is part of the follow-up.Notes for reviewers
PR Checklist
Testing Instructions
disabledshows up in the props table and its control disables the component.Input/FormGroupDefault, click the label, and check that the input gets focus.yarn test:storiesfor the touched components and check that they pass.PR Links and Envs
🤖 Generated with Claude Code