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

@storybook/docs doesn't use the loaded compodoc .json file #9103

Closed
Aaltuj opened this issue Dec 9, 2019 · 23 comments
Closed

@storybook/docs doesn't use the loaded compodoc .json file #9103

Aaltuj opened this issue Dec 9, 2019 · 23 comments

Comments

@Aaltuj
Copy link

Aaltuj commented Dec 9, 2019

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

@stale
Copy link

stale bot commented Dec 30, 2019

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!

@tommyc38
Copy link

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

@shilman
Copy link
Member

shilman commented Jan 15, 2020

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.

@tommyc38
Copy link

@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
Copy link
Member

shilman commented Jan 16, 2020

@tommyc38
Copy link

@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!

@shilman
Copy link
Member

shilman commented Jan 21, 2020

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

@shilman shilman closed this as completed Jan 21, 2020
@Steven-Harris
Copy link

@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

@shilman
Copy link
Member

shilman commented May 7, 2020

@Steven-Harris do you have a public repro?

@Steven-Harris
Copy link

@shilman, sure thing! Here you go! repo

@shilman shilman self-assigned this May 7, 2020
@Steven-Harris
Copy link

should this issue be re-opened?

@sl-benjamindupuy
Copy link

sl-benjamindupuy commented Jun 10, 2020

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

@shilman
Copy link
Member

shilman commented Jun 11, 2020

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

@matheo
Copy link
Member

matheo commented Jun 11, 2020

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.

@Steven-Harris
Copy link

@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.

@matheo
Copy link
Member

matheo commented Jun 11, 2020

@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.

@Steven-Harris
Copy link

Steven-Harris commented Jun 11, 2020

@matheo Getting a Invalid compodoc JSON now

documentation.json.txt

@Steven-Harris
Copy link

got it working now

@Steven-Harris
Copy link

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

@stale
Copy link

stale bot commented Jul 3, 2020

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!

@stale stale bot added the inactive label Jul 3, 2020
@stale
Copy link

stale bot commented Jul 25, 2020

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!

@stale stale bot added the inactive label Jul 25, 2020
@stale
Copy link

stale bot commented Aug 24, 2020

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!

@stale stale bot closed this as completed Aug 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants