[openstreetmap/openstreetmap-website] Make the /history page RESTful in order to improve the user experience (Issue #4039)

Stillhart notifications at github.com
Sat May 20 11:45:28 UTC 2023


### Problem

The /history page is barely usable for me and I don't think we need much to improve it by a lot. I think it's not RESTful enough and we just need to make it in order to improve it. 

Current /changeset Features:
- List of changesets 👍
- List of changesets updates based on current view 👍
- List of changesets can be scrolled and more changesets can be loaded 👍
- Hover a changeset on the list or on the map, and it's highlighted in both 👍 

It starts once I click on one changeset:
 - It auto-zooms in on the changeset, and sometimes corrupts the browser history with different coordinates 👎

Now the change is shown but how do I get back?
 - I intuitively press the x-button in the changeset to close it. The plain map is shown instead of the history page.
 - I can press the browser back button to get back 👍

Now I am back on the history page:
 - I might have lost the current view due to the auto-zoom 👎
 - I may need to scroll all the way down and press many times "more" in order to get to the same "page" again. 👎👎
   -  I might not get the same list since I am now in another part of the map 👎
   - Surely it will take a while until I am back at the same position of changesets 👎
 - The last clicked changeset is not highlighted 👎

Sidequests:
 - I would like to go to page 100 to see some recent but not the latest changes. Currently I need to press 99 times "More". Then I would like to share that link with a friend: I can't. 
 - I loaded multiple pages of changesets. I highlight one in the map, and it highlights it on the list. But this list highlight is useless since it is not currently in the view. Maybe scroll that highlighted item into view.
 - Highlight/mark changes which have the bounding boxes not withing the current view

When I look into the developers tools while I click the "More" buttton, I can see the following request which suggests that most information seems be already present.

_/history?**bbox**=8.519511222839355%2C47.35650163792201%2C8.586888313293457%2C47.3758312020736&**list**=1&**max_id**=136282662_

### Description

In order to improve the situation I suggest to do the following. Some fine tuning is probably needed.

1. Add the current page of changesets to the browser URL, and either load that page of changesets or load all of them until that one. I don't know how pagination is implemented here but I am sure there is some way to improve.
2. Add the currently selected/clicked changeset to the browser url before navigating to that changeset. That should restore the back button functionality
3. Don't update the URL with the coordinates after a changeset has been clicked while it's zooming in.
4. Extend the infinite scroll "more" button with some form of pagination view. 
5. Add an option to click/highlight a changeset without opening it immediately. (goes hand in hand with 2. )
6. When a changeset is highlighted in the map, scroll the changeset in the list into view, or give some option to do so. (also related to 2.)
7. If possible, add back button to the /changeset view. That requires some new flag in the URL.

### Screenshots

_No response_

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/4039
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/4039 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230520/c46eabb8/attachment.htm>


More information about the rails-dev mailing list