Page MenuHomePhabricator

Regression: Page previews displaying images with different heights
Closed, ResolvedPublic3 Estimated Story Points

Description

Steps to reproduce

  1. Go to https://en.wikipedia.org/wiki/Norfolk
  2. Hover over Saxons

Observed

  • Preview image is larger than the expected size

Screen Shot 2021-06-09 at 1.55.49 PM.png (1×1 px, 967 KB)

Expected
All previews should fit within the same container, images should be the same size

QA Results - Beta

ACStatusDetails
1T284643#7332683

QA Results - Prod

ACStatusDetails
1T284643#7332698

Event Timeline

ovasileva triaged this task as Medium priority.Jun 9 2021, 11:57 AM
Jdlrobson moved this task from unsed to Triaged but Future on the Web-Team-Backlog board.
Jdlrobson moved this task from Triaged but Future to unsed on the Web-Team-Backlog board.

@ovasileva: Could you provide an example that this has regressed from?

AFAICT the image is being displayed correctly. The container, as you put it, has been shifted up to accommodate displaying the image in the pokey. In the case where the same preview is shown above the link the image is not shifted:

Preview location
Below
below.png (541×366 px, 212 KB)
Above
above.png (552×337 px, 181 KB)
LGoto added a subscriber: phuedx.

What I've been able to find so far (still looking for the original spec):
we tested different sizes of previews: https://www.mediawiki.org/wiki/Wikimedia_Research/Design_Research/Reading_Team_UX_Research/Hovercards_Usability to determine best size, which assumes that there was a container - I'll keep looking to find how big it's supposed to be though

It looks like images for portrait popups currently range from 320 x 200 to 320 x 320. The example in the description is one of these square 320 x 320 images.

Are we sure the expected behavior is for all portrait popups to have the same image dimensions (i.e. 320 x 200)? Without taking a deeper look at the code history, I thought that there has always been some range in the image dimensions for both portrait and landscape images.

It looks like images for portrait popups currently range from 320 x 200 to 320 x 320. The example in the description is one of these square 320 x 320 images.

Are we sure the expected behavior is for all portrait popups to have the same image dimensions (i.e. 320 x 200)? Without taking a deeper look at the code history, I thought that there has always been some range in the image dimensions for both portrait and landscape images.

I am tracking down the design spec. In the meantime I think we should hold off on making any changes.

I think we need to understand this one before doing the above task ^ (T255549#7266861)

@Jdlrobson @ovasileva apologies for the delay here. I've documented the design specifications here: https://www.mediawiki.org/wiki/Page_Previews/Design_specifications

I believe the relevant part for this task is: for vertical page previews the image should always be 320x192px.

image.png (402×328 px, 16 KB)

So I think the takeaway here, is that for https://doc.wikimedia.org/Popups/master/js/ui/?path=/story/thumbnails--portrait-small-square the image should always appear on the right and that we need to set a max height on these images.

I am in the processing of building out a storybook code-ifying this but due to back issues this will need to wait until Monday.

Change 714103 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Popups@master] Design spec dimensions should be documented in storybook

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

Change 714104 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/Popups@master] Adjust previews to meet specifications

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

Change 714103 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Design spec dimensions should be documented in storybook

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

Change 714104 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Adjust previews to meet specifications

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

@alexhollender can you review the different stories on https://doc.wikimedia.org/Popups/master/js/ui/ to check they all look as expected.
I'm working on the settings cog/extract separately.

@Edtadros the design spec has changed a few times so the images above (and in other tasks) could cause confusion. Official spec: https://www.mediawiki.org/wiki/Page_Previews/Design_specifications

Test Result - Beta

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

Test Artifact(s):

QA Steps

Validate image sizes per T284643#7322406

✅ AC1: Portrait

Screen Shot 2021-09-03 at 7.06.48 AM.png (452×418 px, 110 KB)

Screen Shot 2021-09-03 at 7.05.19 AM.png (518×364 px, 52 KB)

Screen Shot 2021-09-03 at 7.04.00 AM.png (527×333 px, 149 KB)

✅ AC2: Landscape

Screen Shot 2021-09-03 at 7.06.08 AM.png (412×533 px, 174 KB)

Screen Shot 2021-09-03 at 7.04.49 AM.png (400×520 px, 212 KB)

Screen Shot 2021-09-03 at 7.04.26 AM.png (407×549 px, 163 KB)

Test Result - Prod

Status: ✅ PASS
Environment: enwiki
OS: macOS Big Sur
Browser: Chrome
Device: MBP
Emulated Device: NA

Test Artifact(s):

QA Steps

Validate image sizes per T284643#7322406

Steps to reproduce
Go to https://en.wikipedia.org/wiki/Norfolk
✅ Hover over Saxons

Horizontal_page_preview_dimensions.png (250×458 px, 17 KB)

Screen Shot 2021-09-03 at 7.27.57 PM.png (443×538 px, 173 KB)

Screen Shot 2021-09-03 at 7.26.20 PM.png (448×547 px, 192 KB)

@alexhollender I'm assuming the height of 250 is due to 8px for the pointer. That said, it would seem to pass based on the numbers, but the image looks worse. I also cannot get it to appear in portrait to better compare it. Thoughts?

UPDATE: This is a pass per T284643#7337211

@Edtadros

  • yes 250 is correct/expected ... still trying to figure out the best way to represent that in the documentation (it's confusing because it changes based on the location of the pokey, etc.)
  • what do you mean by "the image looks worse"?
  • regarding portrait, I think it's an either/or kind of thing...not sure why it's landscape now but portrait in the task description, but I think you need to just QA a different one that's showing in portrait (vs. trying to get this same one to show up in portrait)

here is a side-by-side with the image in the task description...I suspect the difference is because the image is smaller in the landscape version. seems okay to me.

Screen Shot 2021-09-07 at 1.47.11 PM.png (490×715 px, 368 KB)

Looks good! Resolving.