UX-and-I / storybook-design-token

Display design token documentation generated from your stylesheets and icon files. Preview design token changes in the browser. Add your design tokens to your Storybook Docs pages using the custom Doc Blocks.
https://dev.to/psqrrl/managing-design-tokens-using-storybook-5975
MIT License
648 stars 123 forks source link

Getting warnings during startup and usage of addon in v3 beta #186

Open laddi-netapp opened 1 year ago

laddi-netapp commented 1 year ago

I'm using 3.0.0-beta-5 and I get two different warnings during startup/usage:

The first one immediately after opening Storybook:

storybook-design-token was loaded twice, this could have bad side-effects
warn @ chunk-6KNXZZZ5.js:1
AddonStore.register @ chunk-UBXIQABM.js:53
(anonymous) @ EasingPresenter.tsx:11

The other one shows up when opening a story:

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

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

Also, setting parameters: { designToken: { disable: true } } } doesn't seem to work in v3.x. The tab is shown (along with the error above) and when I click the tab, nothing happens and the tab is then removed. It will reappear if I do a reload of the browser window.

lukethacoder commented 1 year ago

I wonder if this is similar to https://github.com/storybookjs/addon-styling/issues/80

Looks like in addon-styling they simply removed the managerEntries export from the preset.ts file. (ref)?

https://github.com/UX-and-I/storybook-design-token/blob/e90801f280e8ca4bd7a1d846619a548b067ffb9d/addon/src/preset.ts#L12-L14

Sqrrl commented 1 year ago

I'm looking into the warnings. See https://github.com/UX-and-I/storybook-design-token/issues/189 for the "disable" parameter.

baspin94 commented 5 months ago

Hi there! I came across this open issue while trying to figure out why I was getting the storybook-design-token was loaded twice, this could have bad side-effects error in my console. (I'm using 3.1.0.)

Have there been any developments since November related to these warnings?