You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds operative Storybook controls for the preview Layout stories in both React and Web Components. The stories now expose matching density and size controls with default args, keeping the control surface focused on props that actually affect the rendered layout demo.
Changelog
New
Added default Storybook args for density and size to the React Preview/preview__Layout story.
Added default Storybook args for density and size to the Web Components Preview/preview__Layout story.
Changed
Added explicit density radio controls and size select controls for React and Web Components Layout stories.
Limited visible controls to the operative density and size args.
Moved Web Components Layout controls to meta-level story configuration for parity with the React story and shared defaults.
Removed
None.
Testing / Reviewing
Use the repository Node version:
nvm use
yarn install --immutable
Open React Storybook:
yarn workspace @carbon/react storybook
Open the Preview/preview__Layout default story and verify:
The controls panel shows density and size.
Changing density updates the rendered <Layout> context.
Changing size updates the rendered <Layout> context.
No unrelated or inoperative controls are shown.
Open Web Components Storybook:
yarn workspace @carbon/web-components storybook
Open the Preview/preview__Layout default story and verify:
The controls panel shows density and size.
Changing density updates the rendered <cds-layout> context.
Changing size updates the rendered <cds-layout> context.
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
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.
Closes #20974
Adds operative Storybook controls for the preview
Layoutstories in both React and Web Components. The stories now expose matchingdensityandsizecontrols with default args, keeping the control surface focused on props that actually affect the rendered layout demo.Changelog
New
densityandsizeto the ReactPreview/preview__Layoutstory.densityandsizeto the Web ComponentsPreview/preview__Layoutstory.Changed
densityradio controls andsizeselect controls for React and Web Components Layout stories.densityandsizeargs.Removed
Testing / Reviewing
Use the repository Node version:
Open React Storybook:
Open the
Preview/preview__Layoutdefault story and verify:densityandsize.densityupdates the rendered<Layout>context.sizeupdates the rendered<Layout>context.Open Web Components Storybook:
Open the
Preview/preview__Layoutdefault story and verify:densityandsize.densityupdates the rendered<cds-layout>context.sizeupdates the rendered<cds-layout>context.Run the focused tests and checks:
PR Checklist
As the author of this PR, before marking ready for review, confirm you:
- [ ] Tested for cross-browser consistencyMore details can be found in the pull request guide