-
-
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
Web Components scaffold not working in IE11 #10486
Comments
FYI we're fixing a bunch of IE11-related issues right now in core -- hopefully they will also fix your issue! e.g. #10471 |
Thanks @shilman are those going to land in a 6.0 release or an upcoming 5.x release? Just trying to figure out your timeline to see if it works with my timeline. |
They're big changes (tho maybe not technically breaking) so probably not in 5.3. 6.0 is going into beta this week, and targeting late May for a final release. #9311 |
@shilman is the 6.0.0 alpha build worth trying to see if the issue's already been fixed? |
@kevinmpowell wait for the next alpha, which should be ready in the next 12h |
@shilman it's still broken, looks like all the source isn't being compiled down to ES5. Is there a legacy mode I need to enable somewhere to support IE11? Some babel config or something? |
cc @ndelangen @tooppaaa IE11 - the gift that keeps on giving |
Just tried with latest alpha. I tried adding this to the preview-head.html but get an exceed stack issue (or IE being IE => very very slow) I can dig into making the web-component example working on IE 11 |
I think it's enough to get the manager working in IE11, and the preview is the user's responsibility. The more we can do get things working out of the box, the better, but definitely above and beyond the call of duty! |
@shilman FWIW the manager does work in IE11 in the latest 5.x release, it's the preview that fails. That's the part I'd really like to see working. There are examples in the preview of the web components scaffold, and that's the part that wasn't working to me. In the alpha the manager is also broken. |
@kevinmpowell when I navigate to https://next--storybookjs.netlify.app/official-storybook/?path=/story/addons-a11y-basebutton--default in IE11 it works. It's slow beyond believe, but it works. How do you test this? |
@ndelangen Are you tagging the wrong person here 😂? |
sorry! 🙇 |
@ndelangen I walk through the process here: https://youtu.be/olcRZZAPvfw |
@kevinmpowell thank you for taking the time to create this. That is very useful! You've tried everything I'd suggest.. So I'm kinda stumped too. I posted in our discord, asking for help on this one. Would you be able to test if this problem is actually also present on our 6.0.0-beta ? |
The missing lit-html dependency is also something we can easily fix! -wait here we go: storybook/app/web-components/package.json Line 56 in 0385c46
You should have received a peerDependency warning? Storybook kinda assumes you bootstrap it on an existing project, but really we should do better and add the peerDependencies, if we don't detect them being present. We can check for existing dependencies and add new ones here in the CLI code: storybook/lib/cli/src/generators/WEB-COMPONENTS/index.js Lines 20 to 37 in 519fc1a
|
After using the scaffolding, I found that I still needed to add my own polyfill (e.g. |
I guess we can add this when using the cli to scaffold a new project. I created #10630 to add the lit-html dependency. However I do reproduce the IE 11 not using the dll, I'll try to undestand why |
@tooppaaa I know that we fixed this manager not working in IE11. The DLL is required. I'm not confident we can port that fix to 5.x tbh, feels a bit risky to me. WDYT? |
@ndelangen The issue says 5.3, but I believe--from comments in related issues--that this is also a problem in |
The manager UI not working in IE11 is fixed in next for sure. |
I'd like to better understand if the transpilation errors mentioned above are due to us missing an expectation that the web components flavor of Storybook has of us, or if it's something that would need to be fixed at build/package time upstream before |
Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.9 containing PR #10725 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
@shilman Thanks for the update! I am indeed able to load the manager in IE 11 with the scaffold now. I'm unfortunately still seeing the same issue in my project as I've been seeing the last couple of releases (which could mean it's tangential to this issue). Here's what I'm seeing—happy to open a separate issue if you'd prefer! The untranspiled lines in question appear to be from Storybook's bundled
|
I'm looking at this. |
@daneah could you add What's hapening is:
So: Which leads to using semver from |
@tooppaaa I'm happy to try that—I'm not positive where the line is supposed to go 😅 |
In your |
Ah, that'd be why I'm not familiar. We're using |
Explicitly specifying |
Thanks for the feedback. I did find another way to avoid resolution. PR #10783 is under review. You still need to add the WebComponents polyfill to the preview yourself. |
Oh, that's great! I think that will be helpful in getting more people up and running with less fiddling 😄 We do have the polyfill loaded, so it may be something else! I should've been more specific about the issue—the loading spinner stays there and after a few moments IE11 says the page isn't responding. The whole IE11 interface becomes more or less unresponsive at that point. |
As @daneah mentioned, seeing the loading spinner on IE11 and the page stops responding. This is happening on |
@Niznikr Hello ! What's the console saying ? |
Hi @tooppaaa ! I do have the polyfills on my preview. I can't inspect the console because the page is unresponsive at the point in the screenshot. |
Looks like a |
Followed this recommendation and adding |
Describe the bug
The web components storybook scaffold does not work in IE11.
To Reproduce
Steps to reproduce the behavior:
Follow guide here: https://github.com/storybookjs/storybook/blob/4c64cdc0aca7d7485981f2fe766d6585112b28e1/app/web-components/README.md
cd my-app
npx -p @storybook/cli sb init -t web_components
npm install lit-html
- existing bug documents this: [src/generators/WEB-COMPONENTS] Missing dependency in generated application #9845npm run storybook
Expected behavior
I expected the examples to work in IE11.
Screenshots
Full video walkthrough of me scaffolding a project form scratch and testing in IE11: https://youtu.be/olcRZZAPvfw
Code snippets
If applicable, add code samples to help explain your problem.
System:
Environment Info:
System:
OS: macOS Mojave 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz
Binaries:
Node: 12.14.1 - /usr/local/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Browsers:
Chrome: 83.0.4103.14
Firefox: 74.0.1
Safari: 12.1.1
npmPackages:
@storybook/web-components: ^5.3.18 => 5.3.18
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: