Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Storybook/Button documentation #19298
Storybook/Button documentation #19298
Changes from 11 commits
34c9bb2
4d48a3a
080028a
eb8d3fc
490bc7f
87ab8e2
cbc50f4
4930526
eb35fd7
f481a4d
09bc168
d5f5ac0
ec9c1da
3a1bd7c
baeaed9
6650fc8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
what is this config for ? I'm unable to find any related docs - can you provide those pls?
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.
Without this config, the source code for the main story wasn’t being shown properly - only the decorator was visible and not the story code itself. This config option isn’t present in the docs, I found it in this comment: storybookjs/storybook#12596 (comment)
This file was deleted.
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.
from experience authoring any kind of lengthy docs as JSDoc for storybook becomes hard to maintain.
The approach I'd recommend is to embrace markdown -> https://storybook.js.org/docs/react/writing-docs/docs-page#with-mdx-documentation
Also markdown is more universal format which can be used later for different docs approaches if we choose so.
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.
I’ve thought about using MDX before I started. I think it has the following advantages:
On the other hand, it gives too much freedom to the writer of individual docs page. With MDX, each page is independent and can have a completely different structure.
With CSF, the docs writer creates pieces of documentation, which are then composed together to a docs page according to customizable rules. This enforces consistency between pages and makes it easier to change docs structure in the future - for example if we want to remove Storybook Controls from the docs page and move it to a different tab (like there’s Canvas and Docs now), we can do that without the need to modify each page.
Regarding reuse for future documentation, I think this is tricky. We’d need to closely coordinate our plans with the team working on the new docs page, who’s building the new docs to achieve compatibility. If we don’t do that, it’s likely that those MDX pages will need modifications anyway for use in the new docs. If we do coordinate, it’ll extend the scope of this project (as well as of the new docs project) and therefore limit the quality of docs we’ll have ready for beta. I think it’s better to keep us focused now and deal with requirements of the new docs site later.
That’s why I went with CSF.
Thoughts?
cc @ecraig12345