Page MenuHomePhabricator

Make EntityView UI aware of redirects
Closed, ResolvedPublic

Description

Redirects should be marked as such in the EntityView. Broken redirects must also be considered.

We may also want a "resolve redirect" button, though the implementation of that button would have to be quite different for the main snak, qualifiers, and references.

The UI should be consistent about whether we load labels from the redirect target, or not (currently, the label vanishes when leaving edit mode).

We also need to decide whether the entity selector should allow redirects to be entered, and if yes, how they could be marked in the autocompletion list.

Patch-For-Review:

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:33 AM
bzimport set Reference to bz68567.
bzimport added a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher subscribed.

Design question: How do we indicate an item link is going to a redirect?
Should it be shown for everyone? Or just have a css class that people can style as they wish? I think that is how it is done on Wikipedia. We need to check.

@Lydia_Pintscher, yes, in Wikipedia it's <a href="..." title="..." class="mw-redirect"> with no visual difference to direct links. Most users don't know it's a redirect from looking at it, but they can tell from the "redirected from" sub-title shown on the target page. We should try to do the same, if possible.

Ok thanks. Then we should follow that.

Change 379545 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/Wikibase@master] Add CSS class to item redirects in UI

https://gerrit.wikimedia.org/r/379545

Change 379703 had a related patch set uploaded (by Thiemo Mättig (WMDE); owner: Thiemo Mättig (WMDE)):
[mediawiki/extensions/Wikibase@master] Reduce duplicate code in EntityIdHtmlLinkFormatter

https://gerrit.wikimedia.org/r/379703

Change 379545 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add CSS class to item redirects in UI

https://gerrit.wikimedia.org/r/379545

I'm afraid the acceptance criteria of this ticket are not clear. @daniel mentioned so many things in the task description. To me this even sounds like it's talking about three or four different tickets. @daniel, can you please specify the description and make the acceptance criteria much more obvious? Thanks a lot.

One possible set of acceptance criteria I can see is:

  • Add the mw-redirect CSS class to links that point to redirects. This is what the two current patches do.
  • Make the tooltip consistent to what core does.

@matej_suchanek, feel free to jump in and tell us what you think. :-)

@matej_suchanek, feel free to jump in and tell us what you think. :-)

Ok, gladly.

We may also want a "resolve redirect" button, though the implementation of that button would have to be quite different for the main snak, qualifiers, and references.

Something for Wikidata-Gadgets maybe?

We also need to decide whether the entity selector should allow redirects to be entered, and if yes, how they could be marked in the autocompletion list.

On Wikipedia, you may want to link to a redirect when it's a placeholder for topic that is close to the linked one. However, redirects on Wikidata are created when the topics are same (. So the only reason for linking to a redirect is that it's incorrect and should be undone.

Button to resolve the redirect: only as a gadget
Allowing linking to redirects: No there should be no reason to do that

Change 379703 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Reduce duplicate code in EntityIdHtmlLinkFormatter

https://gerrit.wikimedia.org/r/379703