Page MenuHomePhabricator

Formally deprecate jQuery UI after we've stopped using jQuery UI in extensions and core (replacing it with OOUI).
Open, HighPublic

Description

The Agora styles http://www.mediawiki.org/wiki/Agora are implemented in a 'mediawiki.ui' module. Kaldari points out that we have overlapping button styles in jquery.ui.button, e.g. 'mw-ui-button mw-ui-primary' vs 'ui-button ui-button-red'.

Details

Reference
bz47145

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:31 AM
bzimport set Reference to bz47145.
bzimport added a subscriber: Unknown Object (MLST).

jQuery UI should die. We should take the good bits and put them into mediawiki ui

swalling wrote:

(In reply to comment #1)

jQuery UI should die. We should take the good bits and put them into
mediawiki
ui

Is there an easy way to grep for what parts of jquery.ui we're using anywhere? If we can get a list, I will help do an audit of we are doing with jquery.ui that needs to be supported by mediawiki.ui (and potentially oo.ui/ve.ui, which is being split out of VE right now).

You can grep for jquery.ui in the checkout of core and all WMF-deployed extensions, and use regular Special:Search for a wiki (just make sure the right namespaces are checked). However, that might miss extensions, gadgets and user scripts that don't declare their dependencies (they should always be declared when possible, but not everyone is aware of this). There are definitely places that use it; however, the fact that it is loaded by default (e.g. on the main page) is a problem (bug 55550).

This isn't going to be an overnight transition. mediawiki.ui needs to mature a lot, and jquery.ui is being used a lot of places (including gadgets and userscripts). Thus, it will probably need to be kept around for a while (though not loaded by default), even when mediawiki.ui has feature parity and is being used by extensions.

Ricordisamoa added a subscriber: Ricordisamoa.
Jdforrester-WMF renamed this task from Deprecate jquery.ui formally and transition everything to a single replacement (mediawiki.ui or whatever) to Formally deprecate jQuery UI and transition everything to OOjs UI.May 25 2015, 9:20 AM
Jdforrester-WMF renamed this task from Formally deprecate jQuery UI and transition everything to OOjs UI to Formally deprecate jQuery UI after we've transitioned everything to OOjs UI.
Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF added projects: Epic, OOUI.
Jdforrester-WMF set Security to None.

Does "everything" includes on-wiki gadgets depending on modules such as jquery.ui.dialog, jquery.ui.tabs, jquery.ui.button? There are quite a few which will need to be updated:
https://en.wikipedia.org/wiki/MediaWiki:Gadgets-definition
https://pt.wikipedia.org/wiki/MediaWiki:Gadgets-definition
etc...

(also, this task needs a better description for users coming here without any context)

Does "everything" includes on-wiki gadgets depending on modules such as jquery.ui.dialog, jquery.ui.tabs, jquery.ui.button?

No. As normal, we'll deprecate once git is clean of depending the deprecated code, and not wait for gadgets, site scripts and user scripts to be updated. However, we'll advertise (widely) with a long period of deprecation before it's removed, and give suggestions on how to convert.

Mattflaschen-WMF renamed this task from Formally deprecate jQuery UI after we've transitioned everything to OOjs UI to Formally deprecate jQuery UI after we've stopped using jQuery UI in extensions and core (replacing it with OO UI)..Jun 4 2015, 11:44 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 7 2015, 7:37 PM
kaldari added a subscriber: kaldari.Oct 8 2015, 4:38 PM

FYI: RefToolbar, which is a default gadget on English Wikipedia, and a very important tool for editors, relies on jQuery UI for dialogs. It also doesn't have a maintainer since the tool's creator has retired. Community Tech could probably take on the task of updating it, but if we're going to replace the WikiText editor before jQuery UI is deprecated, it would be a waste of time.

Does rMW9e712ce6382f: Deprecate various ResourceLoader modules count as "formally deprecating"?

I understood that the plan was to do the "stopped using jQuery UI in extensions and core" bit, then (this task) announcing that it was deprecated and would eventually be removed.

All extensions should be updated, but shoulden we be using ooui instead of mw ui, I thought mw ui is also deprecated and replaced by ooui?

Krinkle removed a subscriber: Krinkle.
Volker_E renamed this task from Formally deprecate jQuery UI after we've stopped using jQuery UI in extensions and core (replacing it with OO UI). to Formally deprecate jQuery UI after we've stopped using jQuery UI in extensions and core (replacing it with OOUI)..Nov 7 2017, 11:18 PM
Perhelion added a subscriber: Perhelion.EditedDec 14 2017, 8:09 PM

I guess on Commons the module must be installed locally, as there are to much gadgets using this.

There are lots of gadgets on lots of wikis that use jQuery.ui. Regardless of whether MediaWiki itself uses jQuery.ui, I think it would still be a good idea to make it available as a module for gadgets indefinitely.

There are lots of gadgets on lots of wikis that use jQuery.ui. Regardless of whether MediaWiki itself uses jQuery.ui, I think it would still be a good idea to make it available as a module for gadgets indefinitely.

Yeah, it's going to be hard for communities that don't actually have people supporting their gadgets (though that situation isn't really meant to happen), and it isn't appropriate yet for some edge cases to migrate to OOUI. However, at some point we're going to have to stop shipping it, and not just by moving it on-wiki.

Krinkle added a comment.EditedDec 14 2017, 9:36 PM

There are lots of gadgets on lots of wikis that use jQuery.ui. Regardless of whether MediaWiki itself uses jQuery.ui, I think it would still be a good idea to make it available as a module for gadgets indefinitely.

For the record, keeping anything has a non-zero maintenance cost. In particular for jQuery UI because we're using an outdated version.

https://github.com/wikimedia/mediawiki/commits/317aa201/resources/lib/jquery.ui
https://github.com/wikimedia/mediawiki-skins-Vector/commits/d4eabd9d10/skinStyles/jquery.ui
https://github.com/wikimedia/mediawiki/blob/317aa201/resources/lib/jquery.ui/PATCHES
https://github.com/wikimedia/mediawiki-skins-Vector/blob/d4eabd9d10/skinStyles/jquery.ui/PATCHES

Given our version is now far beyond jQuery's LTS/EOL, we need to either start taking over maintenance of this legacy version as soon as possible (starting with an overdue security review), or we need to start migration to a newer version. It sounds like we want to avoid migration due to unmaintained gadgets (or we could encourage migration to OOUI). Although arguably migrating to a newer jQuery UI version should be much simpler compared to migrating to OOUI, either would require hands-on coding, and either would result in truly unmodified code to break.

I'm not proposing anything right now, but it should be unsurprising that we cannot indefinitely support unmaintained gadgets by indefinitely shipping upstream-unsupported software as-is, without maintenance or responsibility for finding and addressing likely security vulnerabilities.