-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Components: Consolidate and add docs to Storybook #50226
Conversation
4fea2f1
to
60073a1
Compare
Size Change: +1.72 kB (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, love this!
While reviewing I had some minor suggestions that I couldn't make directly on this PR, so I branched off and made them, if that's ok. The main thing I'd like to suggest is to move the docs to the Components section in the Storybook, because our Storybook is starting to get pretty multi-tenant (block-editor, edit-site, etc).
What do you think? Feel free to tweak or cherry pick from my branch as you see fit.
|
||
<Meta title="Docs/Contributing Guidelines" /> | ||
|
||
<Contributing /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool 💛
That all makes sense, thanks for sharing the changes @mirka! I noticed that when moving the README into the |
Yes, I guess because "readme" as a naming convention is more for when you're browsing files, not when browsing online documentation. No strong opinion though! |
Thanks again @mirka. Cherry-picked and merging ✅ |
What?
Consolidate multiple instances of key docs (
README.md
andCONTRIBUTING.md
) and configure Storybook to display them.Why?
Up until now we've had two copies of both
README
andCONTRIBUTING
: one in the package root, and another in thesrc
directory. Consolidating these makes things clearer for contributors and surfacing them in Storybook makes them more visible and easier to access. Also because it was fun.How?
The two copies of
CONTRIBUTING
were identical, so the duplicate was just deleted.The contents of the two
README
files were different, with the root copy focusing on detailed instructions for different aspects of a contribution, while thesrc
copy focused more on the workflow of introducing a new component. I've combined all of this into a single file with one small change. Thesrc
copy's workflow for new components included a step to create a Figma component, which I don't believe we're still doing, so I took that step out. It's easy enough to add back in if it's still relevan.Finally to render both of these docs in Storybook, I enabled the
transcludeMarkdown
config setting, which allows mdx files to import.md
files and render their contents as a component. I then added two new.mdx
files, one to import each of the desired docs.Testing Instructions
Look over both affected docs to make sure the relevant info has been carried over. Check that the both render nicely in Storybook.