Adds categories to Storybooks navigation#66072
Conversation
|
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. |
|
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @mattrwalker! In case you missed it, we'd love to have you join us in our Slack community. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
|
Flaky tests detected in 48a503d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11295611590
|
mirka
left a comment
There was a problem hiding this comment.
Looks good! I went ahead and added a way to hoist the folders to the top: d4ae026
I think we also agreed that Tabs and TabPanel are also in the Containers category? Semantically, they aren't allowed to be used for navigation.
Also note that we can't group things in the Deprecated category unless we actually go through the deprecation process for each one, so until then, they will have to live in their normal categories.
|
Size Change: 0 B Total Size: 1.77 MB ℹ️ View Unchanged
|
|
Nice one! |
Wonderful.
That's right! I'll change that.
That makes sense, I'll sort them as normally. |
auareyou
left a comment
There was a problem hiding this comment.
This makes sense to me! 💫
mirka
left a comment
There was a problem hiding this comment.
Looks good, I think we're ready to merge 🚀
| import Icon from '../../icon'; | ||
|
|
||
| const meta: Meta< typeof Tabs > = { | ||
| title: 'Components (Experimental)/Tabs', |
There was a problem hiding this comment.
In most cases, we can't just move components under the Experimental grouping because there are other administrative things that need to be done.
But in this case, since it's a "private" component, we can do so by just adding a redirect (aeec693) so the previous permalink (http://localhost:50240/?path=/docs/components-experimental-tabs--docs) redirects to the new one 👍
Co-authored-by: mattrwalker <mattryanwalker@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: auareyou <auareyou@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
What?
This pull request includes several changes to the Storybook configuration and component metadata to improve organization and consistency. The most important changes include updating the titles and IDs of various components and adding new categories to the Storybook sidebar.
Changes to component metadata:
packages/components/src/button/stories/index.story.tsx: Updated the title to 'Components/Actions/Button' and added an ID 'components-button'.packages/components/src/card/stories/index.story.tsx: Updated the title to 'Components/Containers/Card' and added an ID 'components-card'.packages/components/src/navigable-container/stories/navigable-menu.story.tsx: Updated the title to 'Components/Containers/NavigableMenu' and added an ID 'components-navigablemenu'.packages/components/src/navigable-container/stories/tabbable-container.story.tsx: Updated the title to 'Components/Containers/TabbableContainer' and added an ID 'components-tabbablecontainer'.packages/components/src/panel/stories/index.story.tsx: Updated the title to 'Components/Containers/Panel' and added an ID 'components-panel'.packages/components/src/tab-panel/stories/index.story.tsx: Updated the title to 'Components/Containers/TabPanel' and added an ID 'components-tabpanel'.packages/components/src/tabs/stories/index.story.tsx: Updated the title to 'Components/Containers/Tabs' and added an ID 'components-tabs'.This creates an 'Actions' category and a 'Containers' category within the left-hand navigation.
This change represents 2 out of the 12 categories to be introduced, it's smaller scope allows me to test run committing before making larger changes at a later date and time.
Why?
This change is part of the larger Storybook Improvements and the shared Sitemap.
How?
Adding Categories that helps organize and group components into sections based on their role and function within the library makes our library easier to navigate and understand.
Screenshots