neos / neos-ui

Neos CMS UI written in ReactJS with Immutable data structures.
GNU General Public License v3.0
265 stars 135 forks source link

Login with IE11 on 3.2.x + does not work #2508

Closed sbruggmann closed 4 years ago

sbruggmann commented 5 years ago

After login, the "N"-screen is waiting forever.

Steps to Reproduce

  1. Login with to the backend Neos UI 3.2.0 or newer

Expected behavior

The backend appears

Affected Versions

Neos: Tested with 4.2 & 4.3

UI: Tested with 3.2 & 3.3

It worked with the Neos UI version 3.1

dimaip commented 5 years ago

Any JS errors in console at that point?

sbruggmann commented 5 years ago

@dimaip

image

Invalid Range: image

Closing Tag: image

dimaip commented 5 years ago

Invalid range is the only relevant thing here. OK, now we know where to start looking. Anyway with IE11 at hand is really welcome to give this a try, shouldn't be hard!

zickgraf commented 5 years ago

I tried to fix this but did not get far since there are multiple Issues:

The issue mentioned above is caused by 4c6528941d5e4b27bb82d651ff2ecfc1c00b6982. Apparently webpack 4 does not transpile the ES2015 u flag anymore. The regular expression causing problems is generated using an external website (see https://github.com/zickgraf/neos-ui/blob/37f9a90c7486be5fb0972740211f27e2cc139630/packages/neos-ui-validators/src/Alphanumeric/index.tsx#L8 and https://github.com/zickgraf/neos-ui/blob/37f9a90c7486be5fb0972740211f27e2cc139630/packages/neos-ui-validators/src/Label/index.tsx#L8), so this can easily be fixed by telling the website not to use the flag and updating the regular expression, see https://github.com/zickgraf/neos-ui/commit/37f9a90c7486be5fb0972740211f27e2cc139630

However, after this is fixed a new error caused by 9810daccdedcbd5251eb5e7217992a9af2a62a2c occurs. The update of d3-scale pulls in d3-array 2.0, which does not work in IE 11 (https://github.com/d3/d3-array/issues/89). So I pinned the version of d3-array to 1.2 (https://github.com/zickgraf/neos-ui/commit/d70c8b805c22c0859e83c9f54b2db21371ae40d7). However, now again a new error occurs ("const" must be initialized) which comes from d3-scale itself: https://github.com/d3/d3-scale/blob/7efbc46af0bb4d43745e99f2337881351d240f69/src/ordinal.js#L23

I see only two ways forward: include some transpiler to transpile the const (I do not know how to to this) or downgrade d3-scale. Would a downgrade be accepted?

dimaip commented 5 years ago

Hi, @zickgraf! Thanks for the amazing research on the issue!

Would a downgrade be accepted?

Absolutely. The only problem is that it's not possible to add code comments in package.json, so it's quite likely somebody would update it again in half a year... Maybe create a NO-UPGRADE file alongside it? Or maybe hijack the description field for this info? There's also react-collapse that shouldn't be upgraded.

include some transpiler to transpile the const (I do not know how to to this)

Actually it should have already been transpiled, but there's a typo: https://github.com/neos/neos-ui/blob/master/packages/build-essentials/src/webpack.config.js#L26 (d3_scale instead of d3-scale). Also include d3-array to the list and you are good to go. And yes, this solution is preferred to no-upgrade.

Thanks again for the amazing work!!

zickgraf commented 5 years ago

Thanks for the hints! Transpiling d3-array works and only one further thing was needed (an upgrade of typesafe-actions). I have just opened PR #2556 :-)

There's also react-collapse that shouldn't be upgraded.

Why should this not be upgraded? This page mentions IE11 as a supported browser.

dimaip commented 5 years ago

For unrelated to IE11 reasons, can't remember exactly

markusguenther commented 5 years ago

Can search the old PR from my last upgrade. But to honest also do not remember the reason. 🙂 but it is written down in the PR.

markusguenther commented 5 years ago

And sorry for the Typo. That was my fault 😕

markusguenther commented 4 years ago

https://github.com/neos/neos-ui/pull/1921

As described in the last try there was an issue with input fields. We now have version 5 available and can check that. So next try is updating to version 5.

But this is unrelated to that.