etchteam / storybook-addon-css-variables-theme

Change the CSS variable based design tokens in your storybook on the fly
MIT License
28 stars 12 forks source link

Applied theme does not match or lag behind the dropdown selection #21

Closed raghurana closed 2 years ago

raghurana commented 2 years ago

We are using this plugin with the node_modules below

"devDependencies": {
    "@etchteam/storybook-addon-css-variables-theme": "^1.2.1",
    "@storybook/addon-a11y": "^6.4.22",
    "@storybook/addon-actions": "^6.5.10",
    "@storybook/addon-docs": "^6.5.6",
    "@storybook/addon-essentials": "^6.4.20",
    "@storybook/addon-links": "^6.4.20",
    "@storybook/addons": "^6.5.10",
    "@storybook/html": "^6.4.20",
    "@storybook/theming": "^6.5.10",
    "@storybook/web-components": "^6.4.22",

Noticing a weird behavior where the theme selection does not match with the applied theme. Theme 1 makes the text bold. issue-gif

pixelrabbit commented 2 years ago

I am also seeing this behavior.

duncanhunter commented 2 years ago

I am also facing this and only used in the development environment at the moment and blocked from releasing with this ability.

Be great to get some help to fix it.

keerthuakrish commented 2 years ago

Hi @gavmck , Would you be able to help resolving this issue?

gavmck commented 2 years ago

Can anyone provide a reproduction repo? This is working OK at our end.

duncanhunter commented 2 years ago

@gavmck I will try replicate it in a public repo and share here tomorrow. Thanks for the help.

gavmck commented 2 years ago

Thanks!

duncanhunter commented 2 years ago

@gavmck, here is a link to the repo in GitHub and the GitHub pages that replicates the issue.

gavmck commented 2 years ago

@duncanhunter Thanks! It looks like the theme switching is working, but the dropdown label/selected is not updating correctly. I'll take a look today.

duncanhunter commented 2 years ago

That is what it feels like to us just a cosmetic issue.

Thanks again.

gavmck commented 2 years ago

@duncanhunter That was very helpful. Fixed on 1.3.3 :)

duncanhunter commented 2 years ago

Awesome thank you!

keerthuakrish commented 2 years ago

@gavmck @duncanhunter Thank you so much for helping with this! Really appreciate your timely help.