-
Notifications
You must be signed in to change notification settings - Fork 12
Other: Remove env.isEdge
. Closes ckeditor/ckeditor5#6202.
#333
Conversation
Remove some special cases for Edge, as since it's Chromium-based now, it behaves closer to others. BREAKING CHANGE: `env.isEdge` is no longer available in utils API, see #6202.
We could revert that change as it may be confusing one day. OTOH, I don't remember if for-each is identical to Array.from in terms of whether it works on a copy of a live collection and whether childNodes is a live collection. It would not be funny if we'd revert this change and it turned out that at some point between switching to Array.from and now we started relying on the static nature of a for loop over Array.from :D
No idea. You'd need to change this line: ckeditor/ckeditor5-engine@045fdad#diff-81db83bc0746c7f974c179f77699a073R1285 (which accepts space or nbbs) and run the tests.
By the comment, I think you can remove that try-catch now. I'd consider it in the scope of this ticket.
I'd assume the same. So he only thing to do here is removing the mention of Edge. That made me think that we may need to refresh all the assets (see https://github.com/ckeditor/ckeditor5-paste-from-office/tree/master/tests), but from what I can see we've got special assets only for Safari, not Edge. So it seems that Edge was getting the same HTML as Chrome and FF and thankfully we don't need to do anything here now. As for the linked code, I'd leave the current implementation unless you want to analyze what could've been there if not old Edge :D No idea. I'd just remove the comment. You could replace this var with the original calculation if it works in Edge. But we can live with that (although, I'd leave the comment as it explains the calculation). You can mention that it applied to old Edge. I'd remove it as it is as it feels more natural to me than using the attribute heavily.
I'd clean up the tests now.
I can see that one of the linked issues is solved. Also, dev tools should not cause any issues anymore as they use the same engine that Chrome uses. I know that we were able to close most Edge related issues once the Blink-based version was resolved, so I think that we can move Edge to the "Full support" section now. You can make a branch in the main repo for that. One more note – we use the |
Could you test whether we can remove this: https://github.com/ckeditor/ckeditor5-paste-from-office/compare/i/6202-remove-env.isEdge#diff-cfd2fd58320fbf691cd712eff0c462c3R48? I'm not sure at what point did those tests cause issue on Edge. I guess the easiest way to check that will be by running theses tests on Edge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed all changes and had just one comment there. All's good, in general.
I also replied to the linked code lines that were unclear.
I'll try to apply all the changes you requested. Just few more clarifying questions:
Do you mean "I'd remove it, as it feels ..." or "I'd leave it as it is, as it feels ..."
I did check it, and something was failing, but will investigate deeper, maybe it's something that is a low hanging fruit now. |
Regarding #333 (comment)
Sure, I'll change it. I just got used to adding short descriptions, as my memory is too bad to keep track of issue numbers. When I work on a few branches in the same repo, I like to have something meaningful to distinguish one from another. |
…r5#6202 Use, plain `for ... of .childNodes`, as agreed at ckeditor/ckeditor5-utils#333 (comment) .
… due to old Edge quirks. ckeditor/ckeditor5#6202. Agreed at ckeditor/ckeditor5-utils#333 (comment)
…keditor5#6202. Old versions of Edge were sprouting xmlns attributes for inner elements. Agreed at ckeditor/ckeditor5-utils#333 (comment)
1-4. done
6-7. done
New branches:
Do you want me to change the branch name, or just leave it, as it will be removed anyway after the merge? |
…or/ckeditor5#6202. Old versions of Edge were sprouting xmlns attributes for inner elements. Agreed at ckeditor/ckeditor5-utils#333 (comment)
I'd leave it as it is. Sorry :) |
The change in the engine breaks tests on FF so I'll change it to only cover the comment there. |
Then 8. is also done, by doing nothing ;)
|
Damn, you were 30sec faster than me. 🏁 🏎️ |
All done already :) In all repos other than this I merged this as an internal change because it does not need to be mentioned in their changelogs. Let's now hope that CI will pass. |
Use, plain `for ... of .childNodes`, as agreed at ckeditor/ckeditor5-utils#333 (comment) .
… due to old Edge quirks. #6202. Agreed at ckeditor/ckeditor5-utils#333 (comment)
…in latest Edge. #6202. Agreed at ckeditor/ckeditor5-utils#333 (comment)
Old versions of Edge were sprouting xmlns attributes for inner elements. Agreed at ckeditor/ckeditor5-utils#333 (comment)
Old versions of Edge were sprouting xmlns attributes for inner elements. Agreed at ckeditor/ckeditor5-utils#333 (comment)
Remove some special cases for Edge, as since it's Chromium-based now, it behaves closer to others.
BREAKING CHANGE:
env.isEdge
is no longer available in utils API, see #6202.Suggested merge commit message (convention)
Other: Remove
env.isEdge
. Closes ckeditor/ckeditor5#6202.Remove some special cases for Edge, as since it's Chromium-based now, it behaves closer to others.
Additional information
I removed all occurrences of
env.isEdge
and tests for specific behavior in case of its presence.Run
npm run test
for Firefox, Chrome. I didn't find any manual tests related to it, so I just check a few random ones.I was not sure, whether I should touch
https://github.com/ckeditor/ckeditor5-engine/blob/master/src/view/domconverter.js#L172
Was the initial, non-Edge/pre-Edge16 intent to use
domElement.childNodes.forEach
? (https://caniuse.com/#search=forEach). I leave it as it is, as it's still uniform cross-browser solution.https://github.com/ckeditor/ckeditor5-engine/blob/master/tests/view/renderer.js#L2059
I guess Chromium-based Edge is no longer an exception here, but I assume it may be still neded for Safari.
https://github.com/ckeditor/ckeditor5-image/blob/master/src/imageupload/utils.js#L96
According to https://developer.mozilla.org/en-US/docs/Web/API/File#Browser_compatibility since (Chromium-based) Edge 79 constructor is supported. However, I'm not sure whether it is in the scope of this issue.
https://github.com/ckeditor/ckeditor5-link/blob/master/src/linkui.js#L188
I haven't dive deaper, but assume it's needed for FF and not in scope of this issue.
https://github.com/ckeditor/ckeditor5-paste-from-office/blob/master/src/filters/space.js#L43 ...
https://github.com/ckeditor/ckeditor5-table/blob/master/tests/converters/upcasttable.js#L207 ...
https://github.com/ckeditor/ckeditor5-theme-lark/blob/master/theme/ckeditor5-ui/components/button/switchbutton.css#L93 ...
https://github.com/ckeditor/ckeditor5-ui/blob/master/src/inputtext/inputtextview.js#L119 ...
https://github.com/ckeditor/ckeditor5-ui/blob/master/tests/icon/iconview.js#L134
Seems 5-9 could be simplified, but I assume that it is not in the scope of this issue.
And naturally we could consider updating https://github.com/ckeditor/ckeditor5/blob/master/docs/builds/guides/support/browser-compatibility.md#desktop-environment
Branches on other repose linked to this change:
https://github.com/ckeditor/ckeditor5-image/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-engine/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-horizontal-line/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-media-embed/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-mention/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-page-break/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-paste-from-office/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-table/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-widget/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-link/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-theme-lark/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5-ui/compare/i/6202-remove-env.isEdge
https://github.com/ckeditor/ckeditor5/compare/i/6202-remove-env.isEdge