Open Bug 2076116 Opened 9 days ago Updated 8 days ago

"Add Tab to Group" submenu in Firefox View

Categories

(Firefox :: Firefox View, enhancement)

Firefox 156
enhancement

Tracking

()

ASSIGNED

People

(Reporter: stlman, Assigned: vickymnit)

Details

Attachments

(3 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:140.0) Gecko/20100101 Firefox/140.0

Steps to reproduce

I opened Firefox View → Open tabs. I clicked the "…" (three dots) menu of a tab.

Actual results

The menu that had popped-up didn't comprise "Add Tab to Group" (nor "Add Tab to New Group") option.

Expected results

It should be possible to add/remove tabs to/from groups from Firefox View is a more convenient way of managing tabs than the tab bar (horizontal or vertical)

I have a patch for this enhancement, so I would like you to assign this to me. You can move this to Firefox::FirefoxView.

The tab context menu and the all tabs panel each decide which groups a tab
can be moved to, and each build the chicklet colour variables themselves.
The pre-Nova chicklet colours also live inside tabs.css, which only the
browser window loads.

Move the policy and the actions into TabGroupMenu.sys.mjs, and the colours
into tab-group-colors.css, so both surfaces share one implementation and a
third surface can reuse it instead of adding a third copy.

No behaviour change.

Co-authored-by: Cursor <cursoragent@cursor.com>

Assignee: nobody → vickymnit
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

The open tabs menu can now add a tab to a new group, add it to an existing
open or closed group, and remove it from its group, matching what the tab
strip offers.

Closed groups are listed in the same submenu rather than a nested one,
because a panel-list nested two levels deep resolves its owning panel to the
outermost list.

Co-authored-by: Cursor <cursoragent@cursor.com>

Component: Untriaged → Firefox View

I've put up patches for this:

D329691 - Share the tab group menu policy, actions and colors
D329692 - Add tab group actions to the Firefox View open tabs menu

The open tabs menu in Firefox View now offers the same group actions as the
tab strip: add a tab to a new group, add it to an existing open or closed
group, and remove it from its group.

The first patch is a refactor with no behaviour change. The tab context menu
and the all tabs panel each decided separately which groups a tab could move
to, and each built the tab group chicklet colour variables themselves. Both
now share TabGroupMenu.sys.mjs, and the pre-Nova chicklet colours move from
tabs.css into tab-group-colors.css so a page that doesn't load tabs.css can
use them. The second patch adds the Firefox View menu items on top of that.

Two things worth calling out for review:

  • Closed groups are listed inside the same submenu, under a separator and a
    disabled heading, rather than in a nested submenu the way the tab strip
    does it. A panel-list nested two levels deep resolves its owning panel to
    the outermost list, so a second submenu level isn't reliable here.

  • With browser.nova.enabled, Firefox View previously drew the gray chicklet
    in a different colour from the tab strip. Sharing the colours fixes that,
    so gray shifts slightly in Firefox View. It's the only intentional visual
    change.

I've built locally on Linux and run the following, all green:

browser_opentabs_firefoxview.js 162 passed, 0 failed
browser_tab_groups_tabContextMenu.js 179 passed, 0 failed
browser_tab_groups.js 190 passed, 0 failed
browser_tab_groups_telemetry.js 91 passed, 0 failed
browser_tab_manager_groups.js 77 passed, 0 failed
browser_tab_group_menu.js 62 passed, 0 failed

browser_opentabs_firefoxview.js covers the new menu items, including the
case where browser.tabs.groups.enabled is off. I also verified the first
patch builds and passes the tab strip suites on its own, so the stack is
bisectable.

I don't have Try access yet, so I'd appreciate it if a reviewer could push
this to Try.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: