[openstreetmap/openstreetmap-website] Make "Load more" button on history pages work as a link to the next page (PR #3829)
Anton Khorev
notifications at github.com
Wed Dec 7 16:04:19 UTC 2022
"Pagination working properly without javascript" from https://github.com/openstreetmap/openstreetmap-website/issues/647#issuecomment-1298624196.
The link actually exists even without this PR. You can open any changeset list page, middle-click the "Load more" button and you'll get the next page but it won't have the correct layout.
This PR makes the link work as a proper webpage. Also it changes the link from `.../history?max_id=(id)` to `.../history/(id)`. This makes it possible to construct permalinks to some point in time of someone's edit history.
The plan is later to update the id in the url when the sidebar is scrolled, similar to how [the new forum](https://community.openstreetmap.org/) updates its urls with comment numbers. This would roughly do what was requested in https://github.com/openstreetmap/openstreetmap-website/issues/933. Also it would do https://github.com/openstreetmap/openstreetmap-website/issues/647 but without caching.
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/3829
-- Commit Summary --
* Add ajax parameters to 'Load more' links with javascript
* Rename changeset loader functions
* Add tests for user's history max_id parameter support
* Get max_id from static page path, use it to load first changesets
* Make max_id part of url path
* Update place history url test to be aware of max_id
* Remove max_id from url when viewing place history and map is moved
-- File Changes --
M app/assets/javascripts/index.js (8)
M app/assets/javascripts/index/history.js (55)
M app/views/changesets/index.html.erb (2)
M config/routes.rb (8)
M test/controllers/changesets_controller_test.rb (38)
M test/system/history_test.rb (45)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/3829.patch
https://github.com/openstreetmap/openstreetmap-website/pull/3829.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3829
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3829 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221207/8c4433b9/attachment.htm>
More information about the rails-dev
mailing list