Skip to content
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

Internet Explorer 10 #298

Closed
jonnylevy opened this issue Jul 6, 2016 · 8 comments
Closed

Internet Explorer 10 #298

jonnylevy opened this issue Jul 6, 2016 · 8 comments

Comments

@jonnylevy
Copy link

jonnylevy commented Jul 6, 2016

Hi,

I have setup some stories and storybook is working fine for me locally on latest versions of Chrome and Firefox on Mac OS 10.11.3 ,however, none of my stories are showing when I try on Internet Explorer 10 on Windows 7. It also seems to be failing silently so no error messages in the console.

I've noticed that this demo is not working on ie10 either: https://kadira-samples.github.io/react-storybook-demo/

Is ie10 not supported? What is the browser support for storybook?

Thanks

@arunoda
Copy link
Member

arunoda commented Jul 6, 2016

Yes. We have seen similar issues.
See: #213

Looking forward to do a proper fix.
@mnmtanish could you arrange proper fix plan for windows.

@bjankord
Copy link

bjankord commented Feb 8, 2017

I spent a bit of time looking at this today. From what I could find, there were 2 issues I ran into getting storybook to work in IE10.

The first issue is that storybook uses webpack-hot-middleware which requires an eventSource polyfill for it to work in IE10. This is why when you view storybook in IE10, if you open up the dev console you'll see the following message: webpack-hot-middleware's client requires EventSource to work. You should include a polyfill if you want to support this browser: https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events#Tools

This can be resolved by npm installing eventsource-polyfill and requiring it in @kadira/storybook/dist/server/config/polyfills.js

require('eventsource-polyfill');

IMO, storybook should add this to their polyfills.js file.

The second issue is related to flexbox styles not having vendor prefixes for IE. Storybook uses @kadira/react-split-pane to create the layout used for storybook. This project uses CSS-in-JS to style the <Pane /> and <SplitPane /> react components. These components use some flexbox styles but don't include IE vendor prefixes with these styles. This results in the <Pane /> and <SplitPane /> components rendering oddly in IE10. When I was looking at the <Pane /> component that wraps the iframe it had no visible display in IE10. This is why "none of my stories are showing when I try on Internet Explorer 10" @jonnylevy.

I tried seeing if I could add the vendor prefixed styles for flexbox to @kadira/react-split-pane but I didn't have much luck. I tried using postcss-js to create the vendor prefix but ran into issues mapping the output to react components. See this issue for more info. I also tried hard-coding the vendor-prefixes into storybooks src. This worked somewhat but there is some dynamic state based styling in @kadira/react-split-pane around when it applies flexbox styling that makes the hard-coded vendor-prefixes less than ideal.

Here is a screenshot of what I got in IE10.
screen shot 2017-02-08 at 3 42 56 pm

I'm not sure what the core contributors on storybook think of supporting IE10, but those are two places that need work to get this working in that browser.

@ndelangen
Copy link
Member

More information here:
#688 (comment)

@ndelangen
Copy link
Member

If we could support, we can put it on the roadmap.

@ndelangen ndelangen modified the milestone: v3.1.0 Apr 2, 2017
@ndelangen ndelangen added the ready label Apr 2, 2017
@ndelangen ndelangen added this to the v3.1.0 milestone Apr 2, 2017
@ronaldborman
Copy link

ronaldborman commented Jun 9, 2017

I also experienced the problems above in IE11. The first problem (the EventSource error message) was resolved by installing and requiring eventsource-polyfill (as described by @bjankord).

It looks like a solution for the second problem (the mangled display) is in tomkp/react-split-pane#207. Kadira/react-split-pane was a fork of this package, but since Storybook 3.0 the original package replaces the fork.

After downgrading bowser to version 1.6.1 (npm install bowser@1.6.1 --save --save-exact) my component is now rendered correctly.

That said, I don't have IE10 installed so I can't confirm it also works under IE10.

shockey added a commit to shockey/swagger-editor that referenced this issue Jun 29, 2017
Solves an IE11 issue with react-split-pane, see
storybookjs/storybook#298 (comment)
@ndelangen ndelangen removed this from the v3.2.0 milestone Jul 7, 2017
@ndelangen
Copy link
Member

On January 12, 2016 Microsoft announced end of support for IE10

If anyone wants to make it work, be my guest, but I don't see much value.
So really feel free to make a PR, fixing storybook for unsupported browsers, it's welcome!

But I will not spend time on it.

Related IE11 issues:
#1352 #213 #757

@Hypnosphi
Copy link
Member

I'm not really sure that encouraging usage of browsers that don't get security updates is a good idea at all
https://www.xfive.co/blog/stop-supporting-ie10-ie9-ie8/

@ndelangen
Copy link
Member

I'm going to close this, this remains unresolved.

A PR is still welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants