-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Addon-docs: DocsPage Controls don't update iframe stories #11908
Comments
i was experiencing something similar to this with react |
I've been observing controls not updating the render on the canvas tab, with react |
@michaelbayday @petermikitsh do either of you have a repro you can share? haven't seen that yet. |
Reproduction is now showing the controls and showing the issue |
The problem is the story: https://github.com/blowsie/storybook-vue/blob/master/src/TestComponent.stories.js#L11 Try:
|
Fixed my issue, thanks! |
@shilman No repro; my observation was a hiccup on my upgrade from 5 to 6. My apologies! |
So for me i also have this issue with angular -> here is an example repo: |
Can be observed here as well: https://storybookjs.netlify.app/angular-cli/?path=/docs/docbutton--basic |
Scouring around, this workaround got my Docs page re-rendering with changes to controls (for React implementations, but perhaps could also work for Vue?):
Note the import and spread of |
@jamesjenkinsjr if you needed to do this it's due to a configuration problem and not related to the iframe issue here. I just want to clarify for anybody who stumbles across this to avoid confusion. |
I am closing this because it works appropriately in Storybook 7. Please feel free to reopen it with a reproduction on Stackblitz (https://storybook.new) |
It doesn't, at least in storystore v6 mode |
This makes sense to me... perhaps it should only be to the primary story, since that's what the Controls block is typically affecting? Edit: unless the message already has the story ID encoded so the story itself knows to not update if the message sent doesn't match |
@probablyup could you provide a simple reproduction on stackblitz? https://storybook.new |
If you go to the Buttons "Docs" story you can see that I added the following to the meta config:
After adding this, changing the controls for the primary story has no effect. |
@valentinpalkovic I believe this issue affects v7 mode also. |
I don't think we can or should be that specific in the forwarding, I think we should just forward every message on from the manager -> sub previews. Otherwise it'll be confusing (and harder to do!).
That's correct. The storyId is encoded in the message. |
Yes, that makes sense @tmeasday |
We also ran into the problem today. Is a quick fix available? |
No quick fix yet @seriouz |
Any news on this? Facing same issue. |
I'm also facing this issue. I need to set the iframe height for my stories, but because of the
Is there any other way to set the iframe height? |
If you want to set the height of the story preview only without setting the {
parameters: {
docs: {
story: {
height: '300px'
}
}
}
} |
I noticed Storybook styles colliding into the inline stories, so I then thought to use the iframe mode to prevent that. And now I'm faced with the realization that controls do not working with iframe stories in docs page. I've created a PR that would let users know of this current iframe stories + docs + controls limitation in the docs #25593 |
Controls don't update iframed stories on the
Docs
tab, but do update on theCanvas
tab.For frameworks that support inline rendering (
react
,vue
,web-components
, etc.), making the docs stories render inline is a workaround.The text was updated successfully, but these errors were encountered: