[openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)
Emin Kocan
notifications at github.com
Wed Oct 16 15:52:58 UTC 2024
> About the date pickers:
>
> I wanted to add them to our standard pagination because we already have date indexes. Then we wouldn't need them here, specifically in this notes filer. But this plan haven't worked so far because:
>
> * I wanted to first add a simpler thing to the standard pagination, namely links to first/last pages. I made several versions of this feature - [Add oldest/newest links to shared pagination #4710](https://github.com/openstreetmap/openstreetmap-website/pull/4710) [Add oldest/newest links to shared pagination - with gap between "newer" and "older" #4729](https://github.com/openstreetmap/openstreetmap-website/pull/4729) [Add oldest/newest links to shared pagination - with gaps around "newer" and "older" #4733](https://github.com/openstreetmap/openstreetmap-website/pull/4733) [Add oldest/newest links to shared pagination - with gaps around "newer" and "older" v2 #4734](https://github.com/openstreetmap/openstreetmap-website/pull/4734) - but none of them got much attention from the maintainers. I can still choose to add date pickers, but this will give me one more pull request that's going to be in conflict with the others which I'll have to maintain.
>
> * As you can see this notes list doesn't even use the standard pagination. I tried doing that too [Convert note pagination to newer/older note pages #4532](https://github.com/openstreetmap/openstreetmap-website/pull/4532). That wasn't convincing enough because it was too complicated. The complications were there because I used note ids as a cursor but I couldn't sort by them, this wouldn't get notes in the last updated order. The suggested solution by one of the maintainers is to use last comment ids instead, but it's currently being undermined by another maintainer who wants to remove opening comments.
Thank you for the detailed background and context, Anton. I agree that using date pickers makes sense if we’re filtering notes by dates, especially since the current setup isn’t relying on standard pagination.
As for the next steps, I’m not sure whether it’s better to get this PR merged as is and refactor later when the notes move to standard pagination, or if we should address the pagination issue first and then refactor this PR accordingly.
On a side note, I’ve managed to implement sortable columns for `created_at` and `updated_at` locally, but I’ll hold off on submitting that until this PR is merged to keep things cleaner and easier to review.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5255#issuecomment-2417241994
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5255/c2417241994 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241016/87fbc93c/attachment.htm>
More information about the rails-dev
mailing list