Opening Links

This page discusses what happens when you tell Web to open a link, either by calling it in the command line or by clicking a link in an application. There are three main kinds of use-cases that we want to support:

  • People who always use windows
  • People who always use a single window as their main 'browsing' window, and expect links to be opened there
  • People who take advantage of locality and keep their related windows grouped in workspaces, not treating any window as 'the main window'

The past

In the past Web would always open a new window in the current workspace when given a link to open, regardless of the value of the new-windows-in-tabs setting.

Current behaviour

There is a setting new-windows-in-tabs. If the setting is false, Web will always open the link in a new window. If the setting is true, Web will always open the link in a new tab in the last active window - the window that last had focus, regardless of whether it is in the current workspace or not.

Proposed behaviour

The change in behaviour is only for the case where the new-windows-in-tabs setting is true. The window used for opening new tabs would change from the last focused one to the oldest window. A second preference would be added to indicate whether new windows should be used on workspaces that have no windows: open-always-in-current-workspace.

When that preference is set to false, Web will behave like this:

  • No windows will ever be created when Web is told to open a link, a new tab will be created in the oldest window

When that preference is set to true, Web will behave like this:

  • If one or more windows exist in the current workspace, a new tab will be created in the oldest window
  • If no windows exist in the current workspace, a new window will be created for the link

Possible heuristics

Proposed behaviour talks about using the oldest window, but there might be other ways of deciding on which window is should be treated as the main one:

  • The window that's been around the longest
  • Window which is focused the longest
  • Window with most tabs

Design/Apps/Web/OpeningLinks (last edited 2016-03-24 17:54:16 by AllanDay)