[openstreetmap/openstreetmap-website] Replace page numbers with ID based selection for trace indexes (PR #4089)

Tom Hughes notifications at github.com
Sun Jul 23 18:43:41 UTC 2023


I've pushed a new version that I think addresses all your review comments.

I did look at the possibility of using a gem but I'm not convinced there's anything that's useful for various reasons.

In many ways [pagy_cursor](https://github.com/Uysim/pagy-cursor) looks excellent, especially since it's an extension to [pagy](https://github.com/ddnexus/pagy) which provides nice view helpers and would be good to replace our existing paging code for places where we do real paging. The problem is that it doesn't really integrate with pagy in any meaningful way and you can't use the pagy navigation helpers as https://github.com/Uysim/pagy-cursor/issues/21 makes clear. It's not entirely their fault as pagy would need changes to allow it to support cursor based paging but there doesn't seem to be any effort to properly integrate them.

As to [rails_cursor_pagination](https://github.com/xing/rails_cursor_pagination) there is the issue of the rather ugly cursors but we could live with that - you could even argue it's an advantage. There's a killer bug at the moment though (https://github.com/xing/rails_cursor_pagination/issues/132) in that even if you disable totals it still does the query when working our whether next/previous links are needed!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4089#issuecomment-1646928233
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4089/c1646928233 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230723/7a847166/attachment.htm>


More information about the rails-dev mailing list