Page MenuHomePhabricator

Images without explicit align parameter lack margin on tablet and larger displays
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Open a page, using the Minerva skin, that have images that don't have the align explicitly set (e.g. https://nl.m.wikipedia.org/wiki/Grafgalerij)
  • Widen the page if needed to activate the tablet styles, so that images display on their respective position instead of in the center of the page

What happens?:

The images are displayed too close to the text due to the lack of a left (in a LTR setting) margin.

What should have happened instead?:

Images that have no align parameter should display the same as images that have the explicit right align set (the .mw-halign-right CSS class)

image.png (924×2 px, 860 KB)

image.png (1×2 px, 1 MB)

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

MacOS 15.1, Safari 18.1

Derived Requirement

Ensure that images without an explicit align parameter in the Minerva skin have a left margin (in LTR settings) on tablet and larger displays. These images should appear with the same margin as images explicitly set to align right (using the .mw-halign-right CSS class) to prevent text from appearing too close to the image.

BDD

gherkin
Feature: Proper Margin for Images Without Explicit Align Parameter on Tablet and Larger Displays

Scenario: Display images without explicit align parameter with a left margin on tablet and larger displays
  Given the user is viewing an article in the Minerva skin on a tablet or larger display
  And the article contains images without an explicit align parameter
  When the images are displayed on the page
  Then each image should have a left margin, appearing the same as images with right alignment (.mw-halign-right CSS class)

Test Result - Beta|Prod

Status: ✅ PASS / ❓Need More Info / ❌ FAIL
Environment: beta/xyzwiki
OS: macOS Sonoma 15.0
Browser: Chrome 130
Device: MBA
Emulated Device: Tablet

Test Artifact(s):

Test Steps

Test Case 1: Ensure Images Without Align Parameter Have Left Margin on Tablet and Larger Displays

  1. Open Wikipedia in the Minerva skin.
  2. Navigate to a page with images that do not have an explicit align parameter (e.g., Grafgalerij).
  3. Adjust the window width to activate tablet styles, ensuring images display on the side rather than centered.
  4. ✅❓❌⬜ AC1: Confirm that each image without an explicit align parameter has a left margin, matching the margin of images with right alignment (using .mw-halign-right CSS class).

QA Results - Beta

ACStatusDetails
1T378874#10297004

QA Results - PROD

ACStatusDetails
1T378874#10310667

Event Timeline

Change #1085912 had a related patch set uploaded (by Sjoerddebruin; author: Sjoerddebruin):

[mediawiki/skins/MinervaNeue@master] Move the tablet thumb styles inside the content block so they get the correct priority when the page is loaded

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

Change #1085912 merged by jenkins-bot:

[mediawiki/skins/MinervaNeue@master] Move the tablet thumb styles inside the content block so they get the correct priority when the page is loaded

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

GMikesell-WMF updated the task description. (Show Details)
GMikesell-WMF updated Other Assignee, added: GMikesell-WMF.
GMikesell-WMF updated Other Assignee, removed: GMikesell-WMF.
GMikesell-WMF added subscribers: Edtadros, GMikesell-WMF.

**Test Result - Beta*

Status: ✅ PASS
Environment: Beta
OS: macOS Sonoma 15.0
Browser: Chrome 130
Device: MBA
Emulated Device: Tablet

Test Artifact(s):

https://en.m.wikipedia.beta.wmflabs.org/wiki/Fox#Biology

Test Steps

Test Case 1: Ensure Images Without Align Parameter Have Left Margin on Tablet and Larger Displays

  1. Open Wikipedia in the Minerva skin.
  2. Navigate to a page with images that do not have an explicit align parameter (e.g., Fox).
  3. Adjust the window width to activate tablet styles, ensuring images display on the side rather than centered.
  4. AC1: Confirm that each image without an explicit align parameter has a left margin, matching the margin of images with right alignment (using .mw-halign-right CSS class).

2024-11-06_09-25-03.mp4.gif (876×682 px, 2 MB)

GMikesell-WMF assigned this task to ovasileva.
GMikesell-WMF updated the task description. (Show Details)

**Test Result - PROD*

Status: ✅ PASS
Environment: PROD
OS: macOS Sonoma 15.0
Browser: Chrome 130
Device: MBA
Emulated Device: Tablet

Test Artifact(s):

https://en.m.wmflabs.org/wiki/Fox#Biology

Test Steps

Test Case 1: Ensure Images Without Align Parameter Have Left Margin on Tablet and Larger Displays

  1. Open Wikipedia in the Minerva skin.
  2. Navigate to a page with images that do not have an explicit align parameter (e.g., Fox).
  3. Adjust the window width to activate tablet styles, ensuring images display on the side rather than centered.
  4. AC1: Confirm that each image without an explicit align parameter has a left margin, matching the margin of images with right alignment (using .mw-halign-right CSS class).

2024-11-11_13-40-45.mp4.gif (772×962 px, 2 MB)