-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wikidata field #5500
Wikidata field #5500
Conversation
Thanks for getting the ball rolling on #4382! Do you plan to include functionality to “pretty-print” the Wikidata field (such as displaying the label) as part of this PR or leave it for later as tail work? If we merge the field without any pretty-printing, note that many existing features will show the QID, which most users will find a bit inscrutable. It looks like changing the Wikipedia field will automatically update the Wikidata field, just as it updates the |
@1ec5 Thanks for the feedback! I'll look into fetching/displaying the basic Wiki meta and auto-updating the Wikipedia tag. While I agree that only displaying the ID could be confusing, I think the benefit of the "open Wikidata page" button makes the field worth adding it as-is. Right now the ID is still visible in the raw tags editor with little indication of what it means, so it would help to have the button. That said, I'm also fine with holding off if that's what others prefer 🤷♂️ |
I agree that making the Wikidata tag more visible is a good move, even if there are rough edges for the moment. I’d personally be OK with the field’s presentation as it stands, but my familiarity with Wikidata makes me biased in that regard. 😉 It looks like the existing Wikidata service (for converting a Wikipedia article title to a QID) already makes a iD/modules/services/wikidata.js Lines 23 to 30 in 107f669
Here’s an API call that should be suitable for converting a QID to a Wikipedia article title (via |
Adds an Identifier label to the Wikidata QID input
… in the field, if present
I've updated the field so that the label and description are fetched and displayed, and as such this PR now closes #4382. Details:
@1ec5 I've decided not to automatically update the |
@@ -139,6 +139,10 @@ export function presetIndex() { | |||
}); | |||
} | |||
|
|||
// move the wikidata field to directly follow the wikipedia field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome attention to detail here 😍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Nice, this is great @quincylvania 👍 Happy to merge it like this and then we can think about if we want it to do more of the other #4382 stuff later.. |
Thanks again for this feature! Not only does it make the Wikidata feature feel less sneaky, but it also helps the mapper verify their Wikipedia article selection on the spot.
That sounds like a bad situation at a glance. But as long as we make an effort to preserve the existing language, I think the need to keep the two tags in sync would outweigh the awkwardness of a foreign Wikipedia article title in some edge cases. So in this example with the Chinese speaker, either we’d end up with an English article title as expected, or we’d end up with a Chinese article title because Wikipedia has an article about Tulsa in Chinese but not in English, the local language. I opened #5543 to track keeping the tags in sync. |
Edit: Closes #4382. See: #5500 (comment)
This is a first step toward #4382, though it doesn't fulfill that issue's specific task. It adds a field for editing the
wikidata
tag and includes a button linking to the item's page on https://wikidata.org.While casual mappers are unlikely to add Wikidata IDs separate from Wikipedia pages, this field is useful since it shows users if a value is present and lets them quickly open the Wikidata page. Having this as a separate field makes for a simpler interface, especially should more functionality be added to either field in the future (such as loading Wikidata values right in iD).
To maintain a sensible order, the Wikidata field is made to directly follow the Wikipedia field if both are present.