-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Using preview-url to view standalone Storybook - storysource addon doesn't work #10110
Comments
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! |
I'm still keen to resolve this. Might it end up being a non-issue when Storybook 6 is released, with support for @storybook/server, meaning I don't have to use a standalone Storybook setup? |
Yeah, |
Thanks Michael. Any ideas how far off you are from releasing |
Shooting for the 6.0 release in mid-May: #9311 |
@shilman I'm not sure In standalone the entire preview iframe is served by that external service. You could also combine the two and have the external service serve JS that the communicates with itself, although I don't think that's currently what In any case I think the As for what is going on here, I guess storysource is reliant on a webpack loader, right? You would have to replicate that behaviour in parcel somehow. I'm not too sure exactly what that means but perhaps @shilman could give a brief rundown of what the loader does. |
@jonspalmer can you confirm @tmeasday 's comment above? As for |
In hindsight, the I want to be able to view component source code (including configurable props), like the old
Thanks for your assistance with this bug... maybe it will help someone else, or will help you guys figure out a way forward to support people who absolutely want to use Storybook, but not with a Webpack bundler. |
@shilman Yup @tmeasday's comment is right that they're separate use cases. My sense is that it's pretty hard to get the preview-url approach working in non-trivial cases and we don't seem to have strong examples of it being used in anger. Yes you can bundle @storybook/client-api in your on preview Iframe but so much of the other bells and whistles are coupled more strongly (or dependent on webpack anyway) There isn't anything stopping @storybook/server responses from including script tags and my gut says we could use that mechanism for providing interactions depending on the use case. |
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! |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
Describe the bug
I have a working standalone Storybook HTML instance, using --preview-url option. I need to use standalone because I use Parcel for bundling, not Webpack.
However, I cannot get storysource addon to load source code for the standalone story.
To Reproduce
I have 2 minimal repos setup to demo the problem:
npm run storybook
from the standalone repo.npm run storybook:preview
from the preview repo, and selectY
to accept the new localhost port number.npm run storybook
from the preview repo to view its own demo story, then storysource works:I imagine the issue with using a
--preview-url
is to do with mapping the correctdirname
as specified in the storysource docs, but I can't figure out how to point to the story file in standalone repo???Expected behavior
Story source from standalone repo is displayed.
Screenshots
See above.
Code snippets
See repo links above.
System:
System:
OS: Windows 10 10.0.18362
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @
2.60GHz
Binaries:
Node: 12.14.1 - C:\Program Files\nodejs\node.EXE
npm: 6.13.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: 44.18362.449.0
The text was updated successfully, but these errors were encountered: