Commit Graph

326 Commits

Author SHA1 Message Date
Stephen Thompson
36e1885b72 Bug 1951859 Part 3 - add tab group name to tab tooltips/a11y description r=dwalker,tabbrowser-reviewers,fluent-reviewers,bolsson
For the first and last tab in a tab group, include the tab group's name in the accessibility description read by screen readers when the tab is in focus. As keyboard users go through the tab strip, the users will receive clues that they are passing into/out of a tab group.

This also reformats the tab tooltips in general.

Before:
```
$title $pid $active - $containerName
$audioPlaying
```
After:
```
$title
$pid $active
$tabGroupName - $containerName
$audioPlaying
```
For each portion of the tab tooltip string, parts of the string might not appear due to configuration (PIDs and active only shown with pref) or user state (container name only shown for a container tab, etc.) or UX choices (don't include the title in the accessibility description because screen readers already read out a tab's title by default)

Differential Revision: https://phabricator.services.mozilla.com/D245186
2025-04-23 17:49:15 +00:00
Stephen Thompson
eacb38eda0 Bug 1961159 - only refresh TabsList DOM when it is open r=dwalker,tabbrowser-reviewers
If a DOM rebuild was scheduled on a previous frame but the rebuild is no longer needed (e.g. due to the "list all tabs" menu no longer being open) then do not clean up nor populate the DOM.

In bug 1953533 we debounced and delayed full DOM rebuilds of the "list all tabs" menu due to severe performance impacts during event-heavy operations like restoring an entire browser session.

When the "list all tabs" menu is closed, it's supposed to get emptied and stop responding to events. However, it was possible to perform actions in the "list all tabs" menu that would trigger events and close the menu at the same time. The triggered event would schedule a "list all tabs" menu rebuild on the next frame, which would then build the "list all tabs" menu DOM despite the menu being closed. When the menu was reopened, the menu builds the menu DOM by inserting new DOM elements, but since the menu was already built, you end up with a doubled version of the tab strip.

Differential Revision: https://phabricator.services.mozilla.com/D246047
2025-04-23 17:45:16 +00:00
Jeremy Swinarton
39096a611c Bug 1960360: Tab interaction metrics for dragging tabs out of groups r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245749
2025-04-17 16:29:29 +00:00
Jeremy Swinarton
4a0e2c38cc Bug 1938405: Tab interaction metrics for tab groups r=dao,sthompson,tabbrowser-reviewers
This patch adds the most basic tab interaction metrics for tab groups.
As discussed in standup, we agreed to move the `remove_` class of
metrics into its own bug due to extra complexity involved in correctly
capturing these events.

One other thing we discussed was what the scope of events should be for
the `close_` class of events, i.e. should we *only* capture an event
when someone clicks the "X" button or closes from the TOM menu, or
should we also account for things like context menus, keyboard
shortcuts, etc.? Originally we agreed to capture _all_ tab close events
and mark any source that was not one of the above mentioned two as
unknown. However, after thinking about this more, I don't believe this
is the right approach. There are many places in the codebase where a tab
is closed but not because a user deliberately did it (e.g. when moving a
tab to a new window — this is actually done by creating a new tab in a
new window and closing the old). We currently don't distinguish between
user-initiated close actions, so it would take some time to find all
these places and exclude them.

I favour an explicit inclusion approach (which is what we are doing
elsewhere). In this patch I added events for:
  - closing a tab from the "X" close button (`close_tabstrip`)
  - closing a tab from the tab context menu (`close_tabstrip`)
  - closing a tab from the TOM (`close_tabmenu`)

There are other places that could potentially be
addressed, so I suggest moving these to a follow-up bug and addressing
them for 139.

Differential Revision: https://phabricator.services.mozilla.com/D244915
2025-04-16 15:01:28 +00:00
Cosmin Sabou
2d6874fa8c Backed out changeset d3742b523ca9 (bug 1956381) for not working. 2025-04-16 04:46:25 +03:00
Stephen Thompson
a69b839b0d Bug 1951859 Part 2 - set ARIA posinset/setsize on tabs in tab groups r=jswinarton,tabbrowser-reviewers
Set aria-setsize on grouped tabs to the number of tabs in the tab group. Set aria-posinset on grouped tabs to the 1-based index of the tab within the tab group. This allows some a11y tools to report to the user that a tab is, for example, tab "2 of 7" in a tab group.

