<p></p>
<p><b>@pablobm</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6448#discussion_r2439293444">app/helpers/browse_helper.rb</a>:</p>
<pre style='color:#555'>> @@ -72,6 +72,63 @@ def link_follow(object)
"nofollow" if object.tags.empty?
end
+ # Tag change highlighting methods for history view
+ def tag_changes_for_version(current_version, all_versions)
+ return {} unless current_version && all_versions
+
+ current_tags = current_version.tags || {}
+
+ # Find the previous version by sorting all versions and finding the one before current
+ sorted_versions = all_versions.sort_by(&:version)
+ current_index = sorted_versions.find_index { |v| v.version == current_version.version }
+ previous_version = current_index&.positive? ? sorted_versions[current_index - 1] : nil
+
+ # Don't compare with redacted versions unless we're showing redactions
+ previous_tags = if previous_version && (!previous_version.redacted? || params[:show_redactions])
</pre>
<p dir="auto">Would it make sense to filter out the redacted versions when finding the index above, and show changes that skip versions?</p>
<p dir="auto">So for example: if we have v1, v2(redacted), v3, then show changes between v1 and v3</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6448#pullrequestreview-3349444623">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLJQDD3JSTNOUPIM3GT3YDCI5AVCNFSM6AAAAACJGVZNZ2VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTGNBZGQ2DINRSGM">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLIOYW3X3ITWWH7PO7T3YDCI5A5CNFSM6AAAAACJGVZNZ2WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTWHUR4A6.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/6448/review/3349444623</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/6448#pullrequestreview-3349444623",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6448#pullrequestreview-3349444623",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>