osmcha-frontend
osmcha-frontend copied to clipboard
Add links to Wikidata
I'm submitting a feature request
Brief Description
It would be very helpful if the values for the wikidata and *:wikidata keys weren't simple text fields but links to the relevant wikidata page.
What is the motivation / use case for this feature?
Analyzing changesets which affect wikidata and *:wikidata (subject:wikidata, operator:wikidata, brand:wikidata, name:etymology:wikidata, ...) is currently cumbersome because you must manually find on Wikidata the elements with the old/new ID used in the changeset.
What is the current behaviour, (attach relevant screenshots) ?

Currently wikidata values are rendered are rendered like normal text:
<td class="...">VALUE</td>
For example, if the tag is wikidata=Q4012593, which refers to the Wikidata page https://www.wikidata.org/wiki/Q4012593 , it is rendered as:
<td class="...">Q4012593</td>
What is the expected behaviour ?
If the value is a valid wikidata Q-ID (regex Q\d+) the rendered value would be a link to the referred wikidata item:
<td class="..."><a href="https://www.wikidata.org/wiki/VALUE">VALUE</a></td>
For example if the value is Q4012593:
<td class="..."><a href="https://www.wikidata.org/wiki/Q4012593">Q4012593</a></td>