Page MenuHomePhabricator

Show medium size (<320 wide, but >=250 high) images as well
Closed, ResolvedPublic3 Estimated Story Points

Description

The requirement for landscape images is to be at least 320px wide. The requirement for portrait images is more relaxed, only 250px high. Images that fall between these two requirements currently don't show a thumbnail, even if they could.

This request is about a very specific group of images:

  • Square images from 250 x 250 to 319 x 319.
  • Landscape images from 251 x 250 to 319 x 250.
  • Landscape images from 319 x 250 to 319 x 318.

All these could be shown in portrait mode.

In this group, the most extrem ratio is 319 x 250. This will be cut to 203 x 250. I.e. the absolute extreme are 58px missing left and right, but never more.

Requested at https://www.mediawiki.org/wiki/Topic:Vwl97pm6as9fuf6k.

QA

Use patchdemo for verifying this in beta.

Expected: a preview shows.

Screen Shot 2021-07-30 at 3.30.20 PM.png (1×2 px, 1 MB)

Compare to prod - https://en.wikipedia.org/wiki/Sonic_Adventure_2

Screen Shot 2021-07-30 at 3.43.01 PM.png (1×1 px, 486 KB)

Patch-For-Review: https://gerrit.wikimedia.org/r/636629

QA Results - Patchdemo

ACStatusDetails
1T268999#7279046

QA Results - Prod

ACStatusDetails
1T268999#7313465

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
ovasileva triaged this task as Medium priority.Jan 13 2021, 4:30 PM

Here are 2 more users wondering why certain images don't appear in Page-Previews: https://www.mediawiki.org/wiki/Topic:Viyfrnik5ttdq69e. While the patch discussed here can't solve all of this (some images are just to small, no matter what), the patch will relax the situation a bit.

LGoto lowered the priority of this task from Medium to Low.Feb 24 2021, 6:13 PM
thiemowmde added a subscriber: Lena_WMDE.

@Lena_WMDE, I would love to explain this in our story time and later put this in our sprint. Code-wise it's a tiny change. Not only do 3rd parties benefit, it also improves the experience on the Wikimedia cluster.

Jdlrobson added a subscriber: ovasileva.

This patch has several +1s @ovasileva and has been sitting in our backlog for some time. SInce we last looked at it, a storybook entry has been added which significantly de-riskes this. Since we are planning on looking at T281170 it makes sense to look at this one too.

cjming added a subscriber: cjming.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: bwang.

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

https://patchdemo.wmflabs.org/wikis/45e398653b/w/

This may sound stupid, but how do you enable this?

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

[mediawiki/core@master] DNM: Patchdemo purposes only

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

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

https://patchdemo.wmflabs.org/wikis/45e398653b/w/

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

https://patchdemo.wmflabs.org/wikis/2bf5a93d07/w/

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

https://patchdemo.wmflabs.org/wikis/9d7f45b4cd/w/

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

https://patchdemo.wmflabs.org/wikis/2bf5a93d07/w/

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

https://patchdemo.wmflabs.org/wikis/9d7f45b4cd/w/

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

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

cjming updated the task description. (Show Details)

This may sound stupid, but how do you enable this?

Do you mean on patchdemo? I just updated the patchdemo link so you should be able to test popups for this ticket's associated patch (plus necessary config) at https://patchdemo.wmflabs.org/wikis/bebc04f502/wiki/Sonic_Adventure_2 for example.

Test wiki created on Patch Demo by Shadowboxer2005 using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/32ebbe2a29/w/

Change 636629 merged by jenkins-bot:

[mediawiki/extensions/Popups@master] Show medium size (<320 wide, but >=250 high) images as well

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

Edtadros added a subscriber: Edtadros.

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

Test Artifact(s):

QA Steps

Use patchdemo for verifying this in beta.

Visit Sonic Adventure 2 article - i.e. https://patchdemo.wmflabs.org/wikis/bebc04f502/wiki/Sonic_Adventure_2
Hover over "Sonic Adventure" in the bottom navbox.
✅ AC1: Preview matches screenshot in task description above.

Screen Shot 2021-08-12 at 7.46.50 AM.png (837×1 px, 563 KB)

@Jdlrobson will this make it to Beta? There are some boundary values in the task description that we could validate. Not sure how to do it in patchdemo.

I tested this locally, and it looks like the patchdemo was outdated. Can't replicate the boundary issues locally, so let's call this one a pass. We'll be able to confirm this in production now/tomorrow.

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

Test Artifact(s):

QA Steps

Visit Sonic Adventure 2 article
Hover over "Sonic Adventure" in the bottom navbox.
✅ AC1: Preview matches screenshot in task description above.

Screen Shot 2021-08-26 at 2.33.16 PM.png (819×1 px, 619 KB)

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

https://patchdemo.wmflabs.org/wikis/1a4a4e14c0/w/

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

https://patchdemo.wmflabs.org/wikis/32ebbe2a29/w/