storybookjs / addon-svelte-csf

[Incubation] CSF using Svelte components.
MIT License
98 stars 29 forks source link

Parse comments as Story description #154

Closed j3rem1e closed 7 months ago

j3rem1e commented 8 months ago

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'

shilman commented 7 months ago

:rocket: PR was released in v4.0.11 :rocket:

JReinhold commented 7 months ago

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 commented 7 months ago

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.