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

[Bug] Svelte component documentation isn't added to autodocs documentation #23904

Open
Masstronaut opened this issue Aug 16, 2023 · 2 comments
Open

Comments

@Masstronaut
Copy link

Masstronaut commented Aug 16, 2023

Describe the bug

Following the official svelte component documentation guidelines doesn't result in the autodocs generated page having documentation for the component.

Steps to reproduce the behavior

  1. Create a svelte component
  2. Document it in the officially recommended format
  3. enable autodocs
  4. run storybook and look at the generated autodocs for it. Note that the component description is not present.

Expected behavior

The same markdown documentation used for the officially recommended method of documenting a component should also be provided to the autodocs for any svelte stories.

Screenshots and/or logs

Example of the commented documentation working within VSCode:
image

Example of the autodoc-generated documentation not containing that same information:

image

Environment

  • OS: Mac OS
  • Node.js version: v20.5.0
  • NPM version: 9.8.0
  • Browser (if applicable): N/A
  • Browser version (if applicable): N/A
  • Device (if applicable): N/A

Additional context

This issue, along with storybookjs/addon-svelte-csf#122 would go a long way towards improving the storybook docs experience for Svelte.

@JReinhold JReinhold transferred this issue from storybookjs/addon-svelte-csf Aug 21, 2023
@JReinhold
Copy link
Contributor

@Masstronaut I've transferred this issue from the storybookjs/addon-svelte-csf to the main storybook repo, since I believe this is unrelated to the addon but a feature in the Storybook renderer itself that is missing.

@j3rem1e
Copy link
Contributor

j3rem1e commented Sep 1, 2023

Afaik it's related to how sveldoc-parser extracts the documentation. The description should be before @component, not after.

@j3rem1e j3rem1e added the svelte label Sep 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

3 participants