openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

Refactor PaginationMethods to Support Sorting with Turbo Integration

Open kcne opened this issue 4 months ago • 5 comments

Problem

Currently, we use a custom PaginationMethods module, which sorts and filters data using IDs. Sorting by other non unique attributes does not work correctly, and implementing sorting with these attributes would require changes to PaginationMethods. Refactoring it to support sorting with pagination would allow seamless integration of this feature.

Description

PaginationMethods could be modified to handle sorting on attributes other than IDs, integrated with Turbo for pagination. This would allow us to add sorting to tables across the site. As an example, this feature could later be extended to the Notes page, where Turbo pagination would enhance the user experience with sortable columns and icons next to headers.

I am eager to do some research and explore the best approach for this. Would appreciate any suggestions or ideas on how to proceed.

Screenshots

On the UI end, integrating this into tables could look something like this (we would just add the sorting icons): Screenshot 2024-10-13 at 16 21 36

kcne avatar Oct 13 '24 14:10 kcne