Skip to content
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

Parse comments as Story description #154

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Conversation

j3rem1e
Copy link
Contributor

@j3rem1e j3rem1e commented Nov 3, 2023

This PR allows to inject comments as Story description, as suggested by #148 :

<!-- A story Description -->
<Story args={}/>

the description is injected into 'parameters.docs.description.story'

@j3rem1e j3rem1e merged commit a335b5d into storybookjs:main Nov 10, 2023
1 check passed
@shilman
Copy link
Member

shilman commented Nov 10, 2023

🚀 PR was released in v4.0.11 🚀

@shilman shilman added the released This issue/pull request has been released. label Nov 10, 2023
@JReinhold
Copy link
Collaborator

JReinhold commented Nov 17, 2023

This is pretty cool, I like the solution! ❤️

Now we just need to support JSDoc comments above the meta definition for component-level descriptions.

https://storybook.js.org/docs/react/api/doc-block-description#writing-descriptions

@j3rem1e j3rem1e deleted the feature/148 branch November 17, 2023 19:26
@j3rem1e
Copy link
Contributor Author

j3rem1e commented Nov 17, 2023

It should be easy to do. But it won't work with typescript or a preprocessor.

They are working on native typescript parsing. it will help with this kind of issue, or with doc generation I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants