storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.39k stars 9.28k forks source link

[Documentation]: Add section that describes how to add descriptions to components #22012

Open MichaelArestad opened 1 year ago

MichaelArestad commented 1 year ago

Describe the problem

I was testing out autodocs (worked like a charm), but wanted to add more details. I vaguely remembered I could write some comments somewhere, but didn't see anything about it in 7.0 docs. I did end up looking at some example components and stories and worked out what I needed.

I would like to see three additions to the docs so other folks don't struggle with this:

  1. Show how to add descriptions to a component
  2. Show how to add descriptions to props/interface
  3. Show how to add descriptions to individual stories

Thank you!

Additional context

No response

RobertShaw1 commented 1 year ago

Looks like this is live now https://storybook.js.org/docs/react/api/doc-block-description#writing-descriptions

However, when writing the description via the JSDoc comments above the component, no description is rendered in the autodocs.

storybook v7.0.4 @storybook/react v7.0.4

kylegach commented 1 year ago

@MichaelArestad — Is the documentation linked above sufficient? Or do you think this needs to be in a guide somewhere as well?

MichaelArestad commented 1 year ago

@kylegach I am unsure I would expect to find it in the DocBlocks section. I would definitely expect to find it in the "Writing docs" guide.

eddiemonge commented 11 months ago

This still seems to be missing.

However, when writing the description via the JSDoc comments above the component, no description is rendered in the autodocs.

I don't believe these are covered. If they are, then I couldn't find them in the docs.

  1. Show how to add descriptions to a component
  2. Show how to add descriptions to props/interface