Page MenuHomePhabricator

make mediawiki.special.recentchanges.js reusable
Closed, ResolvedPublic

Description

mediawiki.special.recentchanges.js defines a logic to disable some checkboxes depending on the state of a namespace selector.

This logic is also needed on Special:Contributions and Special:Watchlist (when added, see T33704).

Having a reusable module for this makes it easy to add that the the other special pages.

Please create a module for this. I have no idea for a name of a new module or a good concept for a module design. Thanks.

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:19 AM
bzimport set Reference to bz36317.
bzimport added a subscriber: Unknown Object (MLST).

And since today also for Special:NewPages

Special:Watchlist was fixed with gerrit 94617

If the forms are rewritten to use HTMLForm, you could:

  • Convert the entire namespace selector functionality into a HTMLFormField subclass (dropdown + 2 checkboxes), a bit like HTMLSelectOrOtherField.
  • Then add the code from mediawiki.special.recentchanges.js to mediawiki.htmlform.js, which already has some form logic (e.g. for <select> fields enhanced with jquery.chosen).

Change 491058 had a related patch set uploaded (by Fomafix; owner: Fomafix):
[mediawiki/core@master] SpecialWatchlist: Load module 'mediawiki.special.recentchanges'

https://gerrit.wikimedia.org/r/491058

Change 491058 merged by jenkins-bot:
[mediawiki/core@master] SpecialWatchlist: Conditionally hide the namespace checkboxes

https://gerrit.wikimedia.org/r/491058

Krinkle claimed this task.

It's now loaded on Watchlist and presumably works, so that means it must've been made re-usable some time in the last 7 years.