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

Storybook 5.x canvas view broken #37

Open
cemusta opened this issue Oct 24, 2019 · 11 comments
Open

Storybook 5.x canvas view broken #37

cemusta opened this issue Oct 24, 2019 · 11 comments
Labels
bug Something isn't working good first issue Good for newcomers pending Waiting for some reason

Comments

@cemusta
Copy link

cemusta commented Oct 24, 2019

We are using storybook 5.x with styled-component-theme addon, here the full versions:

    "@storybook/addon-actions": "5.2.5",
    "@storybook/addon-knobs": "5.2.5",
    "@storybook/addon-notes": "5.2.5",
    "@storybook/addon-options": "5.2.5",
    "@storybook/addon-viewport": "5.2.5",
    "storybook-addon-styled-component-theme": "^1.2.5",
    "@storybook/react": "5.2.5",

There was no error on the browser and the storybook console however when I click the 'canvas view' button, the canvas view only shows a blank page.

image

After disabling all plugins one by one, I noticed styled-component is the culprit.

Just removing the addDecorator part is enough for making canvas view again.

Live links:
https://mph-global.appspot.com/

Sample story:
https://mph-global.appspot.com/?path=/story/welcome-to--storybook

Not working canvas view:
https://mph-global.appspot.com/iframe.html?id=welcome-to--storybook

@echoulen echoulen added good first issue Good for newcomers bug Something isn't working labels Oct 29, 2019
@vpapadopou
Copy link

I'm having the same issue too, any ideas on what is causing this?

@eyalse
Copy link

eyalse commented Jan 21, 2020

same here (had to disable) after updating to storybook 5.3

@amitzur
Copy link

amitzur commented Feb 25, 2020

@echoulen so, this was labelled as a good-first-issue. Can you provide a pointer to how to fix this?
Thanks!

@sami616
Copy link

sami616 commented Mar 4, 2020

This is also a pain point for me. Also happy to help with anything to fix this

@nicolabella
Copy link

I am having this same issue. Is there a fix or workaround?

@majklovec
Copy link

Have switched to https://github.com/semoal/themeprovider-storybook and preview works.

@sami616
Copy link

sami616 commented Mar 5, 2020

Thanks @majklovec this solved my issue

@nicolabella
Copy link

Worked for me too. Thanks @majklovec!

@samlucax
Copy link

samlucax commented Apr 2, 2020

Worked for me too, great! Thanks @majklovec !

@sami616
Copy link

sami616 commented Apr 3, 2020

I unfortunately ran into some rendering issues with ‘themeprovider-storybook’ so ended up switching to the more generic ‘addon-contexts’ which is perfect!

https://www.npmjs.com/package/@storybook/addon-contexts

@ghernandezr
Copy link

Thanks!!! @sami616 , I solved my issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers pending Waiting for some reason
Projects
None yet
Development

No branches or pull requests

10 participants