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

Docs only build not working after upgrading to 5.2.1 #8148

Closed
jgodi opened this issue Sep 20, 2019 · 23 comments
Closed

Docs only build not working after upgrading to 5.2.1 #8148

jgodi opened this issue Sep 20, 2019 · 23 comments

Comments

@jgodi
Copy link

jgodi commented Sep 20, 2019

Describe the bug
Building with --docs no longer just builds the docs tab. It has the canvas tab as well.

To Reproduce
Steps to reproduce the behavior:

  1. Build storybook with --docs
  2. Load storybook
  3. See canvas tab is loaded

Expected behavior
No tabs, just defaulting to the docs

Screenshots
Screen Shot 2019-09-20 at 11 05 43 AM

System:

    @storybook/addon-docs: ^5.2.1 => 5.2.1 
    @storybook/addon-links: ^5.2.1 => 5.2.1 
    @storybook/addon-options: ^5.2.1 => 5.2.1 
    @storybook/addon-storysource: ^5.2.1 => 5.2.1 
    @storybook/addons: ^5.2.1 => 5.2.1 
    @storybook/cli: ^5.2.1 => 5.2.1 
    @storybook/react: ^5.2.1 => 5.2.1 ```

@shilman
Copy link
Member

shilman commented Sep 21, 2019

Upgraded storybook design system to 5.2.1 and not seeing this problem

https://github.com/storybookjs/design-system

Can you make a repro?

@jgodi
Copy link
Author

jgodi commented Sep 21, 2019

Hmm, I will try to set it up again fresh and see what happens.

Side question, what is the best way to accomplish this. I want to have a header of docs written in MDX above my stories, then have my stories that are written in CSF loaded, then a footer of more docs at the bottom. Is this possible?

@shilman
Copy link
Member

shilman commented Sep 22, 2019

I want to have a header of docs written in MDX above my stories, then have my stories that are written in CSF loaded, then a footer of more docs at the bottom.

This is possible right now, but we're going to make it easier in 5.3. Rather than working around the current structure, I'll try to release the better way of doing it in 5.3-alpha this coming week.

@elevatebart
Copy link
Contributor

@jgodi we had this problem a lot on Chrome.
It seems there is a light caching issue related to the LocalStorage.
Please clear both LocalStorage and CachedRessources and tell us how it works.

I hope this helps a little.

@jgodi
Copy link
Author

jgodi commented Sep 22, 2019

I want to have a header of docs written in MDX above my stories, then have my stories that are written in CSF loaded, then a footer of more docs at the bottom.

This is possible right now, but we're going to make it easier in 5.3. Rather than working around the current structure, I'll try to release the better way of doing it in 5.3-alpha this coming week.

Thats awesome, let me know when that is available. I will definitely test it out right away.

@jgodi
Copy link
Author

jgodi commented Sep 23, 2019

@elevatebart Tried this and even tried a different browser and still I get canvas and docs. I will wait until the new 5.3-alpha and try again when I redo our stories. Thanks!

@shilman
Copy link
Member

shilman commented Sep 24, 2019

@jgodi releasing a 5.3-alpha but have not made the fix yet. will try to get to it in the next day or two!

@jgodi
Copy link
Author

jgodi commented Sep 24, 2019

Tried everything today to get the docs only build working. It builds with Canvas/Docs tabs and defaults to the Docs tab, but before we had only docs mode deployed. Is this still a thing?

@shilman
Copy link
Member

shilman commented Sep 24, 2019

@jgodi I'm not sure I understand your question. As far as I know, --docs mode is still working.

@jgodi
Copy link
Author

jgodi commented Sep 25, 2019

Screen Shot 2019-09-24 at 5 05 47 PM

If you look at the screenshot above, you see the Canvas tab and Docs tab. This was build with us being on version 5.2.1 and using build-storybook --docs.

When we were on 5.2.0-alpha.36 and we built using build-storybook --docs, then the output would be no tabs and just loaded the docs only.

Is there a way to go back to having no tabs displayed and be in only docs mode?

@shilman
Copy link
Member

shilman commented Sep 25, 2019

@jgodi Do you have a reproduction? It's working in our repos, so I'd need to take a look at a broken repo to debug what's going on, and I don't have one.

@jgodi
Copy link
Author

jgodi commented Sep 25, 2019

@shilman Repro here in this repo: https://github.com/jgodi/storybook-test

Even tried with v5.3.0-alpha.2 of @storybook/addon-docs

@shilman
Copy link
Member

shilman commented Sep 25, 2019

@shilman shilman closed this as completed Sep 25, 2019
@jgodi
Copy link
Author

jgodi commented Sep 25, 2019

Ah, thanks. I searched and searched before opening the issue too. Glad it was an easy fix. Thank you for looking into it and helping out.

@jgodi
Copy link
Author

jgodi commented Oct 5, 2019

I want to have a header of docs written in MDX above my stories, then have my stories that are written in CSF loaded, then a footer of more docs at the bottom.

This is possible right now, but we're going to make it easier in 5.3. Rather than working around the current structure, I'll try to release the better way of doing it in 5.3-alpha this coming week.

@shilman any update on this part? Would love to try this out.

@shilman
Copy link
Member

shilman commented Oct 6, 2019

@jgodi Not yet, I'll try to get something out this week!

@tuncaulubilge
Copy link

I'm still getting this issue on 6.3.2. start-storybook --docs does work as expected, with flattened list of components, and the canvas tab hidden etc, but build-storybook --docs produces a regular storybook, without the doc mode enabled.

@shilman
Copy link
Member

shilman commented Jul 13, 2021

@tuncaulubilge do you have a reproduction repo you can share? Or you can create one by running npx sb@next repro, following the instructions, and linking it in your issue description? We prioritize issues with reproductions over those without. Thank you! 🙏

@tuncaulubilge
Copy link

@shilman I was able to reproduce it with a fresh CRA app and npx sb init
See the repo: https://github.com/tuncaulubilge/storybook-docs-repro

Just run yarn build-storybook:docs and npx server storybook-static to see the results. The UI is quite different than what you'd see with yarn storybook:docs

@tuncaulubilge
Copy link

@shilman Sorry to be the guy that keeps asking "Are we there yet?", but is there a roadmap on this one. Currently there are no workarounds on this as far as I'm aware, so we are trying to assess whether to wait for Storybook Docs, or build a regular storybook until the issue is fixed.

@kylemh
Copy link
Member

kylemh commented Dec 24, 2021

I'm seeing this on the latest version of Storybook.

demo.mov

@kylemh
Copy link
Member

kylemh commented Jan 4, 2022

Maybe this can be closed for #15933

@shilman
Copy link
Member

shilman commented Jan 4, 2022

thanks @kylemh ! closing as dupe to #15933

@shilman shilman closed this as completed Jan 4, 2022
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

5 participants