You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In previous releases, navigating to a new story using the sidebar seems to have only resulted in a js navigation event inside the preview iframe.
Unfortunately, since 5.1.0-alpha.37 (specifically this PR: #6688), navigating to a new story has started to trigger a full page load inside the iframe, which can add quite a bit of friction for large projects that have several MBs of JS to load, parse and run.
I imagine there's probably some existing mechanism in storybook that turns route change events in the top level frame into js navigation events inside the preview iframe, otherwise the route inside the iframe would have never changed prior to #6688.
Maybe we can fix deep linking by tapping into that functionality instead of re-rendering the iframe?
The text was updated successfully, but these errors were encountered:
The reason that #6688 was needed was due to the iframe not yet being initialized when the first event was sent over the channel; thus the usual mechanism not working.
I guess we need to
(a) Explicitly ensure the src of the iframe never changes. Previous to #6688 this happened but it was really just an accident AFAICT.
(b) figure out some mechanism for buffering the initial events that are sent over the channel before the iframe intializes (or some other mechanism to achieve the same effect).
(b) figure out some mechanism for buffering the initial events that are sent over the channel before the iframe intializes (or some other mechanism to achieve the same effect).
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!
Describe the bug
In previous releases, navigating to a new story using the sidebar seems to have only resulted in a js navigation event inside the preview iframe.
Unfortunately, since 5.1.0-alpha.37 (specifically this PR: #6688), navigating to a new story has started to trigger a full page load inside the iframe, which can add quite a bit of friction for large projects that have several MBs of JS to load, parse and run.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Content should not blink, and network logs should show no new resources getting loaded.
This can be verified with the official storybook instance following the same steps (or simply see gifs below): https://storybooks-official.netlify.com/?path=/story/addons-backgrounds--story-1
Screenshots
Behavior after #6688:
Expected:
System:
Additional Context
I imagine there's probably some existing mechanism in storybook that turns route change events in the top level frame into js navigation events inside the preview iframe, otherwise the route inside the iframe would have never changed prior to #6688.
Maybe we can fix deep linking by tapping into that functionality instead of re-rendering the iframe?
The text was updated successfully, but these errors were encountered: