Skip to content

Commit

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

* Group the overlay components in storybook

* Fix the id for the experimental components

* Remove unwanted changes from the PR

Co-authored-by: hbhalodia <[email protected]>
Co-authored-by: tyxla <[email protected]>
Co-authored-by: mirka <[email protected]>
  • Loading branch information
4 people authored Nov 12, 2024
1 parent 9be61c4 commit 2313836
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ import { ConfirmDialog } from '../component';

const meta: Meta< typeof ConfirmDialog > = {
component: ConfirmDialog,
title: 'Components (Experimental)/ConfirmDialog',
title: 'Components (Experimental)/Overlays/ConfirmDialog',
id: 'components-experimental-confirmdialog',
argTypes: {
isOpen: {
control: { type: null },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/dropdown/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import MenuItem from '../../menu-item';
import { DropdownContentWrapper } from '../dropdown-content-wrapper';

const meta: Meta< typeof Dropdown > = {
title: 'Components/Dropdown',
title: 'Components/Overlays/Dropdown',
id: 'components-dropdown',
component: Dropdown,
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
subcomponents: { DropdownContentWrapper },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/modal/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ import type { ModalProps } from '../types';

const meta: Meta< typeof Modal > = {
component: Modal,
title: 'Components/Modal',
title: 'Components/Overlays/Modal',
id: 'components-modal',
argTypes: {
children: {
control: { type: null },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/popover/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const AVAILABLE_PLACEMENTS: PopoverProps[ 'placement' ][] = [
];

const meta: Meta< typeof Popover > = {
title: 'Components/Popover',
title: 'Components/Overlays/Popover',
id: 'components-popover',
component: Popover,
argTypes: {
anchor: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion packages/components/src/tooltip/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import Tooltip from '..';
import Button from '../../button';

const meta: Meta< typeof Tooltip > = {
title: 'Components/Tooltip',
title: 'Components/Overlays/Tooltip',
id: 'components-tooltip',
component: Tooltip,
argTypes: {
children: { control: { type: null } },
Expand Down
3 changes: 2 additions & 1 deletion storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,11 @@ export const parameters = {
'Containers',
'Feedback',
'Navigation',
'Overlays',
'Utilities',
],
'Components (Experimental)',
[ 'Navigation' ],
[ 'Navigation', 'Overlays' ],
'Icons',
],
},
Expand Down

1 comment on commit 2313836

@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 2313836.
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/11804681025
📝 Reported issues:

Please sign in to comment.