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

6.3rc - Switch to canvas not working. #15283

Closed
fallemand opened this issue Jun 17, 2021 · 4 comments
Closed

6.3rc - Switch to canvas not working. #15283

fallemand opened this issue Jun 17, 2021 · 4 comments

Comments

@fallemand
Copy link

fallemand commented Jun 17, 2021

Describe the bug
Switch to "Canvas" when storybook has been compiled with --docs doesn't work.
You need to refresh the page.

111

System

  System:
    OS: macOS 11.2.3
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
    npm: 7.12.1 - ~/.nvm/versions/node/v14.15.1/bin/npm
  Browsers:
    Chrome: 91.0.4472.106
    Firefox: 88.0
    Safari: 14.0.3
  npmPackages:
    @storybook/addon-a11y: 6.3.0-rc.10 => 6.3.0-rc.10 
    @storybook/addon-essentials: 6.3.0-rc.10 => 6.3.0-rc.10 
    @storybook/vue: 6.3.0-rc.10 => 6.3.0-rc.10 
@TimJJTing
Copy link

Describe the bug

Same here with 6.3.8 on built stories, cannot switch between Canvas and Docs unless refresh the page.
start-storybook works fine however
Also tried with Chrome, Firefox, and Safari, all lead to the same issue.

System

  System:
    OS: macOS 10.15.7
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
  Binaries:
    Node: 15.10.0 - ~/.nvm/versions/node/v15.10.0/bin/node
    npm: 7.5.3 - ~/.nvm/versions/node/v15.10.0/bin/npm
  Browsers:
    Chrome: 94.0.4606.61
    Firefox: 91.0
    Safari: 14.1.2
  npmPackages:
    "@storybook/addon-a11y": "^6.3.8",
    "@storybook/addon-actions": "^6.3.8",
    "@storybook/addon-console": "^1.2.3",
    "@storybook/addon-essentials": "^6.3.8",
    "@storybook/addon-links": "^6.3.8",
    "@storybook/node-logger": "^6.3.8",
    "@storybook/react": "^6.3.8",

@TimJJTing
Copy link

TimJJTing commented Oct 6, 2021

After some further investigation, I think what I'm experiencing is related to my configuration on @storybook/addon-docs.
If I comment out it entirely from addons in main.js, it works normal again:

module.exports = {
  stories: ["../src/**/*.stories.@(js|jsx|ts|tsx|mdx)"],
  addons: [
    "@storybook/addon-links",
    // {
    //   name: "@storybook/addon-docs",
    //   options: {
    //     configureJSX: true,
    //     transcludeMarkdown: true,
    //   },
    // },
    "@storybook/addon-essentials",
    "@storybook/addon-a11y",
  ],
  babel: async (options) => ({ ...babelConfig }),
};

I wonder, do I misconfigure the addons, or there's an issue when using @storybook/addon-docs together with @storybook/addon-essentials?

@shilman
Copy link
Member

shilman commented Oct 7, 2021

@TimJJTing Highly unlikely. Addon-essentials should its own configuration of an addon if it detects that the addon is separately configured.

To be specific:

addons: {
  { name: '@storybook/addon-docs', options: { .... } },
  '@storybook/addon-essentials'
}

Should be equivalent to:

addons: {
  { name: '@storybook/addon-docs', options: { .... } },
  { name: '@storybook/addon-essentials', options: { docs: false } }
}

Perhaps it's something related to configureJSX: true??

@shilman
Copy link
Member

shilman commented Jun 7, 2023

We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:

@shilman shilman closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2023
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