Firefox/Projects/Multiple Tab Selection/Design

From MozillaWiki
< Firefox‎ | Projects‎ | Multiple Tab Selection
Revision as of 22:14, 28 June 2010 by Fyan (talk | contribs) (Created page with ''''[DRAFT v.2]''' ''Frank Yan'' === Introduction === Firefox does not provide a method to select multiple tabs simultaneously. The primary obstacle to shipping this feature ha…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

[DRAFT v.2]

Frank Yan

Introduction

Firefox does not provide a method to select multiple tabs simultaneously. The primary obstacle to shipping this feature has been the difficulty of enumerating edge cases. An implementation of this feature is in progress and can be found at bug 566510. This design document seeks to provide examples of compelling use cases and to describe the intended behavior of this feature, covering all known edge cases as precisely and concisely as possible.

Motivation

It has been over a decade since tabs were introduced. Today, tabbed browsing has seen mainstream adoption, and having more than 20 or even 50 tabs open at once is a common occurrence. However, users rarely are working on that many separate tasks. Instead, tabs can be naturally grouped into their related tasks or categories.

Without an existing built-in tab grouping mechanism, using multiple windows is the currently preferred method of separating groups of tabs. (TabCandy aims to provide this functionality in a future Firefox release.)

Firefox 3.5 shipped with a "tab tearing" feature that enables users to detach a tab to a new window or drag individual tabs between windows. However, there are many cases in which a user may have already opened multiple tabs that the user wants to move to a different window. Currently, this requires one click-and-drag per tab. As specified in this document, multiple tab selection would achieve this result with at most n clicks and 1 drag motion. The common case of selecting and dragging a range of tabs can be completed in at most 2 clicks and 1 drag.

Design Document

Notes:

  • The "SELECTED tab" refers to the selected tab of a window that has its content displayed in the browser viewport. (To SELECT a tab is to set that tab as the SELECTED tab.)
  • A "selected tab" refers a tab to which a "multiple tab action" would be applied.
  • The SELECTED tab is, by default, selected and cannot be deselected.
  • When selected tabs are dragged between windows or detached, they maintain their relative position.
  • By default, the anchor tab is the SELECTED tab.
  • If the anchor tab is removed, the anchor tab is reset to the default.
  • There will no keyboard (non-mouse) shortcuts to handle multiple tab selection.
  • Tab duplication is only allowed when only one tab (the SELECTED tab) is selected.
    • It would be fantastic if we could remap tab duplication from ctrl+drag to alt+drag on Windows and Linux, solving both "mode within a mode" and cross-platform inconsistency problems, but the drag-and-drop code is deep down in C++, and it seems (to attempt) to adhere closely to the OS's mappings.

Tab mousedown:

  • SELECT tab
  • if this tab had been not already SELECTED: deselect all other tabs
  • set tab as anchor tab

Tab alt+mousedown (opt+mousedown on OS X):

  • SELECT tab
  • deselect all other tabs
  • set tab as anchor tab

Tab ctrl+mousedown (cmd+mousedown on OS X):

  • toggle selection of tab
  • set tab as anchor tab

Tab shift+mousedown:

  • deselect all tabs, then select all tabs from anchor tab to this tab

Tab shift+ctrl+mousedown (shift+cmd+mousedown on OS X):

  • if this tab is currently selected: deselect all tabs
  • otherwise: deselect all tabs: then select all tabs from anchor tab to this tab

SELECTED tab drag or selected tab shift/ctrl+drag (shift/cmd+drag on OS X):

  • if dropped in tab container: move selected tabs to that location in the tab container
  • if dropped in another window's tab container: move selected tabs to that window at that location in the tab container
  • if dropped downward to the viewport: detach selected tabs to new window; selected tabs will not be selected in new window
  • these actions maintain the SELECTED tab among the selected tabs
  • unmodified drags on non-SELECTED tabs will not work, because unmodified mousedown on a non-SELECTED tab SELECTS that tab already

Usage examples

  • Pre-condition: window 1 = 20 tabs.
  • Actions: click tab 11; shift+drag tab 20 downward.
  • Post-condition: tabs 11 - 20 detached to new window.
  • Pre-condition: window 1 = 20 tabs, tab 11 is selected.
  • Actions: shift+drag tab 20 downward.
  • Post-condition: tabs 11 - 20 detached to new window.
  • Pre-condition: window 1 = 10 tabs; window 2 = 10 tabs.
  • Actions: focus window 2; click tab 1; shift+drag tab 10 to window 1's tab bar.
  • Post-condition: all of window 2's tabs moved to window 1. window 2 closed.
  • Pre-condition: OS = Windows; window 1 = 5 tabs, tab 3 is selected; window 2 = 5 tabs.
  • Actions: focus window 1; ctrl+click tab 5 to window 2's tab bar.
  • Post-condition: tabs 3, 5 moved to window 2.
  • Pre-condition: OS = OS X; window 1 = 5 tabs, tab 3 is selected.
  • Actions: shift+click tab 5; cmd+click tab 1; drag tag 3 downward.
  • Post-condition: tabs 1, 3, 4, 5 detached to new window.
  • Pre-condition: OS = OS X; window 1 = 5 tabs, tab 3 is selected.
  • Actions: shift+click tab 5; cmd+click tab 1; shift+drag tab 2 downward.
  • Post-condition: tabs 1, 2, 3 detached to new window.