From 8e935d80b8331263acaa0b18fb371b45e0a4f2a7 Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Thu, 31 Oct 2024 16:20:06 +0530 Subject: [PATCH 1/4] Group the components in storybook based on sitemap provided --- packages/components/src/heading/stories/index.story.tsx | 3 ++- packages/components/src/text-highlight/stories/index.story.tsx | 3 ++- packages/components/src/text/stories/index.story.tsx | 3 ++- packages/components/src/truncate/stories/index.story.tsx | 3 ++- .../components/src/visually-hidden/stories/index.story.tsx | 2 +- storybook/preview.js | 2 ++ 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/packages/components/src/heading/stories/index.story.tsx b/packages/components/src/heading/stories/index.story.tsx index d82a59f08c825b..9b92140557cf89 100644 --- a/packages/components/src/heading/stories/index.story.tsx +++ b/packages/components/src/heading/stories/index.story.tsx @@ -10,7 +10,8 @@ import { Heading } from '..'; const meta: Meta< typeof Heading > = { component: Heading, - title: 'Components (Experimental)/Heading', + title: 'Components (Experimental)/Typography/Heading', + id: 'components-heading', argTypes: { as: { control: { type: 'text' } }, color: { control: { type: 'color' } }, diff --git a/packages/components/src/text-highlight/stories/index.story.tsx b/packages/components/src/text-highlight/stories/index.story.tsx index d54149d8e19d3c..f9538b7130095d 100644 --- a/packages/components/src/text-highlight/stories/index.story.tsx +++ b/packages/components/src/text-highlight/stories/index.story.tsx @@ -10,7 +10,8 @@ import TextHighlight from '..'; const meta: Meta< typeof TextHighlight > = { component: TextHighlight, - title: 'Components/TextHighlight', + title: 'Components/Typography/TextHighlight', + id: 'components-texthighlight', parameters: { controls: { expanded: true, diff --git a/packages/components/src/text/stories/index.story.tsx b/packages/components/src/text/stories/index.story.tsx index f762ca3b4e3ff7..22a3fd9fcebec8 100644 --- a/packages/components/src/text/stories/index.story.tsx +++ b/packages/components/src/text/stories/index.story.tsx @@ -10,7 +10,8 @@ import { Text } from '../component'; const meta: Meta< typeof Text > = { component: Text, - title: 'Components (Experimental)/Text', + title: 'Components (Experimental)/Typography/Text', + id: 'components-text', argTypes: { as: { control: { type: 'text' } }, color: { control: { type: 'color' } }, diff --git a/packages/components/src/truncate/stories/index.story.tsx b/packages/components/src/truncate/stories/index.story.tsx index 84eaf59edbb3e1..85e38aca3426f1 100644 --- a/packages/components/src/truncate/stories/index.story.tsx +++ b/packages/components/src/truncate/stories/index.story.tsx @@ -10,7 +10,8 @@ import { Truncate } from '..'; const meta: Meta< typeof Truncate > = { component: Truncate, - title: 'Components (Experimental)/Truncate', + title: 'Components (Experimental)/Typography/Truncate', + id: 'components-truncate', argTypes: { children: { control: { type: 'text' } }, as: { control: { type: 'text' } }, diff --git a/packages/components/src/visually-hidden/stories/index.story.tsx b/packages/components/src/visually-hidden/stories/index.story.tsx index 8abe45a94aab4f..6ebcf9a2e949ce 100644 --- a/packages/components/src/visually-hidden/stories/index.story.tsx +++ b/packages/components/src/visually-hidden/stories/index.story.tsx @@ -10,7 +10,7 @@ import { VisuallyHidden } from '..'; const meta: Meta< typeof VisuallyHidden > = { component: VisuallyHidden, - title: 'Components/Utilities/VisuallyHidden', + title: 'Components/Typography/VisuallyHidden', id: 'components-visuallyhidden', argTypes: { children: { control: { type: null } }, diff --git a/storybook/preview.js b/storybook/preview.js index 21f2eab912059a..525ad943bbae70 100644 --- a/storybook/preview.js +++ b/storybook/preview.js @@ -132,9 +132,11 @@ export const parameters = { 'Contributing Guidelines', 'Actions', 'Containers', + 'Typography', 'Utilities', ], 'Components (Experimental)', + [ 'Typography' ], 'Icons', ], }, From 3a0ec95dc87a888c058176cf616170cc2211d2fb Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Thu, 7 Nov 2024 10:15:15 +0530 Subject: [PATCH 2/4] Fix the experimental id for components in storybook --- packages/components/src/heading/stories/index.story.tsx | 2 +- packages/components/src/text/stories/index.story.tsx | 2 +- packages/components/src/truncate/stories/index.story.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/components/src/heading/stories/index.story.tsx b/packages/components/src/heading/stories/index.story.tsx index 9b92140557cf89..8777fb2c2e6507 100644 --- a/packages/components/src/heading/stories/index.story.tsx +++ b/packages/components/src/heading/stories/index.story.tsx @@ -11,7 +11,7 @@ import { Heading } from '..'; const meta: Meta< typeof Heading > = { component: Heading, title: 'Components (Experimental)/Typography/Heading', - id: 'components-heading', + id: 'components-experimental-heading', argTypes: { as: { control: { type: 'text' } }, color: { control: { type: 'color' } }, diff --git a/packages/components/src/text/stories/index.story.tsx b/packages/components/src/text/stories/index.story.tsx index 22a3fd9fcebec8..92a2c7eb9be3e3 100644 --- a/packages/components/src/text/stories/index.story.tsx +++ b/packages/components/src/text/stories/index.story.tsx @@ -11,7 +11,7 @@ import { Text } from '../component'; const meta: Meta< typeof Text > = { component: Text, title: 'Components (Experimental)/Typography/Text', - id: 'components-text', + id: 'components-experimental-text', argTypes: { as: { control: { type: 'text' } }, color: { control: { type: 'color' } }, diff --git a/packages/components/src/truncate/stories/index.story.tsx b/packages/components/src/truncate/stories/index.story.tsx index 85e38aca3426f1..3b06831c59aa07 100644 --- a/packages/components/src/truncate/stories/index.story.tsx +++ b/packages/components/src/truncate/stories/index.story.tsx @@ -11,7 +11,7 @@ import { Truncate } from '..'; const meta: Meta< typeof Truncate > = { component: Truncate, title: 'Components (Experimental)/Typography/Truncate', - id: 'components-truncate', + id: 'components-experimental-truncate', argTypes: { children: { control: { type: 'text' } }, as: { control: { type: 'text' } }, From b49e5009eca869f0bad9c5624a79cd9a265cee76 Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Fri, 8 Nov 2024 10:07:02 +0530 Subject: [PATCH 3/4] Revert the unwanted changes in PR --- packages/block-library/src/image/block.json | 9 +-------- packages/block-library/src/post-content/block.json | 2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/block-library/src/image/block.json b/packages/block-library/src/image/block.json index 26835df9e856cd..16e31217476026 100644 --- a/packages/block-library/src/image/block.json +++ b/packages/block-library/src/image/block.json @@ -4,14 +4,7 @@ "name": "core/image", "title": "Image", "category": "media", - "usesContext": [ - "allowResize", - "imageCrop", - "fixedHeight", - "postId", - "postType", - "queryId" - ], + "usesContext": [ "allowResize", "imageCrop", "fixedHeight", "postId", "postType", "queryId" ], "description": "Insert an image to make a visual statement.", "keywords": [ "img", "photo", "picture" ], "textdomain": "default", diff --git a/packages/block-library/src/post-content/block.json b/packages/block-library/src/post-content/block.json index e5d455b97a8a3d..ed9c47154b2f8e 100644 --- a/packages/block-library/src/post-content/block.json +++ b/packages/block-library/src/post-content/block.json @@ -69,4 +69,4 @@ }, "style": "wp-block-post-content", "editorStyle": "wp-block-post-content-editor" -} +} \ No newline at end of file From a1ce5107f1979e7ccc097a973c84e991d165f884 Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Fri, 8 Nov 2024 10:13:16 +0530 Subject: [PATCH 4/4] Add the missing folder on conflicts resolve --- storybook/preview.js | 1 + 1 file changed, 1 insertion(+) diff --git a/storybook/preview.js b/storybook/preview.js index dbe6da4c1b855f..26c833f2590e55 100644 --- a/storybook/preview.js +++ b/storybook/preview.js @@ -133,6 +133,7 @@ export const parameters = { 'Actions', 'Containers', 'Feedback', + 'Navigation', 'Typography', 'Utilities', ],