Readers/Web/Dev notes/jQuery UI
Appearance
jQuery UI has been deprecated since 2017. Outside its usage by a lot of gadgets it is still used by several extensions. As part of T322000 the web team was indirectly posed the question about how much it should be caring about how these interfaces look as Vector 2022 evolves. While jQuery.UI functioned perfectly fine in Vector, the request was that jQuery.UI in Vector 2022 is styled the same as Vector.
Recommendations
[edit]- Work towards removing jQuery.UI https://phabricator.wikimedia.org/T49145
- After merging Consider the jQuery UI Vector theme frozen.
Current challenges
[edit]- Vector is a different skin from Vector 2022, but because of the name, various community/staff expectations exist that features built for Vector behave the same way as Vector 2022.
Timeline
[edit]November 14th 2022
[edit]A discussion occurred on the internal #core-experiences channel. Members of various teams was involved.
Background:
- jQuery.UI is functioning fine
- Currently interfaces built in jquery.ui are styled differently between Monobook and Vector. Currently Vector 2022 gets the Monobook styles
- Font-sizes differ
- In the Monobook styles all buttons are the same color. In Vector primary buttons are green (compared with Codex blue).
Summary of discussion:
- We should continue supporting deprecated code which is deployed in production. When we decide to drop support, we should delete it, rather than just leaving it there but not working correctly.
- It seems simpler to just include it though than to worry whether it causes more significant UX issue in some of those 15 extensions or the many gadgets that use jQuery.UI.
- The existing Vector 2022 theme is based on Monobook which is presumably also battle-tested just like Vector syles.
- People tend to complain when something they are used to changes, not when it stays the same
- The last update to the Vector skinStyles for jQuery UI was in 2014.
- Unclear how to migrate away. You can't add incentive for things. You can only add incentive for people. With most of these extensions long unmaintained, who would those people be?
- If migrating off jQuery UI is important enough, we should just convince management to allocate some time for it
- if weâre still including assets for a library thatâs been deprecated for five years, what does deprecation even mean?
- deprecations should be paired with some kind of sunset dates or formal expectation of how long we support deprecated libraries
- Strictly speaking, we don't have a deprecation policy for Javascript. The de facto JS deprecation process is removing the thing from checked-in code, then adding deprecation logging via mw.log.deprecate(), then sending some kind of message (e.g. Tech News) which describes the migration path, then usually waiting several years
- Things like sunset dates and formal expectations aren't really useful without being very clear about whose responsibility is to do it
- When it's assigned to a team, management has to accept significant delays in feature work by that team, which historically at least has been very uncommon.
- The last time we removing deprecated stuff affecting gadgets and other user scripts (a couple of years ago), there was a great deal of complaining (for a couple of weeks) about how unreasonable and surprising it was to remove code that had been emitting messages about deprecation (albeit hidden in the web console) for seven years.
- Should definitely deprecate jQuery.ui in MW core before we worry about that. Regarding gadgets would like to start by unblocking the ability of Gadget authors to use Vue and Codex easily
- It would be reasonable for Vector 2022 to restrict its jquery.ui-specific styles to what's needed to e.g. prevent the font-size in jquery.ui dialogs from being absurdly large/small
- The easiest way forward is just to load the jQuery UI styles in Vector 2022
- Web team discussed and is happy to just to load the jQuery UI styles in Vector 2022 provided designer/PM/community liason is okay with that and we consider the styles frozen from this date forward.
- nobody owns/maintains WikiLove (which uses jquery.ui)