[openstreetmap/openstreetmap-website] Add status filter to user's note page (PR #5297)

Emin Kocan notifications at github.com
Wed Oct 30 21:11:31 UTC 2024


### Description
This PR partly addresses #832 and serves as a smaller alternative to #5255 as suggested in comments. It aims to enhance user experience on user note pages by providing filtering functionality for notes by status. The `with_status` scope is added to the `Note` model, and the `NotesController` is updated accordingly. Default behavior remains unchanged since the status preselected value is set to `All` by default.

### How has this been tested?
Test for the new scope is added to note model test to ensure functionality is working as expected.

### Screenshots
<img width="1142" alt="Screenshot 2024-10-30 at 22 07 56" src="https://github.com/user-attachments/assets/cf15a288-91c3-40fe-b2f1-690fab42b248">
<img width="1144" alt="Screenshot 2024-10-30 at 22 07 46" src="https://github.com/user-attachments/assets/8145173f-8c3d-417d-a708-94d25f952e6a">

You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/5297

-- Commit Summary --

  * Add status filter to user's note page

-- File Changes --

    M app/controllers/notes_controller.rb (3)
    M app/models/note.rb (10)
    M app/views/notes/index.html.erb (14)
    M config/locales/en.yml (4)
    M test/models/note_test.rb (21)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/5297.patch
https://github.com/openstreetmap/openstreetmap-website/pull/5297.diff

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

Message ID: <openstreetmap/openstreetmap-website/pull/5297 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241030/72b8403f/attachment.htm>


More information about the rails-dev mailing list