<p></p>
<p><b>@AntonKhorev</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/6127#discussion_r2175188539">app/assets/javascripts/index/element.js</a>:</p>
<pre style='color:#555'>> + $("#sidebar-content").on("turbo:before-stream-render", event => {
+ const defaultRender = event.detail.render;
+ event.detail.render = function (streamElement) {
+ defaultRender(streamElement);
+ markWikidataLinksAsExplainable();
+ };
+ });
</pre>
<p dir="auto">I wouldn't say it rewrites the tag value. I think it's obvious what is a tag value and what is an icon on the side of the table cell, because tag values are text and not images. Previously you changed the text.</p>
<p dir="auto">If you install the listener like this<br>
<a href="https://github.com/openstreetmap/openstreetmap-website/blob/3aebcb18fdf437b6994866fc66120f48e37f0cd2/app/assets/javascripts/index/element.js#L2">https://github.com/openstreetmap/openstreetmap-website/blob/3aebcb18fdf437b6994866fc66120f48e37f0cd2/app/assets/javascripts/index/element.js#L2</a><br>
the selection for whatever you write after <code class="notranslate">"click"</code> will happen inside the listener on <code class="notranslate">document</code>. Turbo stream is not rewriting the entire document killing off that listener. Although maybe <code class="notranslate">#sidebar</code> would have been better than <code class="notranslate">document</code> in this case, turbo stream doesn't rewrite it either.</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/6127#discussion_r2175188539">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLKNRHQ4Y6FKAMFMAJT3GFBETAVCNFSM6AAAAAB75WISWSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDSNZRGQYTOMJRGQ">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLLNUSVYXG2GONOOE433GFBETA5CNFSM6AAAAAB75WISWSWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTVRDQ5BU.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/6127/review/2971417114</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/6127#discussion_r2175188539",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/6127#discussion_r2175188539",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>