[openstreetmap/openstreetmap-website] Add sorting and filtering functionality to user notes page (PR #5255)

Anton Khorev notifications at github.com
Tue Oct 15 12:25:48 UTC 2024


@AntonKhorev commented on this pull request.



>  <% else %>
+  <%= form_tag(url_for("controller" => "notes", "action" => "index"), "method" => :get, "data" => { "turbo" => true, "turbo-frame" => "pagination", "turbo-action" => "advance" }) do %>
+    <div class="row gx-2">
+      <div class="col-md-auto mb-3">
+        <%= label_tag :status, t(".status") %>
+        <%= select_tag  :status,
+                        options_for_select([[t(".all"), "all"], [t(".open"), "open"], [t(".closed"), "closed"]], params[:status]),
+                        :include_blank => t(".select_status"),
+                        :class => "form-select" %>
+      </div>
+      <div class="col-md-auto mb-3">
+        <%= label_tag :note_type, t(".note_type") %>

I wouldn't call this a "note type". It's an interaction type between the user and the note.

And then there's a question if this kind of filtering can be done efficiently because here you have `INNER JOIN "note_comments"` twice.

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

Message ID: <openstreetmap/openstreetmap-website/pull/5255/review/2369178019 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20241015/26e61107/attachment-0001.htm>


More information about the rails-dev mailing list