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

Add sorting and filtering functionality to user notes page

Open kcne opened this issue 4 months ago • 6 comments

This PR addresses #832 by adding sorting and filtering functionality to user note pages. This PR is also an alternative, or better put expanding #5239 so that filtering and sorting functionality can be expanded further on if needed.

Key Changes:

  • Filter by Status: Users can filter notes by their status (open, closed, or all).
  • Filter by Note Type: View notes the user submitted or commented on (including those with anonymous comments).
  • Date Range Filtering: Users can filter notes based on a specified from and to date range.
  • Sorting Options: Sort notes by created_at or updated_at in ascending or descending order.

Tests for added methods and scopes have been added to ensure that these features work as expected across different scenarios, including handling of date ranges and note types.

Screenshots:

Screenshot 2024-10-08 at 16 47 57 Screenshot 2024-10-08 at 16 48 22 Screenshot 2024-10-08 at 16 48 34

kcne avatar Oct 09 '24 17:10 kcne