Page MenuHomePhabricator

Language links not correctly displayed in Commons with the new Vector (2022) skin
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Assigned To
Authored By
Robby
Mar 22 2022, 10:51 PM
Referenced Files
F35054677: Screen Shot 2022-04-16 at 6.05.39 PM.png
Apr 17 2022, 1:08 AM
F35054678: Screen Shot 2022-04-16 at 6.06.07 PM.png
Apr 17 2022, 1:08 AM
F35054679: Screen Shot 2022-04-16 at 6.06.43 PM.png
Apr 17 2022, 1:08 AM
F35048585: Screen Shot 2022-04-12 at 3.28.23 PM.png
Apr 12 2022, 10:32 PM
F35048583: Screen Shot 2022-04-12 at 3.28.01 PM.png
Apr 12 2022, 10:32 PM
F35048588: Screen Shot 2022-04-12 at 3.28.50 PM.png
Apr 12 2022, 10:32 PM

Description

Since a few days the Wikipedia language links on Commons are no longer displayed correctly if the new Vector skin is used while everything is displayed correctly displayed.

In order ot illustrate this I will add 2 printscreens of the wikipedia language links for the page: https://commons.wikimedia.org/wiki/Category:Novelists_from_Romania

Developer notes

To see language in sidebar:

$wgVectorLanguageInHeader = [
 "logged_in" => false,
"logged_out" => false

QA Results - Prod

ACStatusDetails
1T304468#7859513

Event Timeline

Wikipedia language links with the new Vector Skin

New Vector (2022) skin - 2022-03-22 23_38_04-Category_Novelists from Romania - Wikimedia Commons — Mozilla Firefox.png (762×362 px, 10 KB)

Wikipedia language links with the legacy Vector Skin
Legacy Vector skin - 2022-03-22 23_38_04-Category_Novelists from Romania - Wikimedia Commons — Mozilla Firefox.png (659×322 px, 18 KB)

The element is in the DOM, it's just hidden. I believe this is a recent regression possibly relating to @bwang recent refactorings or 80d734b4 (@Jdrewniak). I'd suggest we add a class to the body for this feature flag and limit all the language button styles.

@Jdlrobson I did some more digging and it seems the regression is from this selector change. Does it make sense to just revert that change and restrict LanguageButton.less styles to the language button in the header?

Let's update that selector to use a class on the body since this is an example of a feature that varies based on the site. We have vector-sticky-header-enabled for sticky header, REQUIREMENT_LANGUAGE_IN_HEADER , skin-vector-search-vue for search and should have one for this too. Since certain projects don't have desktop improvements on by default this will allow for smoother roll out /ability do cherry pick features - using a generic selector that applies to cached HTML and fresh HTML should be avoided.

Perhaps a class could be auto-added to the body tag by the FeatureManagement system in future.

bwang removed bwang as the assignee of this task.Apr 6 2022, 6:42 PM
bwang moved this task from Doing to Code Review on the Web-Team-Backlog (Kanbanana-FY-2021-22) board.

Change 777817 had a related patch set uploaded (by Jdlrobson; author: Bernard Wang):

[mediawiki/skins/Vector@master] Scope ULS styles to when language button is in header

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

Change 777817 merged by jenkins-bot:

[mediawiki/skins/Vector@master] Scope ULS styles to when language button is in header

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

Test Result - Beta

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

Test Artifact(s):

QA Steps

✅ AC1: Wikipedia language links are displayed correctly.

Vector 2022 w TOC Vector 2022 wo TOC Vector Legacy
Screen Shot 2022-04-12 at 3.28.01 PM.png (886×541 px, 126 KB)
Screen Shot 2022-04-12 at 3.28.23 PM.png (893×682 px, 161 KB)
Screen Shot 2022-04-12 at 3.28.50 PM.png (881×663 px, 140 KB)

Test Result - Prod

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

Test Artifact(s):

QA Steps

✅ AC1: Wikipedia language links are displayed correctly.

Vector 2022 w TOC Vector 2022 wo TOC Vector Legacy
Screen Shot 2022-04-16 at 6.06.43 PM.png (1×1 px, 651 KB)
Screen Shot 2022-04-16 at 6.06.07 PM.png (1×1 px, 628 KB)
Screen Shot 2022-04-16 at 6.05.39 PM.png (1×1 px, 597 KB)