Storybook: Docs only build not working after upgrading to 5.2.1

Created on 20 Sep 2019  路  16Comments  路  Source: storybookjs/storybook

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-actions: ^5.2.1 => 5.2.1 @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

docs needs reproduction question / support

All 16 comments

Upgraded storybook design system to 5.2.1 and not seeing this problem

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

Can you make a repro?

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?

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.

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

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.

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

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

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?

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

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?

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

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

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

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.

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

purplecones picture purplecones  路  3Comments

levithomason picture levithomason  路  3Comments

wahengchang picture wahengchang  路  3Comments

tirli picture tirli  路  3Comments

xogeny picture xogeny  路  3Comments