Increase max-height of reference previews
Closed, ResolvedPublic1 Estimated Story Points

Description

Description

Based on user feedback and the data available in this dashboard (link), we've decided to increase the max-height of reference previews. The intended goal is to reduce the percentage of reference previews that need a scrollbar, while still maintaining a max-height and visual parity with page previews.

Design

The new max-height of the entire preview should match the max-height of page previews (roughly 403px). For the purpose of the screenshot below this was achieved my increasing the max-height of .mwe-popups-extract to 292px.

image.png (518×940 px, 304 KB)

Event Timeline

Jdlrobson added subscribers: ovasileva, Jdlrobson.

cc @ovasileva @alexhollender have tagged with tracking as have assumed this is for the WMDE backlog

Lena_WMDE set the point value for this task to 2.Oct 19 2020, 9:10 AM
Lena_WMDE changed the point value for this task from 2 to 1.

Change 636660 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] Increase maximum height for reference previews

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

Change 636660 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Increase maximum height for reference previews

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

I noticed that there are already mwe-popups-is-tall and mwe-popups-is-not-tall classes which perhaps we should have used here. Our additional style is being applied to a "is not tall" element :-/

Uh, no, these classes are for something else. "Tall" is for popups that show an image on the right side. They have significantly different size constrains. I believe they are fixed to 450 x 250 pixels (because of the image on the right), while normal popups are 320 pixels wide, and have a flexible height. "Tall" is probably a bad name. It's not the popup that is tall (it's actually wider), but the image.

Reference popups are never tall, because they never show an image.

"Tall" is for popups that show an image on the right side. They have significantly different size constrains. I believe they are fixed to 450 x 250 pixels (because of the image on the right), while normal popups are 320 pixels wide, and have a flexible height.

There is a difference in height, the .mwe-popups-is-tall .mwe-popups-extract selector assigns 9 line heights, and the other assigns 7 line heights. Good points that the width changes, and the intention of the class is to display portrait-aspect thumbnails.

"Tall" is probably a bad name. It's not the popup that is tall (it's actually wider), but the image.

This confirms your analysis: https://github.com/wikimedia/mediawiki-extensions-Popups/blob/master/src/ui/renderer.js#L58

~~Did this change break https://doc.wikimedia.org/Popups/master/js/ui/?path=/story/thumbnails--landscape-thin-thumbnail and https://doc.wikimedia.org/Popups/master/js/ui/?path=/story/thumbnails--landscape-svg?~~

(I'm just wondering as this code has been historically very brittle and was actually why we setup storybook to monitor these)

Edit: doesn't look like it I'll cut a new bug to investigate...

Change 637690 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/Popups@master] Resize popup to 403px

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

Change 637690 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Resize popup to 403px

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