Page MenuHomePhabricator

Add refresh button for nearby markers instead of autoloading
Closed, ResolvedPublic

Description

Testing clustered markers we decided against autoload and want to add a refresh button to load new markers when the map has been moved.

Requirements

  • Remove autoloading of new markers when the map moves
  • Add a button which overlays the map and reloads pins for articles within the given frame
  • Button should appear only when the user has zoomed or panned to change the frame view
  • Button should disappear on click and only re-appear if the user moves the view again

Mock and specs

reload button.png (732×649 px, 559 KB)

  • Button should be normal ButtonWidget (icon, progressive)
  • Use "Reload" icon
  • UI copy: "Reload results"

Align center within button area as shown below. If not possible, center horizontally and set 20px from top edge of map.

Screen Shot 2023-01-24 at 10.45.14.png (153×1 px, 196 KB)

Demo

Peek 2023-02-02 16-12.gif (795×1 px, 3 MB)

Open question

What should happen when the button is clicked?

We now have solution A implemented without clustering. With clustering we could also go back to our original approach and not reload all points but adding new ones, if we want that.

A: Remove all visible points and load a new set for the visible area (similar to clicking the show button twice).
➕ pro: number of shown points stays the same
➖ contra: might be confusing that some points “disappear”

B: Add more points to the existing ones
➕ pro: showing more additionally points can not be achieved another way, reloading could also be done with clicking the show button twice
➖ contra: might be confusing that the results are different when you disable and re-enable

Implementation

Old: POC that changes the display button into a reload button

Event Timeline

lilients_WMDE renamed this task from Add refresh button for nearby to Add refresh button for nearby markers instead of autoloading .Jan 24 2023, 3:24 PM
lilients_WMDE updated the task description. (Show Details)

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

[mediawiki/extensions/Kartographer@master] Nearby: Remove auto-refresh feature

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

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

[mediawiki/extensions/Kartographer@master] Nearby: Reduce tracking of layers per zoom to a single layer

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

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

[mediawiki/extensions/Kartographer@master] Nearby: Reduce duplicate title filtering down to a single Set

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

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

[mediawiki/extensions/Kartographer@master] [POC] Refresh nearby articles via button instead of automatically

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

Change 824750 abandoned by Svantje Lilienthal:

[mediawiki/extensions/Kartographer@master] [POC] Refresh nearby articles via button instead of automatically

Reason:

We decided to create a new reload button instead of reusing the display button like this patch does.

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

Change 884901 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Kartographer@master] Add refresh button for nearby markers instead of autoloading

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

Change 881896 abandoned by WMDE-Fisch:

[mediawiki/extensions/Kartographer@master] Nearby: Remove auto-refresh feature

Reason:

Completely replaced by I0b28e7bc679493115b3727ec0656b493413ca0d2 that also includes the refresh button "replacement". Also rebased the follow-up cleanup.

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

We decided to go with the deleting and adding new markers (option A) for now because that is the current behaviour without clustering. We can revisit the question when we enable clustering.

Change 884901 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Add refresh button for nearby markers instead of autoloading

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

Change 881897 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Reduce duplicate title filtering down to a single Set

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

Change 881898 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Reduce tracking of layers per zoom to a single layer

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

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

[mediawiki/extensions/Kartographer@master] Avoid this.map property by utilizing .bind()

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

Change 886352 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Avoid this.map property by utilizing .bind()

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

Just for reference: I found the Realtime Preview feature does have a reload button that looks almost identical.

Screenshot from 2023-02-08 09-39-20.png (270×726 px, 28 KB)

@thiemowmde Thanks for sharing this reference.

When reviewing the feature I realized that the wrong button type was used. It should be normal progressive (gray background with blue text). Would be great if this could be updated. Thanks!

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

[mediawiki/extensions/Kartographer@master] Nearby: Minor style fixes for the reload button

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

Change 887934 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Nearby: Minor style fixes for the reload button

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