Page MenuHomePhabricator

Should links to the same site open in new tabs?
Open, Needs TriagePublic

Description

What if a reference contains a link to another page on the same wiki? The standard behavior for such links (when shown as part of the page, not in a popup) is to open in the same browser tab, and not open a new one. Only external links open in new tabs. The definition of "external" in MediaWiki core might be a little more complicated, but essentially it's "links to another domain".

As of now, all links in a ReferencePreview popup open a new tab. This might not be what users expect. This ticket here is to discuss this, and find a solution that fits the users expectations best.

Note this ticket here is not the same as T215419, but more generic. While we think T215419 is a bug, this here is more a matter of opinion.

Relevant code: https://phabricator.wikimedia.org/diffusion/EPOP/browse/master/src/ui/templates/referencePreview/referencePreview.js$61

Event Timeline

Restricted Application added a project: Design. · View Herald TranscriptNov 26 2019, 1:13 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Pols12 added a subscriber: Pols12.Jan 20 2020, 5:28 PM

Adding @alexhollender as the designer for Reference Previews.

@thiemowmde how we handle links seems to be a bit inconsistent (or difficult to define), see T190549 for context. Perhaps the best way to handle this is to follow what would happen if a link within the reference itself (not the reference preview) were clicked? In this case that would mean it would open in the same tab.

Other cases to possibly consider:

  • link to the same project in a different language (e.g. en.wiki > ar.wiki — not sure how often this occurs)
  • link to a different wiki project (e.g. wikipedia > wikisource — not sure how often this occurs)
  • link to an external, non-wiki site (currently opens a new tab)

Thanks a lot for the detailed response! Essentially, we definitely need to reduce the amount of new tabs that open. Good to hear we agree on that. We will continue discussing this within the WMDE-QWERTY-Team.