-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
[Bug]: Local stories not working when loading external refs #25957
Comments
Hello @nilpaco I'm looking into this, however the video cannot be played or downloaded, it seems. I'm looking at the stackblitz (thank you for including that!), however it's looking different for me: It's likely because I don't have access to the composed storybook. I tried following through to get access, but ran into trouble Can you assist me in getting this reproduced reliably? |
Never mind, I can reproduce this now, in stackblitz. |
Thank you, @ndelangen! Sorry for the oversight. Let me know if you need anything from me. I've tried different fixes, but any attempt seems to either break something else or fall short. |
I'm on the case! |
I have found a solution/fix and will open a PR soon! 🎉 |
thank you @ndelangen for the work! |
Describe the bug
I'm encountering an issue where the main documentation section of our Storybook project remains indefinitely in the loading state, despite the content having completely loaded. In the video you can see that deleting the
preview-loader
container the content is shown.Screen.Recording.2024-02-08.at.12.54.52.mov
The issue appears to be with how Storybook handles the loading of external references that share the same base URL with the stories loaded externally.
Example of conflicting URLs:
The previewInitialized state doesn't get properly updated because the URL matching logic incorrectly impacts the state of an external reference instead of the local story. (see findRef source code):
To Reproduce
Not the most elegant way but I've prepared a StackBlitz project that mimics a similar configuration. In this example, you can see that the external references match with the same URL, as previously mentioned.
https://stackblitz.com/edit/github-j9db22?file=.storybook%2Fmain.js
note: You may need to update the base url of the ref object.
System
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: