Page MenuHomePhabricator

Upstream thumbnail and table rules from Minerva to ResourceLoader/SkinModule
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

Minerva has various styles inside resources/skins.minerva.base.styles/content/hacks.less for thumbnails that should be generalized and moved to core. The benefit of having these styles in core is that they will apply to Vector 2022 when acting as a responsive skin.

User story

As a reader using a responsive skin I want thumbnails to be responsive to my device.

Acceptance criteria

  • Rules for disabling floating on`.content table` for mobile devices should be moved to ResourceLoader/SkinModule content.tables. e.g. move from here to here. DO NOT MOVE the .infobox rule. Include the !important disabling stylelint rules if necessary.
  • Rules for .content .thumb .thumbinner should be moved to ResourceLoader/SkinModule content.thumbnails feature. e.g. move from here to here.
  • To allow easy roll back in case of a problem it is okay to initially duplicate the rules in Minerva and core for at least one deploy but either before completing this task or as a sign off step we must plan to remove the Minerva styles.

QA

The behaviour on https://en.m.wikipedia.beta.wmflabs.org/wiki/T360388?useskin=vector-2022 should match mobile in particular:

  • Tables floated to the left or right should stop being floated and limited to the screen size at low resolutions
  • T38030: The stadiums should remain side by side on resize for both Vector 2022 and Minerva: https://en.m.wikipedia.org/w/index.php?title=Los_Angeles_Lakers&oldid=1213240629#Home_arenas
  • The same behaviour should be exhibited for "Shaquille O'Neal (left), and Kobe Bryant (right), helped the Lakers win three straight NBA titles. Though they played well together on the court, the pair had an acrimonious relationship at times in the locker room.[175][176]" T148505#2782062

QA Results - Beta

ACStatusDetails
1T360388#9724743
2T360388#9724743

QA Results - Prod

ACStatusDetails
1T360388#9738630
2T360388#9738630

Event Timeline

Jdlrobson lowered the priority of this task from High to Medium.Mar 21 2024, 5:47 PM

The following questions structured around the 5W1H model can help gather more context and understand the requirements:

  1. Why is it beneficial to have these styles in core, particularly for responsive skins like Vector 2022? TBD
  2. Who will be responsible for implementing these changes, and who are the intended users that will benefit from this change? TBD
  3. Where in the codebase are the current styles located, and where should they be moved to? TBD
  4. How will the transfer of styles affect the current functionality of Minerva and Vector 2022 skins, especially in terms of responsiveness and mobile compatibility? TBD
Jdlrobson updated the task description. (Show Details)

Change #1017951 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/core@master] Upstream thumbnail and table rules from Minerva

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

Change #1018288 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/skins/MinervaNeue@master] Upstream thumbnail and table rules from Minerva

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

Change #1017951 abandoned by Kimberly Sarabia:

[mediawiki/core@master] Upstream thumbnail and table rules from Minerva

Reason:

Restarting from scratch

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

Change #1018288 abandoned by Kimberly Sarabia:

[mediawiki/skins/MinervaNeue@master] Upstream thumbnail and table rules from Minerva

Reason:

Restarting from scratch

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

Change #1019099 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/core@master] Thumbnail styles generalized and moved to core

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

Change #1018419 had a related patch set uploaded (by Kimberly Sarabia; author: Kimberly Sarabia):

[mediawiki/skins/MinervaNeue@master] Upstream thumbnail and table rules to ResourceLoad

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

Change #1019099 merged by jenkins-bot:

[mediawiki/core@master] Thumbnail styles generalized and moved to core

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

Change #1019910 had a related patch set uploaded (by Jdlrobson; author: Kimberly Sarabia):

[mediawiki/core@wmf/1.42.0-wmf.26] Thumbnail styles generalized and moved to core

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

Edtadros removed Edtadros as the assignee of this task.EditedMon, Apr 15, 11:18 PM
Edtadros subscribed.

Test Result - Beta

Status: ❌ FAIL
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

The behaviour on https://en.wikipedia.beta.wmflabs.org/wiki/T360388 should match mobile in particular:

