Page MenuHomePhabricator

Notice about new langlinks location is shown on pages where it shouldn't be
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

  • On the right side of the page, under "زبان‌ها" (which means "Languages") you will see a message "On this Wikipedia the language links are at the top of the page across from the article title."

image.png (462×314 px, 32 KB)

What should have happened instead?:

  • This notice should only be shown on pages that can have a langlink (content pages). It should not be shown on special pages.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:MW 1.38.0-wmf.17 (rMWa7e96ffb7ddc)
with Vector 1.0.0 (948f039) ‏with Desktop Improvements (Vector 2022) features enabled.

Developer Notes

Should be straightforward to exclude language alert on special pages by leveraging SkinVector::isLanguagesInContentAt('top') as one of the conditions for determining the value of the 'is-vector-table-of-contents-visible' variable

QA Results - Beta

ACStatusDetails
1T299581#7702787

QA Results - Prod

ACStatusDetails
1T299581#7702795

Event Timeline

Change 757033 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/skins/Vector@master] Exclude special pages from language alert

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

cjming updated the task description. (Show Details)
cjming subscribed.

Change 757379 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/skins/Vector@master] Fix issues with language alert in sidebar:

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

Change 757033 abandoned by Clare Ming:

[mediawiki/skins/Vector@master] Exclude special pages from language alert

Reason:

abandoning in favor of https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/757379

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

cjming moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

Test wiki created on Patch demo by CMing (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/cfcea0c737/w/

Test wiki on Patch demo by CMing (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/cfcea0c737/w/

Test wiki created on Patch demo by CMing (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/67c1cb0322/w/

Test wiki on Patch demo by CMing (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/67c1cb0322/w/

Test wiki created on Patch demo by CMing (WMF) using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/77691bf641/w/

hi @ovasileva @Jdlrobson - I'm wondering about what I'm seeing on patchdemo (with an unmerged fix that checks for special pages to not display language alert/notice) and a few live pilot wikis (fr + ko) -- it seems like the language header in sidebar shouldn't be showing when there isn't anything beneath it? Weirdly I can't seem to replicate on my local environment.

As for possible fixes, at first glance I think it's generated by Skin::buildSidebar - would a hook (onSkinBuildSidebar, or onSidebarBeforeOutput) be the right approach to prevent it? I can also log a separate ticket for this issue because I think the original issue in this ticket is resolved by the patch (i.e. language alert doesn't appear on special pages even tho the header still does)

Screen Shot 2022-01-28 at 10.12.23 AM.png (1×1 px, 279 KB)

Screen Shot 2022-01-28 at 10.13.54 AM.png (1×1 px, 187 KB)

addendum: I also see it on en with legacy + modern vector, logged-in + logged-out - https://en.wikipedia.org/wiki/Special:SpecialPages

cjming moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

hi @ovasileva @Jdlrobson - I'm wondering about what I'm seeing on patchdemo (with an unmerged fix that checks for special pages to not display language

Not a problem. @cjming it's showing because of the settings cog from ULS and due to the fact Vector's default configuration defaults to the sidebar. (Let's fix that - https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/757970)

Change 757379 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Fix issues with language alert in sidebar:

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

One remaining edge case - the language alert shows on the main page, when the main page has no languages.

Screen Shot 2022-01-28 at 2.12.25 PM.png (1×2 px, 538 KB)

I'm using the following config:

$wgVectorLanguageInMainPageHeader = [
	"logged_in" => true,
	"logged_out" => true
];

One remaining edge case - the language alert shows on the main page, when the main page has no languages.

so even if with that config being true, we should not show the alert?

or only hide if main page has no languages even if wgVectorLanguageInMainPageHeader is true?

and show alert if main page does have languages and wgVectorLanguageInMainPageHeader is true?

addendum: hopefully i got it right in this patch https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/758516

Change 758516 had a related patch set uploaded (by Clare Ming; author: Clare Ming):

[mediawiki/skins/Vector@master] Don't show language alert on main page if it has no languages

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

Change 758516 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Don't show language alert on main page if it has no languages

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: Language notice should not appear on Special Pages:

Screen Shot 2022-02-10 at 3.41.40 PM.png (761×641 px, 138 KB)

Screen Shot 2022-02-10 at 3.41.54 PM.png (761×641 px, 152 KB)

Screen Shot 2022-02-10 at 3.42.28 PM.png (761×641 px, 91 KB)

Edtadros subscribed.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki, fawiki
OS: macOS Monterey
Browser: Chrome
Device: MBP
Emulated Device:NA

Test Artifact(s):

QA Steps

✅ AC1: Language notice should not appear on Special Pages:

Screen Shot 2022-02-10 at 3.44.44 PM.png (761×641 px, 63 KB)

Screen Shot 2022-02-10 at 3.43.47 PM.png (761×641 px, 134 KB)

Screen Shot 2022-02-10 at 3.43.38 PM.png (761×641 px, 81 KB)

Screen Shot 2022-02-10 at 3.44.33 PM.png (761×641 px, 107 KB)

Screen Shot 2022-02-10 at 3.44.03 PM.png (761×641 px, 148 KB)

Test wiki on Patch demo by CMing (WMF) using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/77691bf641/w/