@nertc commented on this pull request.

Tested and works perfectly for all kinds of situations. I like the last 
solution that UI watches only author and the last comment. It provides 
intuitive UI/UX.

> @@ -24,7 +26,15 @@
       </tr>
     </thead>
   <% @notes.each do |note| -%>
-    <tr<% if note.author == @user %> class="table-primary"<% end %>>
+    <% opened_by_user = note.author == @user %>
+    <% closed_by_user = note.comments.last&.author == @user && 
note.comments.last&.event == "closed" %>

As I checked, mostly variables created in the `.html.erb` files directly have 
meaning of either class, id or other values that are only related to the UI and 
not to the logic. Is it okay for this project to have variables that are 
intermediate logical elements and don't have direct value of class, id or other 
strings like that?

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

Message ID: 
<openstreetmap/openstreetmap-website/pull/5269/review/2632444...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to