Id: Wikidata field should autocomplete labels

Created on 2 Dec 2018  Â·  5Comments  Â·  Source: openstreetmap/iD

5500 implemented a Wikidata field that contains a plain text Identifier box for the QID of a Wikidata item. As a Wikidata contributor, I would find this field to be much more intuitive if it behaves like the claim text boxes on Wikidata. I think it would also be more intuitive to mappers who are unfamiliar with Wikidata and wouldn’t know how to come up with a QID on their own (since the Wikipedia field doesn’t automatically appear when you show the Wikidata field).

On Wikidata, you can type in a label and autocompletion suggestions appear, similar to the Wikipedia field’s title box:

label

But you can also paste in a QID and a matching item appears:

qid

Either way, once you select the suggestion, the label ends up in the text box:

result

Even though Wikidata is built atop QIDs, the QIDs are treated like a machine-readable implementation detail and deemphasized as much as possible in UI.

So I’d suggest rearranging the Identifier, Label, and Description boxes, so that once you select an item, the Label box at the top contains the label, the read-only Description box follows, and the read-only Identifier box contains the QID at the bottom.

field validation

Most helpful comment

I did this.

wikidata demo

All 5 comments

This would be particularly good when used for the Architect, Species/Animal, Operator, Network, Brand, Artist, Name Etymology and Subject fields.

So when typing out, for example, in an architect field "Santiago Calatrava", a Wikidata dropdown menu would appear, and upon selection we'd automatically set architect=Santiago Calatrava _and_ wikidata:architect=Q168482.

So when typing out, for example, in an architect field "Santiago Calatrava", a Wikidata dropdown menu would appear, and upon selection we'd automatically set architect=Santiago Calatrava _and_ wikidata:architect=Q168482.

I think people are generally in favor of the idea except for the "automatically" part 👍

@bhousel if we know that the fields architect and wikidata:architect are exact equivalents, what's the risk?

Here’s an example Wikidata API query that would be kicked off after typing in “Junction City” when iD is set to the Vietnamese locale. Notice how the labels and descriptions are in English as a fallback.

Note that this issue is specifically about the behavior of the existing wikidata field type, which is currently only used for the Wikidata field (corresponding to the wikidata tag). #5484 is about adopting that field type for the Operator field (operator:wikidata). I do think this issue would need to be addressed before Wikidata functionality could be added to any other fields, because there isn’t a straightforward mapping from taginfo autocompletion results to Wikidata QIDs.

I did this.

wikidata demo

Was this page helpful?
0 / 5 - 0 ratings