Page MenuHomePhabricator

Cannot link to subsections on Special:Preferences
Closed, ResolvedPublic1 Estimated Story Points

Description

In desktop refresh the new opt-out link does not link directly to the appropriate subsection in Special:Preferences

A link to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Preferences&wprov=vctw1#mw-prefsection-rendering-skin-skin-prefs or https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences#mw-prefsection-rendering-skin-skin-prefs does not reveal the appropriate section.

Link is generated by

SpecialPage::getTitleFor(
  'Preferences', false,  'mw-prefsection-rendering-skin-skin-prefs'
)->getLinkURL( 'wprov=' . self::OPT_OUT_LINK_TRACKING_CODE ),

Likewise a link to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Preferences#mw-prefsection-personal doesn't work.

As a result the new opt-out link on desktop refresh can only link to the appearance tab.

Footnote: An added question is whether getLocalURL should be generating a more readable URL such as https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences?wprov=vctw1#mw-prefsection-rendering-skin-skin-prefs

Developer notes

T248644#6057102

QA notes

  • Ensure that clicking the sidebar link will scroll to legacy Vector section in Special:Preferences.

QA Results - Beta

ACStatusDetails
1T248644#6089870

Event Timeline

ovasileva subscribed.
Volker_E subscribed.

@matmarex Haven't we had similar issue when bringing Special:Preferences to OOUI?

@matmarex Haven't we had similar issue when bringing Special:Preferences to OOUI?

Yes, and I fixed it at the time (5fe2e19ac33335458b658388a34f48bde63c1787).

It appears to be working correctly for me, for all sections other than #mw-prefsection-rendering-skin-skin-prefs. For example, https://en.wikipedia.beta.wmflabs.org/wiki/Special:Preferences#mw-prefsection-watchlist-pageswatchlist jumps to the "Watched pages" section on the "Watchlist" tab.

Apparently we have found something that doesn't work correctly with the nested-sections approach (T246162: Put skin preference in the correct place).

Change 588750 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] Fix linking to nested sub-sections in preferences

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

Change 588750 merged by jenkins-bot:
[mediawiki/core@master] Fix linking to nested sub-sections in preferences

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

ovasileva set the point value for this task to 1.Apr 15 2020, 5:24 PM

Change 589071 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/skins/Vector@master] Fix Special:Preferences sub section link

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

Change 589161 had a related patch set uploaded (by Jdlrobson; owner: VolkerE):
[mediawiki/skins/Vector@master] Fix Special:Preferences sub section link

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

Change 589161 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Fix Special:Preferences sub section link

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

Edtadros subscribed.

Test Result - Beta

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

Test Artifact(s):

QA steps

✅ AC1: Ensure that clicking the sidebar link will scroll to legacy Vector section in Special:Preferences.

Wikipedia, the free encyclopedia.gif (480×474 px, 2 MB)

@ovasileva test in prod?