Page MenuHomePhabricator

Previews not displaying non-free images
Closed, ResolvedPublic2 Story Points

Description

Scenarios

1

  1. Visit reading-web-staging.wmflabs.org/wiki/Special:AllPages.
  2. Dwell on the "Non-free image" link.
  3. Wait for a preview to appear.
  4. Observe that the preview has a thumbnail.

The following is the original task description, which is no longer relevant as Page Previews started using RESTBase on the Beta Cluster on Tuesday, 28th February.

OS+Browser:

Event Timeline

Restricted Application added a subscriber: Aklapper. Β· View Herald TranscriptFeb 21 2017, 10:09 AM

Also happens on:
Windows 10 - Edge & IE11 & Chrome
Mac OS 10.12 - Chrome & Safari

Jhernandez updated the task description. (Show Details)Feb 22 2017, 4:32 PM
ovasileva moved this task from Doing to To-do on the Page-Previews (2016-17-Q3-Goal) board.

@ovasileva - create a separate task for per-wiki configuration

bmansurov updated the task description. (Show Details)Mar 1 2017, 6:26 PM
bmansurov set the point value for this task to 2.

Upon investigation I noticed that the non-free image is not wide enough to be displayed in a preview. The thumbnail width should be 300px according to the code, but it is 509px which becomes 255px after accounting for the device pixel ratio.

@ovasileva, to sum it up, the image we're trying to display on retina displays is not big enough, thus not showing up at all. We could show a blurry image, but that's a design call imo.

@bmansurov - hmm, this still seems to be happening for some (but not all) non-free images. Some reproduction steps (in enwiki beta):

  1. Search for "escape from new york"
  2. Hover over "escape from new york"

Expected: image appears
Observed: image appears

  1. Hover over "escape from new york" (soundtrack)

Expected: image appears
Observed: image does not appear

A few observations from our (@ovasileva and my) conversation from IRC:

  1. Zooming in and out on a page affects the display of images. For example, when you're on the search results page for escape from new york and hover over the first link "Escape from New York" you'll either see an image or not. If you do, then try zooming in, then at some point you will not see the image. If you don't, then try zooming out, and the image will appear eventually. This is all due to how we display images based on their fit to the screen size and pixel ratio.
  1. Although both Escape from New York and Escape from New York (soundtrack) contain similar images, the latter page's image is non-free, that's why no image is appearing when you hover over "Escape from New York (soundtrack)" on the search page mentioned above. The non-free image does not appear because the MediaWiki API gateway used in production right now is not configured to return non-free images.
  1. A follow up patch will allow us querying the MediaWiki API to return images with any license.
  1. RESTBase is already returning any license image.

Change 340970 had a related patch set uploaded (by bmansurov):
[mediawiki/extensions/Popups] Allow showing non-free images when using MediaWiki API

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

I noticed this behavior on the beta cluster. This is a copy of the non-free image page that was setup on Staging.
URL - https://en.wikipedia.beta.wmflabs.org/wiki/Category:Page_Previews Hover over 'PreviewsNonFreeImage"

Change 340970 merged by jenkins-bot:
[mediawiki/extensions/Popups] Allow showing non-free images when using MediaWiki API

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

phuedx added a comment.EditedMar 6 2017, 12:48 PM

@bmansurov: Thanks for taking the time to write up the notes in T158632#3070472 β€οΈπŸ‘Œ I'm unsure if this was actually a bug or not, though…

I've merged and pulled rEPOPb40a24c15cc1: Allow showing non-free images when using MediaWiki API onto the staging server and see a preview with an image when hoving over the "Non-free image" link on http://reading-web-staging.wmflabs.org/wiki/Special:AllPages.

/cc @ovasileva

phuedx updated the task description. (Show Details)Mar 6 2017, 1:32 PM
phuedx updated the task description. (Show Details)
phuedx updated the task description. (Show Details)Mar 6 2017, 1:35 PM

@phuedx you're right. It was a feature request, not a bug.

Looks good so far in testing. Will take another look on Beta when it is (more) stable.

Target site - http://reading-web-staging.wmflabs.org/wiki/Special:AllPages
Systems/Browsers:
Windows 10 - IE11
Windows 8.1 - IE11
Windows 8 - IE10
Windows 7 x64 - IE9 x64
Windows 10 - Edge
Windows 10 - Chrome 56

phuedx reassigned this task from bmansurov to ovasileva.Mar 13 2017, 11:16 AM
phuedx added a subscriber: bmansurov.

Over to you @ovasileva!

ovasileva closed this task as Resolved.Mar 14 2017, 4:17 PM

all done!