Special:GlobalPreferences does not deal well with "conditional preferences" (using hide-if)
Closed, ResolvedPublic3 Estimated Story Points

Description

Special:GlobalPreferences does not deal well with "conditional preferences" (using hide-if). When a preference is hidden because the conditions to show it are not met, the checkbox to set it as global is still visible.

Currently this affects two preferences (testing on https://en.wikipedia.beta.wmflabs.org/wiki/Special:GlobalPreferences):

User profileNewcomer homepageDefault to newcomer homepage from username link in personal tools (only shown if Display newcomer homepage is checked)
image.png (2×3 px, 482 KB) image.png (2×3 px, 476 KB)

AppearanceVector skin preferencesUse Legacy Vector (only shown if SkinVector is selected)
image.png (2×3 px, 529 KB) image.png (2×3 px, 536 KB)

QA Results - Beta

ACStatusDetails
1T246491#6370891

QA Results - Prod

ACStatusDetails
1T246491#6387421

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
ovasileva triaged this task as Medium priority.Apr 2 2020, 4:55 PM
ovasileva moved this task from Incoming to Needs Prioritization on the Web-Team-Backlog board.

@ovasileva I don't think this needs to be a priority right now. From my experience of global preferences this is likely to be a little challenging. Maybe this would be a good thing to pair up with growth team in near future since we are both impacted by it?

@ovasileva I don't think this needs to be a priority right now. From my experience of global preferences this is likely to be a little challenging. Maybe this would be a good thing to pair up with growth team in near future since we are both impacted by it?

That seems fine to me, I'll bring it up with @MMiller_WMF in our next 1:1

ovasileva raised the priority of this task from Medium to High.Jul 29 2020, 4:03 PM

@ovasileva @JTannerWMF I can't get this extension setup locally. If I (and I imagine any of our team) was to tackle this it would likely take us quite some time. Could we reach out to community tech to get help with this one? https://www.mediawiki.org/wiki/Developers/Maintainers#MediaWiki_extensions_deployed_on_the_Wikimedia_Cluster

Change 618171 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/GlobalPreferences@master] Pass hide-if through to global checkbox

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

I'm not 100% sure I've read it all right, but this might just be a matter of passing hide-if through to the global checkbox.

Change 618171 merged by jenkins-bot:
[mediawiki/extensions/GlobalPreferences@master] Pass hide-if through to global checkbox

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

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Catalina
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA steps

Go to https://en.wikipedia.beta.wmflabs.org/wiki/Special:GlobalPreferences

✅ AC1: User profile → Newcomer homepage → Default to newcomer homepage from username link in personal tools (only shown if Display newcomer homepage is checked)

Aug-08-2020 11-23-29.gif (203×640 px, 509 KB)

✅ AC2: Appearance → Vector skin preferences → Use Legacy Vector (only shown if Skin → Vector is selected)

Aug-08-2020 11-24-44.gif (307×640 px, 977 KB)

Edtadros subscribed.

Test Result - PROD

Status: ✅ PASS
Environment: euwiki
OS: macOS Catalina
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA steps

Go to https://eu.wikipedia.org/wiki/Berezi:GlobalPreferences

✅ AC1: User profile → Newcomer homepage → Default to newcomer homepage from username link in personal tools (only shown if Display newcomer homepage is checked)

Aug-16-2020 09-08-23.gif (174×640 px, 1 MB)

✅ AC2: Appearance → Vector skin preferences → Use Legacy Vector (only shown if Skin → Vector is selected)

Aug-16-2020 09-10-15.gif (283×640 px, 1 MB)

Thanks to @Samwilson for the fix and to @Jdlrobson for the merge.