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

[v6.4.7] Docs shows empty code blocks (placeholders) for disabled stories #16895

Closed
mgameover opened this issue Dec 3, 2021 · 4 comments
Closed

Comments

@mgameover
Copy link

mgameover commented Dec 3, 2021

Describe the bug
Storybook v6.4 displays empty code blocks even for disabled docs ( docs: { disable: true, }). That was not a case in v6.3 and earlier versions.

To Reproduce
The issue is reproduced in this repo.
Here is a code snippet:

storiesOf('Disabled docs', module)
    .add('Primary', () => ({
        template: 'see docs tab',
    }),
        {
            notes: { markdown: markdownNotes },
            docs: { disable: true, }
        }
    )

Steps:

  1. Clone the repo.
  2. Install dependencies and run storybook. npm i, npm run storybook
  3. Go to 'Disabled docs' story e.g. http://localhost:6006/?path=/docs/disabled-docs--primary
  4. Open docs tab, the following empty blocks are displayed
    image

System
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-4940MX CPU @ 3.10GHz
Binaries:
Node: 14.18.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.15 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 96.0.4664.45
Edge: Spartan (44.19041.1266.0), Chromium (96.0.1054.43)
npmPackages:
@storybook/addon-a11y: 6.4.7 => 6.4.7
@storybook/addon-actions: 6.4.7 => 6.4.7
@storybook/addon-docs: 6.4.7 => 6.4.7
@storybook/addon-essentials: 6.4.7 => 6.4.7
@storybook/addon-knobs: 6.3.1 => 6.3.1
@storybook/addon-links: 6.4.7 => 6.4.7
@storybook/addon-viewport: 6.4.7 => 6.4.7
@storybook/addons: 6.4.7 => 6.4.7
@storybook/angular: 6.4.7 => 6.4.7
@storybook/source-loader: 6.4.7 => 6.4.7

@b0g3r
Copy link

b0g3r commented Dec 25, 2021

I also faced up with the same issue. Tracked it down to the bb9f36e#diff-6d3ed270e397673b621912f5bbd87be6fb773596b5557124f9c26ece73f481f2 commit, where getDocsStories with related logic was deleted.

@shilman
Copy link
Member

shilman commented Jan 17, 2022

Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.19 containing PR #17256 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Jan 17, 2022
@shilman
Copy link
Member

shilman commented Jan 21, 2022

Shiver me timbers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.14 containing PR #17256 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb upgrade

@mgameover
Copy link
Author

Hi @shilman,
Thanks for fixing that issue.
I don't see any other stories like on my first screenshot, however the story itself still creates an empty block even if it has docs: { disable: true, }:
image
Is there any way to get rid of that?

P.S. I've updated the repo with v6.4.14

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

3 participants