[openstreetmap/openstreetmap-website] Use RichText for changeset comments (PR #6597)
Marwin Hochfelsner
notifications at github.com
Tue Dec 9 08:58:25 UTC 2025
@hlfan commented on this pull request.
> @@ -8,11 +8,7 @@
</h4>
<p class="fs-6 overflow-x-auto mb-2" dir="auto">
- <% if common_details.changeset.tags["comment"].present? %>
- <%= linkify(common_details.changeset.tags["comment"]) %>
- <% else %>
- <%= t "browse.no_comment" %>
- <% end %>
+ <%= RichText.new("text", common_details.changeset.comment || t("browse.no_comment")) %>
I just took the structure from `changesets/show.html.erb` to not have to worry with the nullable comment and avoid `common_details.changeset.comment&.then{|t|RichText.new("text",t)}` as that's not quite as easy to read.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6597#discussion_r2601687531
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6597/review/3556213682 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20251209/b7819a4c/attachment.htm>
More information about the rails-dev
mailing list