From 71a74858628faaf93870082d0a1c21312a2338c8 Mon Sep 17 00:00:00 2001 From: JuanMa Date: Fri, 4 Sep 2026 12:14:55 +0200 Subject: [PATCH 1/7] Storybook: Rewrite the introduction page as the front door of the design system The introduction said the project uses Storybook for the components in WordPress packages "especially @wordpress/components", and its only code sample imported from it. It did not link to the design system introduction, tokens, theme or the MCP server, and it said nothing about the status icons and tag filter in the sidebar. Keep the original shape (what the site is, how it works) but point the opening and the code sample at the design system and @wordpress/ui. Describe each top-level folder in one line, add a "Finding your way around" section with the search box, the tag filter and a table of the status icons and their tags, give the design system MCP server a short section that points to its README for setup, and move the eslint rules and the handbook page into the resources list. Copy only; the story id is unchanged. Part of #82402 (proposal 6). Co-Authored-By: Claude Fable 5.1 --- storybook/stories/introduction.mdx | 59 ++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/storybook/stories/introduction.mdx b/storybook/stories/introduction.mdx index 82111a8e4ca8c9..8ee417b682c208 100644 --- a/storybook/stories/introduction.mdx +++ b/storybook/stories/introduction.mdx @@ -8,34 +8,71 @@ import { InlineIcon } from './docs/inline-icon'; ## Welcome! -The WordPress Gutenberg project uses Storybook to view and work with the UI components developed in WordPress packages, especially [@wordpress/components](https://github.com/WordPress/gutenberg/tree/trunk/packages/components). +The WordPress Gutenberg project uses Storybook to view and work with the UI components developed in WordPress packages, especially the [WordPress Design System](?path=/docs/design-system-introduction--docs) (`@wordpress/ui`). On this interactive site you can browse individual components, their controls, options, and settings in isolation. You can also modify controls and arguments and see the changes right away. -The components displayed on this site can be used in your code to build the editor's UI for your custom blocks or other pages. -Import them from the components root directory like in below example: +The components displayed on this site can be used in your code to build the editor's UI for your custom blocks or other pages. Import them from `@wordpress/ui` like in the example below: ```jsx -import { Button } from '@wordpress/components'; +import { Button } from '@wordpress/ui'; export default function MyButton() { - return ; + return ; } ``` +## What you'll find here + +The sidebar has one folder per area: + +- **Design System** is the recommended toolkit for new UI: the [components](?path=/docs/design-system-components-introduction--docs) from `@wordpress/ui`, the [tokens](?path=/docs/design-system-tokens-introduction--docs) and [theme](?path=/docs/design-system-theme-introduction--docs) from `@wordpress/theme`, the [patterns](?path=/docs/design-system-patterns-destructive-actions--docs) for composing them, and the [foundations](?path=/docs/foundations-layout--page) of layout, elevation and radius. +- **Classic Components** documents `@wordpress/components`, the original WordPress UI library. It is still widely used and still the place to look for what `@wordpress/ui` does not cover yet. Each component page shows its recommendation status; see [Finding your way around](#finding-your-way-around) for the icons. +- **Editor** documents UI of the WordPress editing experience: the block editor controls, global styles, the image cropper and the media editor. +- **Widgets** documents the dashboard widget system: its primitives, the dashboard shell, and the grid that lays widgets out. +- **Playground** runs a whole block editor inside Storybook. + ## How this site works -The site shows the components in the sidebar. Each component's entry point is its **Docs** page, which contains the documentation and interactive examples. You can also explore the individual stories (e.g. "Default", "Small") to view a single use case on the **Canvas**, where you can modify the **Controls** for each prop in the panel below. +Each component's entry point is its **Docs** page, with the documentation and interactive examples. The individual stories (for example "Default" or "Small") show a single use case on the **Canvas**, where you can change the **Controls** for each prop in the panel below. + +To view the source code for a component and its stories on GitHub, click the (Open source file) button in the top toolbar. + +### Finding your way around + +The sidebar lists everything on this site. Use the search box (โŒ˜K / Ctrl+K) to find a component by name, or open the filter menu next to it to show only the entries with a given tag. -To view the source code for the component and its stories on GitHub, click the (Open source file) button in the top toolbar. +Component names carry an icon with their status. The same statuses are available as tags in the filter, so you can, for example, show recommended components only. -To use it in your local development environment run the following command in the top level Gutenberg directory: +| Icon | Tag | Meaning | +| ---- | ------------------------- | -------------------------------------------------------------------------------- | +| โœ… | `status-recommended` | Use this component for new UI. | +| โš ๏ธ | `status-use-with-caution` | Use with care; check the notes on the component page. | +| ๐Ÿšซ | `status-not-recommended` | Do not use for new UI. The component page points at the recommended alternative. | +| โ“ | `status-unaudited` | Not audited yet against the design system. | +| ๐Ÿงช | `status-experimental` | Under active development, may change in future releases. | +| ๐Ÿ”’ | `status-private` | Locked as a private API, not for use outside Gutenberg. | +| ๐Ÿšง | `status-wip` | Work in progress, not ready for production. | + +Hover an icon in the sidebar for the same description. Each component page also shows its status at the top. + +### Running it locally + +Use the following command in the top-level Gutenberg directory: ```bash npm run storybook:dev ``` -## Resources to learn more: +## Using it with AI agents + +AI agents cannot read this site, so the [WordPress Design System MCP Server](https://github.com/WordPress/gutenberg/tree/trunk/packages/design-system-mcp) gives them the same component documentation, examples and design tokens in a machine-readable form. With it, an agent picks recommended components and valid tokens instead of guessing from outdated sources. + +The [package README](https://github.com/WordPress/gutenberg/tree/trunk/packages/design-system-mcp#setup) covers installation for Claude Code, Codex, Cursor, VS Code and Claude Desktop. + +## Resources to learn more -- [Storybook.js.org](https://storybook.js.org/) - Storybook is a frontend workshop for building UI components and pages in isolation. -- [[Package] Components](https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+label%3A%22%5BPackage%5D+Components%22) - Open Issue Gutenberg Repo +- [Working with WordPress Design System packages](https://developer.wordpress.org/block-editor/contributors/design/design-system-packages/) in the Block Editor Handbook. +- [ESLint rules for the design system](https://github.com/WordPress/gutenberg/tree/trunk/packages/eslint-plugin/docs/rules): `@wordpress/eslint-plugin` warns when your code uses a component that is no longer recommended or a design token that does not exist. +- [Storybook.js.org](https://storybook.js.org/), the tool this site is built with. +- Open issues for the [design system](https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+label%3A%22Design+System%22) and for [`@wordpress/components`](https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+label%3A%22%5BPackage%5D+Components%22) in the Gutenberg repository. From 4036a0bb4daa258c9f7c741af1afef86333d4164 Mon Sep 17 00:00:00 2001 From: JuanMa Date: Fri, 4 Sep 2026 13:30:09 +0200 Subject: [PATCH 2/7] Storybook: Render the status table on the introduction page Storybook's MDX does not parse GFM tables, so the pipes showed up as text. Wrap the table in the Markdown block, as the other MDX pages in the repository do. Co-Authored-By: Claude Fable 5.1 --- storybook/stories/introduction.mdx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/storybook/stories/introduction.mdx b/storybook/stories/introduction.mdx index 8ee417b682c208..4608b8a13e198e 100644 --- a/storybook/stories/introduction.mdx +++ b/storybook/stories/introduction.mdx @@ -1,4 +1,4 @@ -import { Meta } from '@storybook/addon-docs/blocks'; +import { Markdown, Meta } from '@storybook/addon-docs/blocks'; import { JumpToIcon } from '@storybook/icons'; import { InlineIcon } from './docs/inline-icon'; @@ -44,15 +44,17 @@ The sidebar lists everything on this site. Use the search box (โŒ˜K / Ctrl+K) to Component names carry an icon with their status. The same statuses are available as tags in the filter, so you can, for example, show recommended components only. +{ ` | Icon | Tag | Meaning | | ---- | ------------------------- | -------------------------------------------------------------------------------- | -| โœ… | `status-recommended` | Use this component for new UI. | -| โš ๏ธ | `status-use-with-caution` | Use with care; check the notes on the component page. | -| ๐Ÿšซ | `status-not-recommended` | Do not use for new UI. The component page points at the recommended alternative. | -| โ“ | `status-unaudited` | Not audited yet against the design system. | -| ๐Ÿงช | `status-experimental` | Under active development, may change in future releases. | -| ๐Ÿ”’ | `status-private` | Locked as a private API, not for use outside Gutenberg. | -| ๐Ÿšง | `status-wip` | Work in progress, not ready for production. | +| โœ… | \`status-recommended\` | Use this component for new UI. | +| โš ๏ธ | \`status-use-with-caution\` | Use with care; check the notes on the component page. | +| ๐Ÿšซ | \`status-not-recommended\` | Do not use for new UI. The component page points at the recommended alternative. | +| โ“ | \`status-unaudited\` | Not audited yet against the design system. | +| ๐Ÿงช | \`status-experimental\` | Under active development, may change in future releases. | +| ๐Ÿ”’ | \`status-private\` | Locked as a private API, not for use outside Gutenberg. | +| ๐Ÿšง | \`status-wip\` | Work in progress, not ready for production. | +` } Hover an icon in the sidebar for the same description. Each component page also shows its status at the top. From a1bd6c1b0d8d153c4ea84edde6803384378f0827 Mon Sep 17 00:00:00 2001 From: JuanMa Date: Tue, 8 Sep 2026 15:55:28 +0200 Subject: [PATCH 3/7] Storybook: Clarify the introduction's design system focus --- storybook/stories/introduction.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storybook/stories/introduction.mdx b/storybook/stories/introduction.mdx index 4608b8a13e198e..03e95a478e48d5 100644 --- a/storybook/stories/introduction.mdx +++ b/storybook/stories/introduction.mdx @@ -8,7 +8,7 @@ import { InlineIcon } from './docs/inline-icon'; ## Welcome! -The WordPress Gutenberg project uses Storybook to view and work with the UI components developed in WordPress packages, especially the [WordPress Design System](?path=/docs/design-system-introduction--docs) (`@wordpress/ui`). +The WordPress Gutenberg project uses Storybook to view and work with the UI components developed in WordPress packages. Explore the [WordPress Design System](?path=/docs/design-system-introduction--docs) in this Storybook: its foundations, tokens, theme, patterns, and components. On this interactive site you can browse individual components, their controls, options, and settings in isolation. You can also modify controls and arguments and see the changes right away. From 07609eea47fd506f44d54cb6dd41f7914a6cf41e Mon Sep 17 00:00:00 2001 From: JuanMa Date: Tue, 8 Sep 2026 16:08:24 +0200 Subject: [PATCH 4/7] Storybook: Clarify the introduction's import example --- storybook/stories/introduction.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storybook/stories/introduction.mdx b/storybook/stories/introduction.mdx index 03e95a478e48d5..bca4ca45509a38 100644 --- a/storybook/stories/introduction.mdx +++ b/storybook/stories/introduction.mdx @@ -12,7 +12,7 @@ The WordPress Gutenberg project uses Storybook to view and work with the UI comp On this interactive site you can browse individual components, their controls, options, and settings in isolation. You can also modify controls and arguments and see the changes right away. -The components displayed on this site can be used in your code to build the editor's UI for your custom blocks or other pages. Import them from `@wordpress/ui` like in the example below: +The components displayed on this site can be used in your code to build the editor's UI for your custom blocks or other pages. The example below imports the `Button` component from `@wordpress/ui`: ```jsx import { Button } from '@wordpress/ui'; From ec33fae43cccfdcac34634883aa1ce9374ea5067 Mon Sep 17 00:00:00 2001 From: JuanMa Date: Tue, 8 Sep 2026 16:38:56 +0200 Subject: [PATCH 5/7] Storybook: Clarify the design system MCP benefit --- storybook/stories/introduction.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storybook/stories/introduction.mdx b/storybook/stories/introduction.mdx index bca4ca45509a38..dc1aba2883a4a8 100644 --- a/storybook/stories/introduction.mdx +++ b/storybook/stories/introduction.mdx @@ -68,7 +68,7 @@ npm run storybook:dev ## Using it with AI agents -AI agents cannot read this site, so the [WordPress Design System MCP Server](https://github.com/WordPress/gutenberg/tree/trunk/packages/design-system-mcp) gives them the same component documentation, examples and design tokens in a machine-readable form. With it, an agent picks recommended components and valid tokens instead of guessing from outdated sources. +The [WordPress Design System MCP Server](https://github.com/WordPress/gutenberg/tree/trunk/packages/design-system-mcp) gives AI agents direct, machine-readable access to the component documentation, examples, and design tokens available on this site. Agents can use it to find recommended components and valid tokens. The [package README](https://github.com/WordPress/gutenberg/tree/trunk/packages/design-system-mcp#setup) covers installation for Claude Code, Codex, Cursor, VS Code and Claude Desktop. From 4c7c8b21571500c9e19d065f0fae89ffd5b1ebd9 Mon Sep 17 00:00:00 2001 From: JuanMa Date: Thu, 17 Sep 2026 12:42:16 +0200 Subject: [PATCH 6/7] Storybook: Describe the Components folder on the introduction page Co-Authored-By: Claude Opus 5 (1M context) --- storybook/stories/introduction.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storybook/stories/introduction.mdx b/storybook/stories/introduction.mdx index dc1aba2883a4a8..bcc28eff8169bc 100644 --- a/storybook/stories/introduction.mdx +++ b/storybook/stories/introduction.mdx @@ -26,8 +26,8 @@ export default function MyButton() { The sidebar has one folder per area: -- **Design System** is the recommended toolkit for new UI: the [components](?path=/docs/design-system-components-introduction--docs) from `@wordpress/ui`, the [tokens](?path=/docs/design-system-tokens-introduction--docs) and [theme](?path=/docs/design-system-theme-introduction--docs) from `@wordpress/theme`, the [patterns](?path=/docs/design-system-patterns-destructive-actions--docs) for composing them, and the [foundations](?path=/docs/foundations-layout--page) of layout, elevation and radius. -- **Classic Components** documents `@wordpress/components`, the original WordPress UI library. It is still widely used and still the place to look for what `@wordpress/ui` does not cover yet. Each component page shows its recommendation status; see [Finding your way around](#finding-your-way-around) for the icons. +- **Design System** holds what the components are built from: the [tokens](?path=/docs/design-system-tokens-introduction--docs) and [theme](?path=/docs/design-system-theme-introduction--docs) from `@wordpress/theme`, the [patterns](?path=/docs/design-system-patterns-destructive-actions--docs) for composing UI, and the [foundations](?path=/docs/foundations-layout--page) of layout, elevation and radius. +- **Components** documents both component packages. Start with [`@wordpress/ui`](?path=/docs/design-system-components-introduction--docs), the recommended toolkit for new UI; `@wordpress/components` is the original WordPress UI library, still widely used and still the place to look for what `@wordpress/ui` does not cover yet. Each component page shows its recommendation status; see [Finding your way around](#finding-your-way-around) for the icons. - **Editor** documents UI of the WordPress editing experience: the block editor controls, global styles, the image cropper and the media editor. - **Widgets** documents the dashboard widget system: its primitives, the dashboard shell, and the grid that lays widgets out. - **Playground** runs a whole block editor inside Storybook. From c481abd56090e6f01a22511ba326fa5d9846712f Mon Sep 17 00:00:00 2001 From: JuanMa Date: Thu, 17 Sep 2026 16:56:06 +0200 Subject: [PATCH 7/7] Storybook: Follow the use-* status tags on the introduction page The status table listed the recommendation tags in the status-* namespace, which they no longer use. Co-Authored-By: Claude Opus 5 (1M context) --- storybook/stories/introduction.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/storybook/stories/introduction.mdx b/storybook/stories/introduction.mdx index bcc28eff8169bc..8ec274a3940db7 100644 --- a/storybook/stories/introduction.mdx +++ b/storybook/stories/introduction.mdx @@ -47,10 +47,10 @@ Component names carry an icon with their status. The same statuses are available { ` | Icon | Tag | Meaning | | ---- | ------------------------- | -------------------------------------------------------------------------------- | -| โœ… | \`status-recommended\` | Use this component for new UI. | -| โš ๏ธ | \`status-use-with-caution\` | Use with care; check the notes on the component page. | -| ๐Ÿšซ | \`status-not-recommended\` | Do not use for new UI. The component page points at the recommended alternative. | -| โ“ | \`status-unaudited\` | Not audited yet against the design system. | +| โœ… | \`use-recommended\` | Use this component for new UI. | +| โš ๏ธ | \`use-with-caution\` | Use with care; check the notes on the component page. | +| ๐Ÿšซ | \`use-not-recommended\` | Do not use for new UI. The component page points at the recommended alternative. | +| โ“ | \`use-unaudited\` | Not audited yet against the design system. | | ๐Ÿงช | \`status-experimental\` | Under active development, may change in future releases. | | ๐Ÿ”’ | \`status-private\` | Locked as a private API, not for use outside Gutenberg. | | ๐Ÿšง | \`status-wip\` | Work in progress, not ready for production. |