Steps to reproduce
- Go to https://en.wikipedia.org/wiki/Special:GlobalPreferences
- Go to appearance tab
Expected:
- only one set of checkboxes appears
Observed:
- one set of checkboxes (2 at top) and a single checkbox below
ovasileva | |
Jul 22 2020, 12:22 PM |
F31944383: Screen Shot 2020-07-22 at 2.22.07 PM.png | |
Jul 22 2020, 12:22 PM |
Expected:
Observed:
Project | Branch | Lines +/- | Subject | |
---|---|---|---|---|
mediawiki/extensions/GlobalPreferences | master | +1 -0 | Pass hide-if through to global checkbox |
Although I agree the UI is problematic (T188424), I believe this is how global preferences works ? One checkbox is for the global preference and one for the local.
My comment was about the side-by-side appearance of the checkboxes, which is what @Jdlrobson commented about T258581#6334115.
The second lonely checkbox is the global pair for the MonoBook sub-preference (which will be toggled by JS the moment MonoBook is selected from the main prefs). The reason why the first checkbox does not appear to be lonely now is because when this screenshot was taken the user selected skin was Vector. If the selection is moved to MonoBook, its sub-pref will claim the checkbox, and the lone one still remains for the now hidden Vector sub-pref.
If the skin selection is moved to a skin that does not have sub-pref at all, like Timeless, two lonely checkboxes will appear. (One for Vector, one for MonoBook). If JS is disabled, the checkboxes will then correctly have corresponding items (since the sub-prefs are always visible in that case).
The problem stems from MediaWiki-extensions-GlobalPreferences. The issue in this case is that the sub-prefs are generated by external clients and displayed conditionally by JS while the checkbox pairs for the global setting are generated based on the total number of the preferences that can be used as global prefs unconditionally by the GlobalPreferences extension.
To fix this, GlobalPreferences needs to be fixed to tie visibility of the global-pair checkbox to the same or similar logic that is used to update visibility of the corresponding preference item.
Change 618171 had a related patch set uploaded (by Jdlrobson; owner: Samwilson):
[mediawiki/extensions/GlobalPreferences@master] Pass hide-if through to global checkbox
Change 618171 merged by jenkins-bot:
[mediawiki/extensions/GlobalPreferences@master] Pass hide-if through to global checkbox