Page MenuHomePhabricator

Determine whether the shared component library should support IE11
Closed, ResolvedPublic

Description

Summary

Should MediaWiki and our shared UI component library continue to support IE11 (and ES5)?

Considerations

Why does this matter?

Shared library code will live outside of MediaWiki, meaning it will be easier to use certain build tools to automatically transpile code back to ES5. We won't need to write shared component code in ES5. Regardless of transpilation tools, Vue 3 cannot support IE 11 due to its use of Proxy objects. Continuing to support IE 11 would require staying on Vue 2, and not upgrading to Vue 3.

MediaWiki provides a version of Vue (currently 2.6.11) in the vue ResourceLoader module, which is used by (almost) all code that uses Vue in MediaWiki or its skins and extensions. If this version of Vue is upgraded to Vue 3, we will not be able to support IE 11 for any Vue features in MediaWiki, even if the migration build of Vue 3 is used and even if those features are written using Vue 2-compatible code. Continuing to support IE 11 would require the MediaWiki-provided version of Vue to stay on Vue 2, which would mean nothing in MediaWiki or its extensions/skins could upgrade to Vue 3 (unless we make Vue 2 / Vue 3 coexistence work, which is possible in principle).

Compatibility policy and IE statistics

The WMF has updated its compatibility policy to state that new products don't need to support IE11. Any ResourceLoader modules with the es6: true property simply won't be delivered to legacy browsers at all.

IE11 support has significantly tapered off since early 2020 – as of July 2021 we're down to a daily average of 0.7% across all sites (desktop and mobile). For desktop traffic alone, the share is only slightly higher at 1.8%.

Existing projects

There are several existing Vue.js projects that already support IE11 (WMDE features, Commons MediaSearch, etc). What should happen to these features?

Relevant Links
  • T285045 Consider dropping IE support in WiKit

Questions

1. Will the new shared component library support IE 11, meaning it will need to be built with Vue 2?

Design Systems Team proposal: No. See T286948 for further discussion and our proposed path forward.

2. Will MediaWiki support IE 11 for Vue code, meaning its Vue version would need to stay at Vue 2?

Design Systems Team proposal: No. See T286948 for further discussion and our proposed path forward.

3. What happens to existing projects that support IE 11?

Design Systems Team proposal: Provide a no-JS fallback experience for IE users. Some projects, e.g. MediaSearch, already include this for no-JS users, it would just need to be extended to users with no ES6 browser support.


Decision

The new shared Vue component library will be built using Vue 3, meaning that we will stop providing these (JS-based) features to users of legacy browsers like IE11. Instead, a non-JS fallback should be provided where necessary. The Design Systems Team will work with the Product Department to come up with a clear policy around where and how such no-JS fallback interfaces should be provided.

At some point in the near future, the copy of Vue.js shipped with MediaWiki will be updated to use the 3.2 compatibility build. When this happens, all Vue.js features will stop working in IE11 (and other ES5-only browsers). Developers should update their code to use the es6: true flag in ResourceLoader.

JS features that do not use Vue (OOUI-based interfaces, VisualEditor, etc) will not be impacted and their ability to support legacy browsers is unchanged. However, we expect that over time more and more new features will follow suite in dropping JS legacy browser support, whether or not they are built using Vue.js.

Event Timeline

AnneT renamed this task from Determine whether the shared component library support IE11 to Determine whether the shared component library should support IE11.Jul 19 2021, 8:57 PM
AnneT updated the task description. (Show Details)
AnneT subscribed.

I just wanted to establish my position statement on this topic before we go into this discussion. My position is that we should not support running JavaScript in IE11 for any of our code (not just the shared component library!) and the fact that we do right now is a disservice to our users.

First, we must get a shared understanding of what "support" means in this context. Supporting a browser does not necessarily mean running JavaScript in that browser and I think there is a miscommunication between engineers and products in this respect. Many of our key features e.g. editing are usable without JavaScript and we support them very well. Currently, if an error occurs in IE11 in the editor, that could break the editor and break the workflow. That's not true in a non-JS version.

I understand we are running JavaScript for IE11 based on browser usage being significant, but I would argue that it's dangerous to say we support IE11 based on browser usage alone. If anything high browser usage should be considered a reason to not use IE11.

Why? Well, if we truly support IE11 we would be QAing and building for IE11. From what I can see this is not happening. How many developers using Vue.js are actually testing their code in IE11 at the time they implement it? My team certainly doesn't, and the only time I boot up Browserstack is when I need to debug an issue that's already happened in production.

On top of this, we do not have the infrastructure in place to test IE11. I don't think we have Selenium integration tests running there, I don't think we collect data in A/B tests there, and we definitely do not track client errors in our software as it doesn't have beacon support. Currently, ES5 browsers we do log errors for (including old versions of Chrome), contribute about 50% of all our client errors. This alone should send us a signal that IE11 is likely similarly erroring if not more.

Dropping IE11 support is the right thing for both our users and the Wikimedia development teams.

I'm with Jon on this. Anyone still using IE11 would be better off with the noJS solution and I think it wouldn't be prudent to stay on Vue2 for a small percentage of users.

+1 Jon. Eventhough this ticket is about shared component library, please note that if that does not support IE11, we are setting the baseline for all applicaitons that use this component library. So effectively this ticket is not just about shared component library.

For build system based projects, since browser specific bundles are not common, including IE11 in browserslist implies larger bundlesize(polyfills and so on) for everybody, not limited to IE 11 users.

egardner updated the task description. (Show Details)

For completion, repeating from the session at the summit, the task on general requirement change is T178356: Raise Grade A JavaScript requirement from ES5 (2009) to ES6 (2015)