Page MenuHomePhabricator

Support linking to a specific Gadget or Gadget section in preference (HTML ids, permalink, CSS :target)
Closed, ResolvedPublic

Description

Frequently, it is useful to link to a particular gadget in Special:Preferences for the purposes of explaining how to enable it. It would be helpful if, when linked to a particular gadget listing, the gadget option was highlighted similar to how references on the English Wikipedia are highlighted when their links are clicked.

This would require adding a bit of CSS (using :target, presumably), and changing the gadget list so that each div.mw-htmlform-flatlist-item has an ID.

Event Timeline

Yair_rand raised the priority of this task from to Needs Triage.
Yair_rand updated the task description. (Show Details)
Yair_rand subscribed.
Krinkle added subscribers: Tacsipacsi, Tgr, Izno and 2 others.
Krinkle subscribed.

All other <fieldset>s (at least on enwiki) have HTML IDs set, only gadget subsections (i.e. the ones created with headings on MediaWiki:Gadgets-definition, like Browsing and Watchlist on enwiki) don’t. Giving them IDs is required to complete the parent task T217606, but it also makes possible to create hand-made TOCs in the meanwhile.

Krinkle renamed this task from Add :target CSS to Gadget options in Preferences to Support linking to a specific Gadget or Gadget section in preference (HTML ids, permalink, CSS :target).Apr 18 2021, 9:30 PM

Change 724740 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/Gadgets@master] Make each gadget a separate preference, instead of one huge multiselect

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

Change 724740 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@master] Make each gadget a separate preference, instead of one huge multiselect

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

Change 723302 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Highlight section header when linking to a section on Special:Preferences

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

Change 727491 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Gadgets@master] Revert \"Make each gadget a separate preference, instead of one huge multiselect\"

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

Change 727492 had a related patch set uploaded (by Krinkle; author: Krinkle):

[mediawiki/extensions/Gadgets@wmf/1.38.0-wmf.3] Revert \"Make each gadget a separate preference, instead of one huge multiselect\"

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

Change 727491 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@master] Revert \"Make each gadget a separate preference, instead of one huge multiselect\"

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

Change 727492 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@wmf/1.38.0-wmf.3] Revert \"Make each gadget a separate preference, instead of one huge multiselect\"

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

Reverted because apparently gadget names can have arbitrary text in them, and some parts of our code don't like that.

Change 727614 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] HTMLFormField: Relax restrictions on 'name' and 'id'

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

Change 727615 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/Gadgets@master] Check gadget name validity for HTMLForm

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

Change 727615 abandoned by Bartosz Dziewoński:

[mediawiki/extensions/Gadgets@master] Check gadget name validity for HTMLForm

Reason:

I took a different approach in https://gerrit.wikimedia.org/r/c/mediawiki/core/+/727614 , this won't be needed.

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

Change 727614 merged by jenkins-bot:

[mediawiki/core@master] htmlform: Remove HTMLFormField restrictions on 'name' and 'id'

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

Change 737078 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/Gadgets@master] Re-apply \"Make each gadget a separate preference, instead of one huge multiselect\"

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

Change 737078 merged by jenkins-bot:

[mediawiki/extensions/Gadgets@master] Re-apply \"Make each gadget a separate preference, instead of one huge multiselect\"

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

Change 723302 merged by jenkins-bot:

[mediawiki/core@master] Highlight section header when linking to a section on Special:Preferences

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