osmcha-frontend icon indicating copy to clipboard operation
osmcha-frontend copied to clipboard

Add links to Wikidata

Open Danysan1 opened this issue 3 years ago • 0 comments

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) ?

Immagine 2022-08-11 133030 Immagine 2022-08-11 132516

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>

Danysan1 avatar Aug 11 '22 11:08 Danysan1