-
-
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
head.html is not loaded in storyshots #894
Comments
I'm also having the issue with 4.5.0. Is there any solution to this ? |
Reproduced here: https://github.com/tmeasday/storybook/tree/issue-894 Note that (a) the tests fail in the |
@tmeasday thanks for creating a repro. my understanding: Added the following
|
@shilman -- correct. It's just that storyshots doesn't respect that, so the environment a story renders in in the UI (the preview window) is different from how it is rendered in the test (with a simple |
@tmeasday oh sorry this is a storyshots issue. my misunderstanding! |
Hmm, thinking about this some more, I'm not sure there is a good solution to the problem. Does any one have any good ideas? |
see: 5c0eb41 it should work with either, but it's officially renamed to |
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 60 days. Thanks! |
Looking at this again, I reckon the real "solution" here is to not put JS includes in I wonder if the problem (needing static includes) could be solved in some other way, like a require from |
You always can insert scripts dynamically:
You can even extract it into a helper function which would accept src string |
Perhaps @eric-burel or @HBCharles could confirm if the above technique, as posted by @Hypnosphi helps? |
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 60 days. Thanks! |
Did anyone find a solution to this? I want to start using StoryBook as part of our front-end development workflow on Vue projects, but having done some testing tonight I have come across this problem. Attempting to include:
Within preview-head.html did not work, neither did including a script and dynamically attempting to reference the file, as below.
I'm simply getting 404s for both methods. |
@johnend -- did @Hypnosphi's solution work for you? |
Sorry just updated, posted too early. |
I'm wondering if it might be cross origin stuff going on due to the use of iFrames? |
You can try to add that code to |
@johnend -- the So the solution as suggested by @Hypnosphi is to try to avoid including JS code in |
Ok so having done that, I'm still getting a 404 for the script for font awesome. Tag is being included in the head and is referencing the correct folder. Just updating to let you know. |
@johnend is this in storyshots or regular storybook now? |
This is in regular storybook. Sorry I think I’ve posted my comments on the wrong issue. Didn’t realise storyshots was an add on and not just the iframe for the components. |
No worries. I suspect maybe you need to use the -s option to set the static
directory?
…On Tue, 16 Jan 2018 at 7:23 pm, John Enderby ***@***.***> wrote:
This is in regular storybook. Sorry I think I’ve posted my comments on the
wrong issue. Didn’t realise storyshots was an add on and not just the
iframe for the components.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#894 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIFyjilirTEMXMFI87x5WxIGZXvGb-8ks5tLFyKgaJpZM4M-aVF>
.
|
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 60 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! |
Issue by eric-burel
Tuesday Apr 11, 2017 at 09:47 GMT
Originally opened as storybook-eol/storyshots#96
In v2.1.0,
.storybook/head.html/
does not seem to be taken into account. My issue is that its where I load jQuery, which is mandatory for bootstrap to work (I found no other solution than usinghead.html
to get Bootstrap working with webpack).Edit: same issue with 3.1.1 so far, I am trying to find a solution.
The text was updated successfully, but these errors were encountered: