Page MenuHomePhabricator

Load thumbnail image on click in nearby
Closed, ResolvedPublic

Description

We want to load images on click to work around the API limit for thumbnails and allow adding more than 50 nearby points.

Screenshot from 2023-02-03 12-46-34.png (573×1 px, 203 KB)

Implementation

  • Change limit from 50 to 100
  • Load thumbnail on click instead of directly with the API call
  • Scroll into view after the image is loaded ( even if we scroll twice then ) to prevent popups that are out of view

Demo for fix:
https://de.wikipedia.org/wiki/Bremen#/map/0

  • Load nearby points & click on one of them (e.g. at the top of the screen )

Event Timeline

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

[mediawiki/extensions/Kartographer@master] Nearby: Load thumbnails on click only

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

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

[mediawiki/extensions/Kartographer@master] Nearby: Cache thumbnail API responses

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

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

[mediawiki/extensions/Kartographer@master] Nearby: Fetch up to 50 thumbnails in 1 API request

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

WMDE-Fisch subscribed.

Talked about it in story time. We'll scroll into view when the image size is known.

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

[mediawiki/extensions/Kartographer@master] Nearby: Scroll popup into view after thumbnail is retreived

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

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

[mediawiki/extensions/Kartographer@master] Nearby: Rebuild popup creation and update

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

Change 882571 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Load thumbnails on click only

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

Change 886009 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Scroll popup into view after thumbnail is retreived

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

Change 886041 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Rebuild popup creation to avoid private call

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

Change 882574 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Cache thumbnail API responses

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

thiemowmde claimed this task.

Change 882586 abandoned by Thiemo Kreuz (WMDE):

[mediawiki/extensions/Kartographer@master] Nearby: Fetch up to 50 thumbnails in 1 API request

Reason:

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

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

[mediawiki/extensions/Kartographer@master] Nearby: Don't create popup HTML twice without/with thumbnail

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

Change 926415 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Don't create popup HTML twice without/with thumbnail

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