The tab strip uses the `tablist` ARIA role. The ARIA spec and Firefox's a11y engine both forbid nesting `group` ARIA roles inside of `tablist`. As a result, a11y tools always read individual tabs as being tab "X of Y", where Y is the number of tabs in the tab strip and X is the index of the tab in the tab strip. This is good information, but it does not give the user a sense of where a tab is within a tab group.

Differential Revision: https://phabricator.services.mozilla.com/D245185
2025-04-15 19:49:58 +00:00
Stephen Thompson
a428585296 Bug 1951859 Part 1 - set aria-level on tabs r=jswinarton,tabbrowser-reviewers
Tabs outside of tab groups are at the top level (level 1) while tabs inside of tab groups are at the next lower level (level 2). This helps unsighted users get a better sense about the hierarchy of the tab strip.

Differential Revision: https://phabricator.services.mozilla.com/D245184
2025-04-15 19:25:18 +00:00
Vasish Baungally
ef0b50f888 Bug 1960683 - Prevent event from being sent for Smart Tab Grouping if not opted-in. r=tabbrowser-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D245601
2025-04-15 16:52:05 +00:00
DJ
5aee67aeb3 Bug 1956381 - fix window leak in browser_tab_groups_telemetry.js. r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245432
2025-04-15 14:26:07 +00:00
Cristian Tuns
064788b440 Backed out changeset 09282b03f0cf (bug 1951859) for causing eslint failures CLOSED TREE 2025-04-15 10:19:02 -04:00
Stephen Thompson
bfd5fbb4d0 Bug 1951859 Part 1 - set aria-level on tabs r=jswinarton,tabbrowser-reviewers
Tabs outside of tab groups are at the top level (level 1) while tabs inside of tab groups are at the next lower level (level 2). This helps unsighted users get a better sense about the hierarchy of the tab strip.

Differential Revision: https://phabricator.services.mozilla.com/D245184
2025-04-15 14:03:09 +00:00
Butkovits Atila
710980cfd1 Bug 1934436 - disable browser_bfcache_exemption_about_pages.js for frequent Linux Debug failures. r=intermittent-reviewers,tabbrowser-reviewers,mak,jmaher DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D245345
2025-04-14 21:12:25 +00:00
Stephen Thompson
8551cfa4aa Bug 1938398 - add saved tab group metrics r=jswinarton,sessionstore-reviewers,tabbrowser-reviewers
- record number of saved tab groups
- record min/max/median/average number of tabs in saved tab groups

This patch adds a new observable topic `sessionstore-saved-tab-groups-changed` to SessionStore. This is emitted when a saved tab group is added or removed from the session. BrowserUsageTelemetry subscribes to that topic and updates saved tab group-related metrics.

BrowserUsageTelemetry is also setting those saved tab group-related metrics on startup. BrowserGlue initializes BrowserUsageTelemetry after the session has been restored/set up, so saved tab group information will be available at that time. This is also important to make sure that we keep this metric correct even if a user doesn't touch their saved tab groups during the course of a session.

Differential Revision: https://phabricator.services.mozilla.com/D245138
2025-04-14 16:01:39 +00:00
Dão Gottwald
157f63d52d Bug 1960296 - Account for moz-button in addition to toolbarbutton when handling the Enter key. r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245392
2025-04-14 16:00:57 +00:00
DJ
a148a1cdd9 Bug 1948702 - when grouping a tab via the context menu, select it. r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245323
2025-04-14 14:54:09 +00:00
Dão Gottwald
a07bd270a0 Bug 1953179 - Fix enter key handling on toolbarbuttons in tab group menu. r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245220
2025-04-13 10:34:15 +00:00
Cristina Horotan
58439062ed Backed out changeset fa742bc59c5c (bug 1953179) for causing perma bc failures at browser_tab_groups.js. CLOSED TREE 2025-04-12 06:00:55 +03:00
DJ
8d4e1072b5 Bug 1959981 - ensure scotchBonnet is enabled for tabgroup telemetry tests. r=tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D245281
2025-04-11 19:46:35 +00:00
Dão Gottwald
d07c1829fd Bug 1959730 - Dispatch TabMove events when moving a group within the tab strip. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245218
2025-04-11 15:18:48 +00:00
Dão Gottwald
f33d1d2b0c Bug 1953179 - Fix enter key handling on toolbarbuttons in tab group menu. r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D245220
2025-04-11 15:02:06 +00:00
Stephen Thompson
f2e07044ae Bug 1938424 - metrics event when tabs added to tab group r=dao,jswinarton,tabbrowser-reviewers,extension-reviewers,robwu
When using the tab context menu or drag-dropping tabs to put them into a group, record a metric for the number of tabs added to the group.

