Problem/Motivation
In #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0 we removed a bunch of IE11-only polyfills.
The only thing that remained are their definitions in core/core.libraries.yml.
Their sole reason for existence was to trigger a deprecation warning for removal in 11.0.0.
Proposed resolution
Since we can now diverge between 10.3 and up and 11.x, let's remove those deprecation triggers in this issue.
Original IS below
Postponed on #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0, these should be deprecated in 9.4.x before they are removed from 10.0.x
Problem/Motivation
Drupal 10 will drop support for Internet Explorer 11: #3155358: [policy, no patch] Drop IE11 support from Drupal 10.0.x. Drupal ship with number of polyfills to accommodate JScripts lack of modern features supported by other JavaScript engines.
Proposed resolution
Based on comments in the core/misc/polyfills files, it seems like all of the polyfills in that folder could be deleted. On top of that, we have couple of polyfills in package.json. From the package.json, we could remove following packages:
core/css.escapecore/drupal.array.findcore/drupal.nodelist.foreachcore/es6-promisecore/picturefillcore/drupal.element.closestcore/drupal.element.matchescore/drupal.string.includes- postcss-calc
- #3272425: Remove Details Aria Polyfill - this is broken out because it needs extensive screen reader testing
Remaining tasks
Complete the issue where these libraries are deprecated in 9.4.x
👉 #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0
Simply remove these in 10.0.x. We confirmed there is no error if a polyfill is removed even if a module/theme continues to list them as a dependency. The deprecations are available in 9.4 for those who require supporting IE11 etc and have to manually add support that D10 no longer includes.
User interface changes
API changes
Data model changes
Release notes snippet
Drupal 10 will not support Internet Explorer, which means all the polyfills necessary for IE will be removed. Existing code will not need to be changed.
| Comment | File | Size | Author |
|---|
Issue fork drupal-3238501
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
kostyashupenkoInitial two patches.
The first one without
yarn build:cssComment #3
longwaveDo we need to deprecate these core libraries in 9.x for removal in 10?
Comment #4
longwaveComment #5
mherchelAdding some additional polyfills that can be removed.
Comment #6
nod_Comment #7
nod_The associated js packages needs to be removed from
package.jsonandcore/scripts/js/assets.jsas well.Comment #8
chi commentedCan we remove the `postcss-custom-properties` plugin as well?
Comment #9
chi commentedI think it has nothing to do with IE 11.
Comment #11
kostyashupenkoMoved to gitlab.
10.0.x branch was widely updated for the past 4 months, so need to review again changes in #2 and fix remaining things
Comment #12
kostyashupenkoReady for review
Comment #13
nod_umm, we're removing without deprecating first. Probably need a green light from the release managers.
Comment #14
nod_looking at contrib usage, it's very low but I think we should still deprecate first in 9.4 before removing those libs. A followup for the deprecation should be opened.
Postponing this one, we should have the deprecations before actually removing the files.
Comment #15
nod_A bit too quick with the postponing
Comment #16
kostyashupenkoAdded #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0
Comment #17
mxh commentedAny chance to have a D10 contrib project that holds the dropped polyfills?
Edit: nevermind. Checked for my project and this is a minor thing that I can take care on my own.
Comment #18
cilefen commentedFWIW I think IE is the only remaining user of core/drupal.date. See #3256549: Deprecate core/drupal.date asset library in 9.4.0
Comment #19
mherchelComment #20
mherchelCreated a Tugboat preview of this at https://3238501-remove-polyfills-faf2jeeweess1xalhfhpahdzqo0yct0k.tugboa....
Note this is based off the Olivero tugboat db, so Olivero's and Claro are set to be the default themes. That being said, this should do well for testing.
Comment #21
xjmComment #22
xjmOops, wrong issue.
Comment #23
bnjmnmComment #24
murilohp commentedAre we gonna keep the
core/misc/polyfills/array.includes.jspolyfill? Looking at the MR I haven't found the file being removed.Comment #25
lauriiiI'm a bit confused about #23; it is saying that we could simply remove these libraries from Drupal 10.0.0 since we don't trigger errors for referencing non-existing libraries, but it still postpones this on #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0 🤔
Comment #26
catchDiscussed this with @lauriii, summarised in #3263823-10: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0. Our existing deprecation policy just does not work for polyfills, because they aren't really an API as such and there is not really a replacement or anything for people to use.
Because (luckily) missing library dependencies doesn't trigger a warning, the least-disruptive option is actually to just remove these outright in 10.x without a 9.x deprecation.
Yet another option would be empty, deprecated, libraries in 10.x for removal in 11.x, but that would contradict our attempt to not add 10-for-11 deprecations in 10.0.0.
Given all that, I think we need to update the bc policy with a specific section for polyfills, but also should just go ahead and remove the definitions here with a change record.
Comment #27
nod_added release note text
Comment #28
nod_Overall looks good, few details
The picturefill package needs to be removed from package.json and vendor-update script. As-is vendor update crashes because it tries to copy files that do not exist in node_modules
Comment #29
xjmComment #31
longwaveThis MR touches postcss.config.js - that is actually unused so #3086931: Remove unused postcss.config.js would be good to get in as well.
Comment #32
spokjeSo here's what I did:
- Updated MR with the latest from
10.0.x.- As recommended by nod_ in #28 I removed
picturefillfromcore/package.json.- Removed stuff from
core/scripts/js/vendor-update.jsthat's deleted in this issue. Ran it locally and it doesn't crash.- Removed
core\modules\responsive_image\js\responsive_image.ajax.es6.jsand it's js counterpart, since it was only adding the now removedpicturefill.- Removed
core\modules\responsive_image\responsive_image.libraries.ymlsince that was only adding the now removedresponsive_image.ajax.es6.js.- Removed comment and help references from
core\modules\responsive_image\responsive_image.moduleregardingpicturefill.- Ran
yarn installwhich made changes incore/yarn.lock.- Since a lot of files were deleted, I recreated
core/misc/cspell/dictionary.txt.- Needed to do a
yarn run build:css -- --file themes/olivero/css/base/variables.pcss.cssto pass CS checks.Comment #33
spokjeComment #34
nod_Haven't looked closely yet but this is looking good to me
Comment #35
longwavePatch is looking good to me too, haven't tested enough to RTBC yet though. One thing I spotted:
If everything supports <picture> now, can we remove the fallback image in a followup?
Comment #36
mherchelI would say yes.
Comment #37
spokjeFollow-up issue for removal of the fallback image functionality: #3292249: [PP-1] Remove fallback image from responsive_image module
Comment #38
mherchelIn addition to reviewing the patch, I took Drupal on a test drive with the console open to see if there were any errors. I paid special attention to the admin interfaces that did more heavy JS stuff (media, views, tabledrag pages, etc). I performed this on Chrome, Firefox, and Safari.
I couldn't break anything (well anything new!), and the patch looks good!
Comment #40
catchGot excited about this and committed it, but then re-read the whole issue and #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0 and reverted again.
We need to do #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0 first, so marking postponed. I unpostponed in #3238501-26: Remove empty and deprecated IE11 polyfill library stub entries in 11.0.0 when marking the other issue duplicate, but when we went through the whole thing again and un-duplicated it, and that discussion never got back here.
Also see all the discussion in #3263823-10: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0 to #3263823-19: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0 - we ended up deciding to empty out the libraries in 10.0.x and deprecate them in 10.0.x for removal in 11.0.x
Let's get the other issue finished first, and this will end up being an 11.0.x issue once there's a branch open.
Comment #42
catchbtw about 95% of the patch here is usable in that issue, the only difference should be leaving empty, deprecated stubs in core.libraries.yml, but all the code removal and usage removal will be 100% the same.
Comment #43
catchComment #44
xjmComment #45
spokjeBlocker #3263823: Empty out and deprecate drupal libraries which are related to Internet Explorer 11 polyfills in 10.0.x for removal in 11.0.0 is in, also swapping to #3295574: [meta] Remove deprecated classes, methods, procedural functions and code paths outside of deprecated modules on the Drupal 11 branch as parent and lowering priority to normal
Comment #46
spokjeComment #47
catchComment #48
gábor hojtsyUpdating title, tags and version number based on recent announcement at https://www.drupal.org/about/core/blog/new-drupal-core-branching-scheme-...
Comment #49
spokjeComment #53
catchI don't think this is the last IE reference we have in core, but one less is always good, even if it's just the library remnants.
Comment #55
nod_Committed 563e61a and pushed to 11.x. Thanks!