jQuery UI is a library that was added to MediaWiki in version 1.16, in 2010, at the same time as its "sister" library, jQuery. jQuery remains popular (and extremely useful), but jQuery UI is not popular, at least among MediaWiki developers: MediaWiki devs have wanted to get rid of it since at least 2013 (see T49145). It will undoubtedly be removed from MediaWiki at some point, though that could be years from now. But there are various reasons to try to get rid of it already in Page Forms. For one thing, development on jQuery UI seems to have stopped abruptly in 2016. For another, the library that MediaWiki devs have created as a replacement for jQuery UI - OOUI - does have certain advantages, such as much better support for internationalization.
Here are the current uses of specific jQuery UI "widgets" in the Page Forms extension:
- jQuery UI Autocomplete is used for autocompletion within #forminput
- jQuery UI Autocomplete is used for the "text with autocomplete" and "textarea with autocomplete" input types within forms
- jQuery UI Datepicker is used for the "datepicker" and "datetimepicker" input types
- jQuery UI Widget is used by the Fancytree library, which in turn is used by the "tree" input type
- jQuery UI Sortable is used by the jsGrid library, which in turn is used by "display=spreadsheet" and Special:MultiPageEdit
And here are my thoughts on each one:
- Autocompletion in #forminput could probably be done using the Select2 JS library instead, which is already contained in Page Forms. Another option is to use OOUI's autocompletion widget, but I don't think it's good enough yet.
- The "text with autocomplete" and "textarea with autocomplete" input types should simply be removed from Page Forms, and turned into aliases for the "combobox" and "tokens" input types. This is something I've wanted to do for a long time, and this project seems like the perfect opportunity to do it.
- This is probably best done by changing to use OOUI - specifically "DateInputWidget". There was already an attempt to do this, at https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/PageForms/+/511815/ , but it needs work.
- Fancytree should be replaced by another JS library - the most likely candidate is jsTree (https://www.jstree.com/).
- jsGrid should be replaced by another JS library - especially since development on it seems to have ended about two years ago. The best candidate for this seems to be jExcel (https://bossanova.uk/jexcel/v3/), although if that doesn't work out there are other good options, like ag-Grid (https://www.ag-grid.com/) and Tabulator (http://tabulator.info/).
The task T192752 has some more thoughts on all of this, although that one is just focused on OOUI.
This is not an all-or-nothing task: any reduction of reliance on jQuery UI would be helpful.
Microtasks for this project: T72704 (check to make sure this bug is still valid), T217516, T217517, T242973, T246715, T247407