[openstreetmap/openstreetmap-website] Show tag changes in object history view (PR #6448)

Minh Nguyễn notifications at github.com
Mon Oct 20 19:06:40 UTC 2025


@1ec5 commented on this pull request.



> +      :added => "tag-added",
+      :modified => "tag-modified",
+      :deleted => "tag-deleted",
+      :unmodified => "tag-unmodified"
+    }.fetch(change_type, "")
+  end
+
+  def format_tag_value_with_change(key, change_info)
+    case change_info[:type]
+    when :added
+      tag.div(safe_join(["+", format_value(key, change_info[:current])], " "), :class => "diff-new")
+    when :unmodified
+      tag.div(safe_join([tag.nbsp, format_value(key, change_info[:current])], " "), :class => "diff-unchanged")
+    when :modified
+      safe_join([
+                  tag.div(safe_join(["-", format_value(key, change_info[:previous])], " "), :class => "diff-old"),

Super super nitpicky, but the proper Unicode minus sign matches the width of the plus sign in most fonts, so it looks a bit tidier:

```suggestion
                  tag.div(safe_join(["−", format_value(key, change_info[:previous])], " "), :class => "diff-old"),
```

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

Message ID: <openstreetmap/openstreetmap-website/pull/6448/review/3357600335 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251020/5c6a8a27/attachment.htm>


More information about the rails-dev mailing list