Page MenuHomePhabricator

Cosmetic adjustment to reconciled files' hover card preview: make thumbnail slightly larger and maintain aspect ratio of the file itself
Open, Needs TriagePublic

Description

When users hover over a file name that is reconciled via the Wikimedia Commons reconciliation service, they get a blue pop up with a thumbnail preview of the file, with its file name and size:

image.png (87×617 px, 32 KB)

At this moment, the thumbnail usually appears stretched - its aspect ratio doesn't correspond with the file's aspect ratio.
After I've used the Commons reconciliation feature for a while, I think the thumbnail preview can also be made a bit bigger, allowing the user to get a bit better impression of the file itself (unless there are solid arguments against this).

My request would be:

  • maintain aspect ratio of the original file (e.g. if its aspect ratio is 4:3 then the thumbnail should also be 4:3)
  • let's perhaps go up to a max height of 200 pixels if the preview has portrait orientation, or a max width of 200 pixels if the preview has landscape orientation? I'm only giving a general indication here; I don't know how thumbnail sizes are usually calculated so that they appear 'balanced' throughout an application or website and it may be good to look at best practices for that. The algorithm that generates thumbnails for the popup of cells reconciled with the Wikidata reconciliation service gives results that look good to me, although I'd like the thumbnails for the Commons reconciliation to be a bit larger.