Page MenuHomePhabricator

Link statement labels with their respective Wikidata urls
Closed, ResolvedPublic


User story:
As a Commons user, I want all labels to be linked to their Wikidata pages (especially at the qualifier level) so that I can confirm I am using the correct properties and values.

We have this:

Screenshot 2019-07-03 17.42.17.png (254×906 px, 38 KB)

We want this:

Group 4.png (886×1 px, 118 KB)

Acceptance Criteria:

  • Properties and values (including at the Qualifier level) are linked with their respective Wikidata urls
  • A popover appears when a user hovers over a label at the first time so they know where that link is going

See parent ticket for previous discussion: T225526

Event Timeline

Ramsey-WMF triaged this task as High priority.
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.

Assigning this to Eric for now so he doesn't feel left out :)

There are two tasks here, and it may be good to separate them.

  1. Add links to each Wikidata item (property, value, etc).
  2. Add the new UI elements to help explain to users what is going on.

I have some questions about #2:

  • Do we show the tooltip once for logged-in users and then ensure they never see it again using cookies/userprefs (similar to how the CC-0 warning works)?
  • Will anon users see the tooltip every time they load the page?
  • Will clicking the tooltip dismiss it (I assume so)?
  • What element should the tooltip be attached to? The mock-up here has it pointing to the first qualifier of the first statement of the first panel, and not appearing anywhere elsewhere. Do we show this tooltip if a page has a statement but no qualifiers? What about when a page only has an empty "depicts" panel – the "depicts" link still goes to a Wikidata item; would it get the popover in that case? Would it be better to simply add a non-hover, non-tooltip element at the top of the structured data tab which says that the links inside panels go to Wikidata pages?
  • Does this message appear any different when federation is not enabled (i.e. when links are to local wikibase items)?
  • What happens on mobile?

Work on the first part of this ticket (adding the links) can begin now, but it would be good to have more clarity on the points above before working on the second part.

Change 521394 had a related patch set uploaded (by Eric Gardner; owner: Eric Gardner):
[mediawiki/extensions/WikibaseMediaInfo@master] Add Wikidata links to statement UI elements

Pam will update this ticket with new designs in the near future, but to directly answer a few questions:

  • We're moving away from the current tooltip and will have a little "notice bar" above the statement panel group instead.
  • But we should still take advantage of default browser behavior and add "title=" properties to the label links that contain the respective Q and P numbers at the very least (pretty much what Wikidata currently does)
  • Anon users will see the new noticebar every time. For logged in users, once they click the little "x", it's gone (although we could potentially use the notice bar for some other purpose in the future)

Hey Eric, here are the updated designs:

WD link on UW.png (2×2 px, 1 MB)

WD link on FP.png (3×2 px, 2 MB)

@PDrouin-WMF thanks – I'll add the notice bar in a separate patch.

Change 522563 had a related patch set uploaded (by Eric Gardner; owner: Eric Gardner):
[mediawiki/extensions/WikibaseMediaInfo@master] WIP: Add LinkNoticeWidget above Statements Panel

Here's a current example of how the links message appears on the file page. Styling just follows the UI defaults. Clicking the "X" removes the message and saves the user's decision.

Screen Shot 2019-07-15 at 6.08.59 PM.png (846×1 px, 105 KB)

If this looks good then this patch can probably be merged tomorrow.

Regarding UploadWizard, I just realized that we haven't been talking much about how this element will impact the multi-file experience as it currently stands:

Screen Shot 2019-07-15 at 7.28.34 PM.png (1×1 px, 240 KB)

For example, would the links warning appear on every file page in the "booklet" interface? That seems like it could get annoying very quickly. Then there is the problem of ensuring that the user's decision to dismiss one panel is immediately reflected on the other file sections.

Finally, the changes we have been discussing for the structured data experience in UW might impact things here too.

I think my recommendation would be to not add this new element to UW for the moment, and only show it on the file page. Links are not as prevalent here anyway (Qualifiers remain in edit mode here, for example). Then we can move forward and get the existing patches in this week's release.

Change 521394 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add Wikidata links to statement UI elements

Change 522563 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Add LinkNoticeWidget above Statements Panel

Thanks, Eric. I think it'd be best to have the new element only show once (on the first image) in UW but if @Ramsey-WMF is okay just showing it on FP for now, that sounds good to me.

When no description in my language is available it uses the Wikidata's convention to add language name next to the label when another language (en) is selected. It is displayed incorrectly: language name is part of label link and without space between name.

Solution: move language name out from link or format&differ it properly.


The issue that Wargo mentions above is being addressed separately in another task.