Skip to content

[Bug]: autodoc for angular components does not include jsdoc-documentation #28506

Open
@rehdie

Description

@rehdie

Describe the bug

There are issues regarding the same problem (#21387, #11674) which are already closed, but the problem still exists.

The autodoc documentation does not contain the information from jsdoc-comments. Just add storybook to an existing angular project and check the documentation of Example/Button (which is created during the installation of storybook), which looks like this:

story-book-autodoc

I've created a stackblitz reproduction (uploaded my local project), but at the time of creating this issue, running npm install at stackblitz was always failing with ECONNRESET. Downloading the project from stackblitz and trying locally works.

Reproduction link

https://stackblitz.com/edit/stackblitz-starters-dcmzh2

Reproduction steps

  1. ng new storybook-doc-test --create-application=false
  2. cd storybook-doc-test
  3. ng g library @sb/doc-test
  4. npx storybook@latest init (question regarding compodoc answered with yes, but the problem still exists, if answered with no)
  5. since the latest compodoc-version has a dependency to angular 18 (which causes a warning during npm install, because the node-version I'm using is not compatible with angular 18), I've changed the version of compodoc to "1.1.21"
  6. npm install again
  7. npm run storybook

=> look at the documentation for the button-component, which was created by storybook itself => all the jsdoc comments do not show up in the documentation, therefore it is quite useless.

System

Storybook Environment Info:

  System:
    OS: Windows 10 10.0.19045
    CPU: (16) x64 AMD Ryzen 7 PRO 4750U with Radeon Graphics   
  Binaries:
    Node: 18.19.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.21 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD <----- active
    pnpm: 8.4.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Chrome: 114.0.5735.134
    Edge: Chromium (126.0.2592.87)
  npmPackages:
    @storybook/addon-docs: ^8.2.0 => 8.2.0
    @storybook/addon-essentials: ^8.2.0 => 8.2.0
    @storybook/addon-interactions: ^8.2.0 => 8.2.0
    @storybook/addon-links: ^8.2.0 => 8.2.0
    @storybook/addon-onboarding: ^8.2.0 => 8.2.0
    @storybook/angular: ^8.2.0 => 8.2.0
    @storybook/blocks: ^8.2.0 => 8.2.0
    @storybook/test: ^8.2.0 => 8.2.0
    storybook: ^8.2.0 => 8.2.0

Additional context

The angular cli version used to create the project was 17.3.8.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions