Repository navigation
Storybook: Rewrite the introduction page as the front door of the design system - #82437
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
fe39d6b to
479e28d
Compare
9f1f50f to
1f71f1f
Compare
3c524a5 to
38d6270
Compare
1f71f1f to
de7e575
Compare
38d6270 to
7888944
Compare
mirka
left a comment
There was a problem hiding this comment.
Thanks for working on an update!
| ## 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`). |
There was a problem hiding this comment.
This wording kind of implies that the WordPress Design System is @wordpress/ui. Also, if anything, I think the scope of the Storybook has grown larger to the point where we can no longer say it's "especially" for @wordpress/ui or @wordpress/components.
There was a problem hiding this comment.
Good point. Addressed in b6aa118.
The opening now describes Storybook’s broader scope first, then highlights the full WordPress Design System (foundations, tokens, theme, patterns, and components) without equating it with @wordpress/ui
|
|
||
| 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: |
There was a problem hiding this comment.
Import them from
@wordpress/uilike in the example below
This reads like all components in the Storybook can be imported from the @wordpress/ui package.
There was a problem hiding this comment.
Addressed in 515cd45. The text now refers specifically to the Button example instead of implying that every component in Storybook is imported from @wordpress/ui
|
|
||
| export default function MyButton() { | ||
| return <Button>Click Me!</Button>; | ||
| return <Button>Click me</Button>; |
| - **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. |
There was a problem hiding this comment.
Not necessarily within the scope of this PR, but this reminds me that we should probably rename "Playground" here, as it now conflicts with WordPress Playground and is confusing.
There was a problem hiding this comment.
I couldn’t find an earlier discussion about this. I agree that the Playground name is confusing now that WordPress Playground exists. A rename seems worth discussing in a separate issue, since it affects the sidebar structure rather than just the introduction copy.
| ## 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. |
There was a problem hiding this comment.
AI agents cannot read this site
I'm not sure this is true as a broad statement, and I feel like it will get even more stale as Storybook provides more machine-readability out of the box. Maybe just say the MCP provides a better experience or something?
There was a problem hiding this comment.
You're right. Addressed in a4174ba.
The copy now describes the MCP server as providing direct, machine-readable access instead of making a broad claim about what agents can or cannot read.
de7e575 to
2844c8f
Compare
7888944 to
cd4cd59
Compare
d90cd18 to
9e0f923
Compare
a4174ba to
9d4c35f
Compare
|
|
||
| ```jsx | ||
| import { Button } from '@wordpress/components'; | ||
| import { Button } from '@wordpress/ui'; |
There was a problem hiding this comment.
Last I recall the only soft blocker we had was some migration documentation.
There was a problem hiding this comment.
Not sure if we should consider the (remaining) misalignment between components and ui Button here — #82506 for context.
|
Nice work, thanks for contributing! |
9e0f923 to
733e75f
Compare
9d4c35f to
ae0646b
Compare
6156a04 to
e731187
Compare
ae0646b to
7e09703
Compare
5346ab6 to
a7e4ac7
Compare
🤖 PR meta 🤖📦 Bundle sizeSize Change: 0 B Total Size: 8.21 MB From |
a7e4ac7 to
df655aa
Compare
df655aa to
0974019
Compare
…ign 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 <noreply@anthropic.com>
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 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The status table listed the recommendation tags in the status-* namespace, which they no longer use. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Part of #82402. One PR per proposal, stacked so each stays small; this comment on the issue maps every proposal to its PR.
What?
Rewrites
storybook/stories/introduction.mdxso the front door of the site points at the design system. Copy only; the story id is unchanged.Why?
The page 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. Proposal 6 in #82402.The new page keeps the original shape (what the site is, how it works) and:
@wordpress/ui;status-*tags (from Storybook: Show the component status in the sidebar as status-* tags #82435);Testing Instructions
npm run storybook:devand open Introduction.?path=targets were checked against the story titles).Stack
Part of #82402. One PR per proposal, stacked so each stays small; this comment on the issue maps every proposal to its PR. Each PR targets the branch below it; GitHub retargets to
trunkas they merge. To test everything together, check out the top of the stack,update/storybook-ia-09-introduction, and runnpm run storybook:dev.None of the move PRs wait for #82123: each pins the current
idof the files it renames, so the overlap is one identical line per file and whichever lands second rebases.🤖 Generated with Claude Code