Data Science asked us to launch with this metric disabled so that they could control it using server knobs. They expect a high volume of events, so they expect to only enable this metric for some proportion of users.

I converted the existing `TabMove` event derived from `UIEvent` being fired when tabs change their tab index in the tab strip. `UIEvent` doesn't allow for attaching additional context/detail to the event. `TabMove` is now a `CustomEvent` that provides more context about the moved tab and it fires in more cases -- it's possible for the tab index not to change despite the tab having "moved" into/out of a tab group.

This approach would not capture tab movements that occur across multiple frames/event loop iterations.

Differential Revision: https://phabricator.services.mozilla.com/D244616
2025-04-11 13:52:22 +00:00
DJ
91384c4388 Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-10 17:35:20 +00:00
Butkovits Atila
b9dc6231d7 Backed out changeset 4711e76ce475 (bug 1938425) for causing failures at browser_tab_groups_telemetry.js. CLOSED TREE 2025-04-10 09:35:44 +03:00
DJ
cdc29e0d0d Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-10 03:02:30 +00:00
Jeremy Swinarton
72de1640b1 Bug 1959438: Prevent tab from entering tab group label DOM element on tab insert r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D244931
2025-04-10 02:51:29 +00:00
Cristina Horotan
2d08511dac Backed out changeset 7fed35bbd242 (bug 1938425) for causing bc failures at browser_tab_groups_telemetry.js. CLOSED TREE 2025-04-09 13:06:03 +03:00
DJ
e9f93720b5 Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-09 03:07:19 +00:00
Vasish Baungally
94728b2e9c Bug 1958907 - Improve AI tab groups suggest precision. r=rrando,dwalker,tabbrowser-reviewers
Improvements:
1) Preprocess text to remove domain information. This makes similarity check more robust.
2) Optimize for F1, which means increasing threshold and reducing depth parameter

Differential Revision: https://phabricator.services.mozilla.com/D244631
2025-04-08 22:11:32 +00:00
Jeremy Swinarton
6483fac085 Bug 1957723: tabs.create() extensions API correctly adds tabs to groups r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D244613
2025-04-08 15:08:12 +00:00
smolnar
8c01d285cf Backed out changeset 1c700c5b8a89 (bug 1938425) for causing bc failures @ browser_tab_groups_telemetry.js CLOSED TREE 2025-04-07 19:45:55 +03:00
DJ
b8f461ce7f Bug 1938425 - add telemetry for reopening saved groups. r=dao,sessionstore-reviewers,tabbrowser-reviewers,urlbar-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D243737
2025-04-07 14:51:17 +00:00
Stephen Thompson
895511dc6f Bug 1938430 - add delete tab group event r=jswinarton,tabbrowser-reviewers,sessionstore-reviewers
Record when users delete an open group from the tab group context menu or delete an open group from a context menu in the all-tabs menu.

This will not record when users close a window or close all of the individual tabs in a tab group, even though those cases have the logical side effect of deleting a tab group.

Differential Revision: https://phabricator.services.mozilla.com/D241884
2025-04-03 14:12:43 +00:00
Vasish Baungally
94d887776e Bug 1953399 - Exclude Firefox View from Smart Tab Suggestions. r=rrando,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D243870
2025-04-02 21:05:26 +00:00
Stephen Thompson
a63b3f8766 Bug 1938697 - fix browser_tab_manager_group issues r=jswinarton,tabbrowser-reviewers
- TabsList has been removing toolbarbuttons (not their parent toolbaritems) and also removing .all-tabs-group-button elements created by GroupsList. Making sure that TabsList only clears group-related toolbaritems in its own menu view
- do some additional waiting/all tabs menu refreshing in the browser_tab_manager_groups tests to make results more consistent

