Page MenuHomePhabricator

Allow to middle-click through to the Wikidata item from search results when adding Depicts statements
Closed, ResolvedPublic


As well put by @LucasWerkmeister:

On Wikidata, when I search for an item and the results are ambiguous (e. g. similar works of art), I can middle-click on them to open the items and inspect them more closely, since the search results are links. Here, even though the individual search results have a “pointer” cursor, they’re not actually links and I can’t follow them. If I want to find out which item is the correct one, I have to figure that out on Wikidata and then copy the item ID and paste that here.

The workaround here is that 'choosing' a value does not save the claim, and gets you a hyperlink to the Q-item, so you can investigate the value that way ; but a middle-click would be much appreciated. :)

Event Timeline

JeanFred created this task.May 29 2019, 4:10 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptMay 29 2019, 4:10 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
LucasWerkmeister edited subscribers, added: LucasWerkmeister; removed: Lucas_Werkmeister_WMDE.
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.Jun 3 2019, 4:44 PM
AnneT claimed this task.Sep 11 2019, 6:16 PM

The fix here is relying on the default behavior of middle-clicks, which is to open links in a new tab. I've tested on a few browsers locally but it would be a good idea to check this more thoroughly on different devices during QA.

Everything works as far as I can tell (I don't have a 3-button mouse to test with), but it introduces some changes to design and behavior that we should make sure are desired.

Since this patch changes the markup of the autocomplete suggestion boxes to wrap everything in a link, there is a visual change (all text is now underlined inside):

Is this okay from a design/UX perspective? Since all the text inside the autocomplete box is now a link, as a user I'd expect that clicking would open a new window in a separate tab. But that's not what happens – instead, the "click" event is intercepted by the OOUI widget as a "choose" event. The user can right-click the text inside the box and select "open link in new tab" (I'm assuming the middle-click functionality is basically a shortcut for this), but that's a little more tricky and probably less likely to be used much.

One potential solution would be to keep the link in the markup, but to remove the link styling here – in theory this would allow users to still middle-click or right-click to open a new tab, but we'd otherwise give no indication that anything has changed (and potentially confusing users who are not using this feature).

Ramsey-WMF closed this task as Resolved.Oct 7 2019, 4:44 PM
Ramsey-WMF added a subscriber: Ramsey-WMF.

Tested on production! Works!