[openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

Anton Khorev notifications at github.com
Mon Jun 30 13:41:04 UTC 2025


@AntonKhorev commented on this pull request.



> +      $("#sidebar-content").on("turbo:before-stream-render", event => {
+        const defaultRender = event.detail.render;
+        event.detail.render = function (streamElement) {
+          defaultRender(streamElement);
+          markWikidataLinksAsExplainable();
+        };
+      });

I was going to suggest another modification later after this PR is merged. The Q-links work differently depending on their state, they either open a wikidata page or add a row to the tags table. The state is invisible to the user, and this is not the most intuitive behaviour. So I was going to suggest to keep the Q-links working as before and have a button, likely with the wikidata logo, that adds a wikidata row to tags. The button could be placed where we have a color icon:

![image](https://github.com/user-attachments/assets/6c5efde9-eff6-482e-9e00-f2dc8d2d69a7)

But looking at the code here, maybe it's easier to do this right away. We can have wikidata buttons rendered server-side with delegated click listeners. Then listening to turbo events that look for new Q-links won't be necessary.

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

Message ID: <openstreetmap/openstreetmap-website/pull/6127/review/2971286305 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250630/c1752a51/attachment.htm>


More information about the rails-dev mailing list