Differential Revision: https://phabricator.services.mozilla.com/D243822
2025-04-02 13:55:59 +00:00
Vasish Baungally
7a6a4ff8f9 Bug 1957097 - Add telemetry for empty suggestion from ML topic model. r=rrando,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D243465
2025-04-01 20:35:12 +00:00
Emily McMinn
31c83f3c1e Bug 1950468 - Add "tabGroupCollapsed" trigger to messaging system and update schema entries r=omc-reviewers,aminomancer,tabbrowser-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D241304
2025-04-01 15:44:11 +00:00
Jeremy Swinarton
34d9e59418 Bug 1938426: Record telemetry event when saving a tab group r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242984
2025-03-27 15:29:19 +00:00
Cosmin Sabou
ced1f3c105 Backed out changeset 68d101b370d8 (bug 1938430) for permafailures on browser_tab_manager_groups.js (Bug 1938697). 2025-03-27 00:21:30 +02:00
Vasish Baungally
2e7c7849b7 Bug 1956073 - Add Opt-in & additional telemetry for Smart Tab Grouping r=rrando,dwalker,tabbrowser-reviewers
- Telemetry for opt-in
     - For each onboarding step
- Telemetry updates for existing
     - Clicking away with ML group name without explicitly clicking "done" or "cancel"
     - When there are no suggestions for "suggest other tabs"
     - Add group id to ml telemetry
     - Move stg telemetry under tab group telemetry
     - Remove num_ from events

Differential Revision: https://phabricator.services.mozilla.com/D242784
2025-03-26 15:41:49 +00:00
Stephen Thompson
78282be03c Bug 1938430 - add delete tab group event r=jswinarton,tabbrowser-reviewers,sessionstore-reviewers
Record when users delete an open group from the tab group context menu or delete an open group from a context menu in the all-tabs menu.

This will not record when users close a window or close all of the individual tabs in a tab group, even though those cases have the logical side effect of deleting a tab group.

Differential Revision: https://phabricator.services.mozilla.com/D241884
2025-03-25 21:16:37 +00:00
Chris Shiohama
a51c127c17 Bug 1953971 - Calls to BrowserTestUtils.addTab in the Tabbed Browser component do not need to be awaited. r=scunnane
Differential Revision: https://phabricator.services.mozilla.com/D241843
2025-03-21 17:00:11 +00:00
Nick Grato
a637f54059 Bug 1951524 - Opt-in UI with Progress bar for Smart Tab groups r=rrando,fluent-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,bolsson,dwalker,hjones
adding the optin flow and progress bar

Differential Revision: https://phabricator.services.mozilla.com/D241864
2025-03-21 16:03:03 +00:00
Florian Quèze
1c4eb07f93 Bug 1950710 - Migrate histograms to use Glean APIs for FX_TAB_SWITCH_*, r=chutten,tabbrowser-reviewers,mconley.
Differential Revision: https://phabricator.services.mozilla.com/D242167
2025-03-21 15:32:40 +00:00
Dão Gottwald
5b7b89286d Bug 1954865 - Fix closing the last unpinned tab via mouse. r=jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242292
2025-03-21 12:46:03 +00:00
Butkovits Atila
a1232f30d3 Backed out changeset e2836c2d1f98 (bug 1951524) for causing failures at browser_all_files_referenced.js. 2025-03-21 08:37:42 +02:00
Nick Grato
2a66d14721 Bug 1951524 - Opt-in UI with Progress bar for Smart Tab groups r=rrando,fluent-reviewers,desktop-theme-reviewers,tabbrowser-reviewers,bolsson,dwalker,hjones
adding the optin flow and progress bar

Differential Revision: https://phabricator.services.mozilla.com/D241864
2025-03-21 03:23:11 +00:00
Stanca Serban
7df2c7072f Backed out 5 changesets (bug 1950710) for causing timeout related failures. CLOSED TREE
Backed out changeset 7a1f8fe65c63 (bug 1950710)
Backed out changeset d2514bee519f (bug 1950710)
Backed out changeset c5f6cd03c1d4 (bug 1950710)
Backed out changeset 9e57a5c12317 (bug 1950710)
Backed out changeset 482b8c741722 (bug 1950710)
2025-03-21 06:29:53 +02:00
Stanca Serban
dfcc675d76 Backed out changeset c0e6b3896ea0 (bug 1954865) for causing mochitests failures in browser_standalonePinnedTab.js. 2025-03-21 06:18:11 +02:00
Florian Quèze
3a92537eb9 Bug 1950710 - Migrate histograms to use Glean APIs for FX_TAB_SWITCH_*, r=chutten,tabbrowser-reviewers,mconley.
Differential Revision: https://phabricator.services.mozilla.com/D242167
2025-03-20 20:14:03 +00:00
Dão Gottwald
ba53c891e3 Bug 1954865 - Fix closing the last unpinned tab via mouse. r=jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242292
2025-03-20 17:46:50 +00:00