Storybook: @storybook/docs doesn't use the loaded compodoc .json file

Created on 9 Dec 2019  路  23Comments  路  Source: storybookjs/storybook

Describe the bug
After following the https://github.com/storybookjs/storybook/tree/next/addons/docs/angular instructions. Storybook fails to show the component information in the Docs tab.

It loads the json file because setCompodocJson is called and that sets the global variable
image

But it isn't used when selecting the doc tab.

image

Am i missing something?

To Reproduce
Steps to reproduce the behavior:

  1. open / extract files
    cs-shared - Copy.zip
  2. run yarn install
  3. run yarn storybook
  4. See error

Expected behavior
That the generated compodoc information is used to show the compodoc generated props

docs angular inactive question / support

All 23 comments

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

I followed the docs as well and couldn't get it to work. Please help.

In the attached ZIP file, it uses .storybook/preset.js, which is wrong. The file should be called .storybook/presets.js. Or, if you're using the new declarative configuration, .storybook/main.js.

@shilman, I made the changes and still couldn't get it to work. Do you know if there is a live example of Docs working with Angular anywhere?

@shilman thank you for your quick response. My wife went into labor with our twins the minute you responded haha. At any rate, I found the issue...I was using SBv5.3.6 which doesn't seem to support Docs just yet. SBv5.3.5 works just as expected. Thanks again!

Congratulations!!! 馃帀 (on both fronts, but more on the twins -- that's amazing!!!)

@tommyc38 I reverted to 5.3.18 and I still can't get storybook to load my documentation.json file. I don't get any errors it just doesn't work. DocsPage works but only has the component in it, I can't customize it

@Steven-Harris do you have a public repro?

@shilman, sure thing! Here you go! repo

should this issue be re-opened?

I followed the docs as well and I have the exact same problem. "No Docs" but the global variable __STORYBOOK_COMPODOC_JSON__ is ok.
Any news ?
Thanks

@matheo any chance you can take a look at this?

Steve's repro is incomplete tho, the AppComponent stories.ts file just exports the CSF metadata and no story. The other stories are from @storybook/angular/demo components, and those doesn't have properties extracted by compodoc.

@sl-benjamindupuy we will need a repro with the configuration that you're using to see if there's a missing detail.

@matheo can you explain more? I followed the directions in the docs completely. And this is a clone of the demo provided by the examples that are supposed to work.

@Steven-Harris The demo is supposed to work inside Storybook, not inside another Angular project where compodoc doesn't know the Properties of the components.

Add a story to your AppComponent and you will be able to see the properties, check the differences between your app.component.stories.ts and the example files.

@matheo Getting a Invalid compodoc JSON now

documentation.json.txt

got it working now

something in the docs about setting component in the default object and the stories would have been helpful

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dmmarmol picture dmmarmol  路  57Comments

hansthinhle picture hansthinhle  路  57Comments

p3k picture p3k  路  61Comments

aericson picture aericson  路  97Comments

firaskrichi picture firaskrichi  路  61Comments