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

Disabling addon panel does not work #189

Open
bronzehedwick opened this issue Sep 27, 2023 · 8 comments
Open

Disabling addon panel does not work #189

bronzehedwick opened this issue Sep 27, 2023 · 8 comments

Comments

@bronzehedwick
Copy link

Hello,

I've copied the code to disable the addon panel into ./storybook/preview.js as it appears in the documentation:

const preview = {
  parameters: {
    designToken: { disable: true },
  }
}

However, the Design Tokens panel still appears on Stories.

Using version 3.0.0-beta.3 of this plugin, and Storybook version 7.4.2.

Thanks!

@laddi-netapp
Copy link

I've seen the same in 3.0.0-beta.5.

@julrich
Copy link

julrich commented Oct 7, 2023

Same for 3.0.0-beta.6 here!

@atomicrobokid
Copy link

Any fix coming for this @Sqrrl ?

@Sqrrl
Copy link
Collaborator

Sqrrl commented Nov 9, 2023

It seems to be an issue with the preview.js not exporting the object. I've adjusted the README accordingly. Adding export default preview; to your preview.js should fix it.

@lmestel
Copy link

lmestel commented Nov 22, 2023

Disabling the panel works in 3.0.0-beta.7 with export default preview (I did not try previous versions).
But I get an anoying warning in the browser console:

Warning: The final argument passed to useMemo changed size between renders. The order and size of this array must remain constant.

Previous: [addon-controls, addon-controls, storybook/actions/panel, storybook-design-token/panel, storybook/interactions/panel]
Incoming: [addon-controls, addon-controls, storybook/actions/panel, storybook/interactions/panel]

I made a short screen capture. As you can see, the "Design Tokens" Tab is initially visible and disappears immediately.

storybook-design-token.mov

@laddi-netapp
Copy link

Disabling the panel works in 3.0.0-beta.7 with export default preview (I did not try previous versions). But I get an anoying warning in the browser console:

Warning: The final argument passed to useMemo changed size between renders. The order and size of this array must remain constant.

Previous: [addon-controls, addon-controls, storybook/actions/panel, storybook-design-token/panel, storybook/interactions/panel]
Incoming: [addon-controls, addon-controls, storybook/actions/panel, storybook/interactions/panel]

I made a short screen capture. As you can see, the "Design Tokens" Tab is initially visible and disappears immediately.

storybook-design-token.mov

I've seen the same behaviour in previous beta versions as well, very annoying...

@mattmogford-alcumus
Copy link

Seeing the same useMemo error.
Is there a bug raised for this somewhere I can track / possibly contribute please?

@Sqrrl
Copy link
Collaborator

Sqrrl commented Nov 28, 2023

Seeing the same useMemo error. Is there a bug raised for this somewhere I can track / possibly contribute please?

#186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants