(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

Sync Kartographer popup image behavior
Closed, ResolvedPublic

Description

Currently the width of the pageimage in nearby popups can vary a lot. It mainly depends on the width of the popup, that's influenced by the length of the title and/or description. Since these two can vary a lot the current range of image widths is somewhere between under 50 and 277px. The latter given due to the max popup width minus the margins.

Screenshot from 2023-01-25 15-09-42.png (1×1 px, 1 MB)

In that context we decided on two things as MVP to at least improve the situation without too much guesswork.

Acceptance criteria:

  • Sync the layout of Nearby popups with the marker popups from user input
  • Depending on the max width popup images can reach, reduce the size we load them e.g. with the 250 width preset
  • TO CHECK: Increase min width for popups

Demo for fix:
https://en.wikipedia.beta.wmflabs.org/wiki/Maptests/Inline_marker#/map/0

  • Load nearby markers and compare the Opéra de Monte-Carlo popups

Event Timeline

Change 883097 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Nearby: Minor tweaks/updates to popup CSS code

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

Change 882666 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] [POC] Nearby: Soft transition for async thumbnail loading

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

Change 883097 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Minor tweaks/updates to popup CSS code

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

General insights:

  • Nearby marker popups and popups from user input share the same CSS.
  • If the users manually adds an image to the popup content {1] it behaves exactly the same. So by default it tries to fit the title width until a certain maximum.
  • When manually adding images users can give a fixed image width [2] this way the width can exceed the size given by the title width, but never the maximum width of 277px

[1]

"description": "[[File:Casino_de_Montecarlo,_Mónaco,_2016-06-23,_DD_04.jpg]",

[2]

"description": "[[File:Casino_de_Montecarlo,_Mónaco,_2016-06-23,_DD_04.jpg|title|400px]",

Change 886347 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Kartographer@master] Nearby: Reduce thumbnail size loaded to 250

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

From my perspective increasing the max width of the popups is not really helpful. They already feel quite large IMO.

WMDE-Fisch updated the task description. (Show Details)
WMDE-Fisch moved this task from Doing to Tech Review on the WMDE-TechWish-Sprint-2023-01-18 board.

Change 886347 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Reduce thumbnail size loaded to 250

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

Change 888698 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Nearby: Fix bogus popup size calculation

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

Change 888698 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Nearby: Fix bogus popup size calculation

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

With the width:auto there's something like this happening on custom markers with an image:

220px.png (399×424 px, 192 KB)

Change 889587 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Nearby: Reduce thumbnail size further down to 220px

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

Change 889587 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Kartographer@master] Nearby: Reduce thumbnail size further down to 220px

Reason:

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

Change 888698 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Fix bogus popup size calculation

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

Change 889953 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] Fix placement of double-bordered "thumb" images in popups

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

Change 889953 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Fix placement of double-bordered "thumb" images in popups

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

Change 882666 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Kartographer@master] [POC] Nearby: Soft transition for async thumbnail loading

Reason:

The resulting animation is super disturbing.

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