Page MenuHomePhorge

Internal resources should avoid to become external links, as default
Closed, ResolvedPublic

Description

For some reasons I see that most of the links open in an external tab, as default.

Steps to reproduce:

  • Visit these links:

Expected behavior:

  • Not all absolute links should open in a new tab - for example, links starting with "https://we.phorge.it/" are probably better to be opened in the same tab
  • Relative links are also probably better to be opened in the same tab

Also, see the Home of Phorge itself:

Welcome in Phorge

Welcome to Phorge: your opinionated Free/Libre and Open Source, community driven platform for collaborating, managing, organizing and reviewing software projects.

Useful Documents:

You see that most of the links open in a new tab as default. Why?

Having indiscriminate external links is not a best practice in the web. See this Task that has a more deep thought about this topic:

With that in mind, since I don't want to change things too much, I would start by changing the default, not for all the links, but only for links pointing to an internal destination:

This is a compromise, because there was probably a good reason for opening links in an external tab and it doesn't seem fair to me to just undo this for all the links.

This then still allows in the future to see how it goes, and, if you want, to possibly just put all the links as default to open in the same tab, unless there are strong usability issues already mentioned in T15172.

Truth table of the proposal (assuming that your local URL is https://we.phorge.it/):

https://duckduckgo.comChange Log#anchorhttps://we.phorge.it//config/
Before this changeexternalinternalinternalexternalexternal
After this changeexternalinternalinternalinternalinternal

Test on your local Phorge

This is just an example Remarkup that you can use to test the situation locally:

NOTE: Replace phorge.localhost with the domain of your Phorge.
== Links that should NOT open in an external tab as default ==

http://phorge.localhost/phriction/edit/3/

<http://phorge.localhost/#asd>

<http://phorge.localhost/phriction/edit/3/>

[[ http://phorge.localhost/phriction/edit/3/ | http://phorge.localhost/phriction/edit/3/ ]]

[[ /phriction/edit/3/ | /phriction/edit/3/ ]]

== Still internal links as default ==

[[ / ]]

[[ #asd | #asd ]]

== Still External Links as default ==

https://google.com/

https://google.com/#asd

<https://google.com/>

<https://google.com/#asd>

[[ https://google.com/| https://google.com/ ]]

[[ https://google.com/#asd| https://google.com/#asd ]]

Event Timeline

valerio.bozzolan renamed this task from Internal links should open in the same tab as default to Internal pages should open in the same tab as default.Mar 23 2023, 10:33
valerio.bozzolan claimed this task.
valerio.bozzolan triaged this task as Wishlist priority.

I agree with this, but I think we should let this wait for broader discussion - there maybe good counter-arguments.

In general, I think the rule should be "default to open in same tab", because it's a lot easier for the user to force new tab then it is to force same tab.
Exceptions are

  • cases where navigation can cause data-loss (forms)
  • links explicitly marked with a relevant icon
  • maybe external links, because there's sort of a norm for that on the internet at large, and it makes it more clear to the user that it's a different context, for some value of context.

I'm not a fan of adding an icon to any external link, because it makes reading less fluent (for my eyes at least, the icon breaks the text flow)

valerio.bozzolan renamed this task from Internal pages should open in the same tab as default to Internal resources should avoid to become external links, as default.Mar 25 2023, 11:11
valerio.bozzolan updated the task description. (Show Details)

I agree. Having said that I'm not bold enough to propose a "default: open in same tab" since at the moment we have the exact contrary. That is why I proposed this compromise based on the destination.

Premising I am trying to make few variations to the current behavior implemented by Evan

I think that D25118: Remarkup: make less internal links open in new tabs somehow reflects what most user (Evan included) probably want

In T15161#4416, @avivey wrote:

I agree with this, but I think we should let this wait for broader discussion - there maybe good counter-arguments.

I think nobody is interested :(

In general, I think the rule should be "default to open in same tab", because it's a lot easier for the user to force new tab then it is to force same tab.
Exceptions are

  • cases where navigation can cause data-loss (forms)
  • links explicitly marked with a relevant icon
  • maybe external links, because there's sort of a norm for that on the internet at large, and it makes it more clear to the user that it's a different context, for some value of context.

I totally agree but, at the moment, the user has not any option to mark a specific link as external :( The best I can propose is to improve the current default.

I'm not a fan of adding an icon to any external link, because it makes reading less fluent (for my eyes at least, the icon breaks the text flow)

Yeah I agree. Premising that some people may want to do that. So in D25118 we can also expose a CSS class that does nothing at the moment, but allowing web designers to easily do that in their Phorge.

I think the current revision is a good compromise. The current behavior makes no sense from the perspective of modern UX patterns:

  1. Most users of webpages know a link will open in the same tab.
  2. Assuming Phorge is your main software development tool, it makes sense to open external links in a new tab - there always shall be one open Phorge tab 😉

Since I can, thanks to that revision, at work I've put this additional CSS rule for extra nonsense scary climax.

.remarkup-link-ext::before {
    content: "[DANGER EXTERNAL] ";
    color: red;
}

The thing is, thanks to our Matomo, I can say that, surprisingly, in just one week, this kind of "don't click" thing increased the number of clicks by an interesting undisclosed factor. asd