Skip to content

Commit

Permalink
Feat: Storybook: Improve component organisation - Navigation Category…
Browse files Browse the repository at this point in the history
… - Issue #66275  (#66658)

* Group the storybook components in Navigaiton category

* Fix tabs to add inside containers and add experimental id for component

* Fix the syntax style

Co-authored-by: hbhalodia <[email protected]>
Co-authored-by: tyxla <[email protected]>
  • Loading branch information
3 people authored Nov 7, 2024
1 parent 88cf9bd commit 20b773b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import ExternalLink from '..';

const meta: Meta< typeof ExternalLink > = {
component: ExternalLink,
title: 'Components/ExternalLink',
title: 'Components/Navigation/ExternalLink',
id: 'components-externallink',
argTypes: {
children: { control: { type: 'text' } },
},
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/navigator/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const meta: Meta< typeof Navigator > = {
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
BackButton: Navigator.BackButton,
},
title: 'Components/Navigator',
title: 'Components/Navigation/Navigator',
id: 'components-navigator',
argTypes: {
as: { control: { type: null } },
children: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/tree-grid/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { Button } from '../../button';
import InputControl from '../../input-control';

const meta: Meta< typeof TreeGrid > = {
title: 'Components (Experimental)/TreeGrid',
title: 'Components (Experimental)/Navigation/TreeGrid',
id: 'components-experimental-treegrid',
component: TreeGrid,
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
subcomponents: { TreeGridRow, TreeGridCell },
Expand Down
2 changes: 2 additions & 0 deletions storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ export const parameters = {
'Actions',
'Containers',
'Feedback',
'Navigation',
'Utilities',
],
'Components (Experimental)',
[ 'Navigation' ],
'Icons',
],
},
Expand Down

1 comment on commit 20b773b

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 20b773b.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11718479433
📝 Reported issues:

Please sign in to comment.