❌ AC1: Tables floated to the left or right should become centered and limited to the screen size at low resolutions
The table never really gets centered. It appears as though there is some padding on the right of the table preventing it from getting centered.

Untitled 2.mov.gif (1×890 px, 3 MB)

❓ AC2: T38030: The stadiums should remain side by side on resize for both Vector 2022 and Minerva
see AC1 for Minerva. I'm assuming that at really small horizontal resolutions it is okay that they are stacked vertically instead of being side by side. Please confirm this behavior is correct.

screenshot 24.mov.gif (1×890 px, 3 MB)

Jdlrobson updated the task description. (Show Details)

@Edtadros you are too fast :) the patch only just merged and doesn't seem to be applying just yet! Please try again first thing tomorrow!

Change #1019910 merged by jenkins-bot:

[mediawiki/core@wmf/1.42.0-wmf.26] Thumbnail styles generalized and moved to core

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

Mentioned in SAL (#wikimedia-operations) [2024-04-16T20:33:30Z] <cjming@deploy1002> Started scap: Backport for [[gerrit:1019910|Thumbnail styles generalized and moved to core (T360388)]]

Mentioned in SAL (#wikimedia-operations) [2024-04-16T20:36:37Z] <cjming@deploy1002> cjming and jdlrobson: Backport for [[gerrit:1019910|Thumbnail styles generalized and moved to core (T360388)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-04-16T20:56:18Z] <cjming@deploy1002> Finished scap: Backport for [[gerrit:1019910|Thumbnail styles generalized and moved to core (T360388)]] (duration: 22m 48s)

@KSarabia-WMF please see below.

Test Result - Beta

Status: ❌ FAIL
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

The behaviour on https://en.wikipedia.beta.wmflabs.org/wiki/T360388 should match mobile in particular:

❌ AC1: Tables floated to the left or right should become centered and limited to the screen size at low resolutions
The padding is gone, but the table never gets centered.

Vector 2022Minerva
screenshot 203.png (1×1 px, 324 KB)
screenshot 204.png (1×914 px, 301 KB)

❓ AC2: T38030: The stadiums should remain side by side on resize for both Vector 2022 and Minerva
see AC1. I'm assuming that at really small horizontal resolutions it is okay that they are stacked vertically instead of being side by side. Please confirm this behavior is correct.

The padding is gone, but the table never gets centered.

My bad. Updated the test article. Please try again.

see AC1. I'm assuming that at really small horizontal resolutions it is okay that they are stacked vertically instead of being side by side. Please confirm this behavior is correct.

Yep that's a pass.

@Jdlrobson I'm still seeing this:

Vector 2022Minerva
screenshot 205.png (1×748 px, 200 KB)
screenshot 206.png (1×748 px, 225 KB)

I cleared cache, and tried action=purge.

Test Result - Beta

Status: ✅ PASS
Environment: beta
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

The behaviour on https://en.wikipedia.beta.wmflabs.org/wiki/T360388 should match mobile in particular:

✅ AC1: Tables floated to the left or right should become centered and limited to the screen size at low resolutions
The padding is gone, but the table never gets centered.

Vector 2022Minerva
Untitled.gif (1×1 px, 2 MB)
Untitled2.gif (1×1 px, 1 MB)

✅ AC2: T38030: The stadiums should remain side by side on resize for both Vector 2022 and Minerva
see AC1

ovasileva claimed this task.

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Sonoma
Browser: Chrome
Device: MBA
Emulated Device:NA

Test Artifact(s):

QA Steps

The behaviour on https://en.wikipedia.beta.wmflabs.org/wiki/T360388 should match mobile in particular:

✅ AC1: Tables floated to the left or right should become centered and limited to the screen size at low resolutions

screenshot 251.png (1×1 px, 388 KB)
screenshot 252.png (813×928 px, 236 KB)
screenshot 253.png (821×669 px, 181 KB)
screenshot 254.png (929×502 px, 177 KB)

✅ AC2: T38030: The stadiums should remain side by side on resize for both Vector 2022 and Minerva

screenshot42.mov-ezgif.com-optimize.gif (1×730 px, 3 MB)