Commit Graph

255 Commits

Author SHA1 Message Date
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
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
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
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
Kelly Cochrane
43f88580f8 Bug 1956909 - Prevent expand on hover jumping animation after browser restart r=tabbrowser-reviewers,sidebar-reviewers,jsudiaman,nsharpley
Differential Revision: https://phabricator.services.mozilla.com/D244203
2025-04-03 10:09:14 +00:00
Jeremy Swinarton
b5d0e3b6a6 Bug 1953801: Update SessionStore cache immediately after creating a tab group. r=sthompson,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241634
2025-03-28 15:16:23 +00:00
Fred Chasen
f43d5bc2ba Bug 1953534 - Clean up Review Checker location change handlers. r=shopping-reviewers,kpatenio,tabbrowser-reviewers
Now that the ReviewChecker sidebar can auto-open and close, the logic for finding distinct navigations needs to be updated.
This allow us to detect the first time new products URLs are requested to shown in the sidebar and to check if a tab should auto-open the sidebar after it was closed.

- `isDistinctProductPageVisit` now works the same as it did in the ShoppingSidebar, indicating that there was a product navigation while a tab was in the background.
- `reviewCheckerWasClosed` now prevents the sidebar from re-opening on tab changes for a location it was closed on.
- `isSimulated` is set to false in the location change handlers on tab changes where there was an unhandled background product navigation.
- Moves the `isSameProduct` check to `ShoppingUtils` and use that to test previous URIs passed to `hasLocationChanged`.
- Manager will only handle product page specific parts of location changes when the sidebar is not open to handle them.

Differential Revision: https://phabricator.services.mozilla.com/D241446
2025-03-28 00:07:40 +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
Kelly Cochrane
6685a37131 Bug 1950419 - Prevent sidebar from collapsing when opening context menu if expand on hover is enabled r=tabbrowser-reviewers,sidebar-reviewers,jsudiaman
Differential Revision: https://phabricator.services.mozilla.com/D242740
2025-03-26 19:14:46 +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
Chris Shiohama
79000c00ff Bug 1945404 - Added focusUrlBar property to new tabs created with right click context menu. r=tabbrowser-reviewers,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D242855
2025-03-26 16:33:41 +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
Dão Gottwald
8b40ef8567 Bug 1956252 - Don't let #moveTabNextTo move unpinned tabs between pinned ones. r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242935
2025-03-25 15:45:37 +00:00
Cosmin Sabou
782522ac2f Backed out changeset bfb6d89e6bb9 (bug 1953801) for causing bc failures on browser_restore_container_tabs_oa. CLOSED TREE 2025-03-25 19:36:35 +02:00
Dão Gottwald
270b9d5781 Bug 1955276 - Consolidate moveTabTo checks. r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242338
2025-03-25 14:16:54 +00:00
Dão Gottwald
f9a2272451 Bug 1955361 - Make dropping a link insert the new tab at the correct drop index. r=jswinarton,dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242632
2025-03-25 14:05:34 +00:00
Jeremy Swinarton
39b35f9816 Bug 1953801: Update SessionStore cache immediately after creating a tab group. r=sthompson,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241634
2025-03-25 13:39:45 +00:00
DJ
4467bf52f4 Bug 1955388 - prevent pinned tabs from commingling with non-pinned tabs when there are hidden tabs present. r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242596
2025-03-24 18:22:30 +00:00
Dão Gottwald
e05dcb5003 Bug 1955391 - Make elementIndex throw on tabs that aren't visible. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242544
2025-03-21 20:27:57 +00:00
Florian Quèze
41442e60fd Bug 1950710 - Migrate histograms to use Glean APIs for FX_TAB_CLOSE_*, r=chutten,tabbrowser-reviewers,nsharpley.
Differential Revision: https://phabricator.services.mozilla.com/D242169
2025-03-21 15:32:40 +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
ddb726f7e6 Bug 1955621 - Make the tabGroups.enabled Nimbus feature variable use setPref instead of fallbackPref. r=jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D242546
2025-03-21 14:16:57 +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
Florian Quèze
4ec5f45bdb Bug 1950710 - Migrate histograms to use Glean APIs for FX_TAB_CLOSE_*, r=chutten,tabbrowser-reviewers,nsharpley.
Differential Revision: https://phabricator.services.mozilla.com/D242169
2025-03-20 20:14:04 +00: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
Gijs Kruitbosch
fcab2ecd6a Bug 1953575 - move gShareUtils to its own module, r=firefox-desktop-core-reviewers ,tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D241485
2025-03-20 15:54:31 +00:00
Dão Gottwald
3ba48b6655 Bug 1950904 - Use element index instead of tab index for the drop indicator. r=dwalker,jswinarton,tabbrowser-reviewers,perftest-reviewers,fbilt
Differential Revision: https://phabricator.services.mozilla.com/D239937
2025-03-19 15:07:53 +00:00
Greg Stoll
52693f9877 Bug 1926973 - make only explicitly unloaded tabs have a grayscale dimmed favicon r=desktop-theme-reviewers,tabbrowser-reviewers,dao,sessionstore-reviewers
This is what UX has decided makes sense, and will be much less disruptive
than dimming out all favicons on session restore. When we're ready the
default value of "browser.tabs.fadeOutExplicitlyUnloadedTabs" will be
true, and the default value of "browser.tabs.fadeOutUnloadedTabs" will
remain false.

Differential Revision: https://phabricator.services.mozilla.com/D241481
2025-03-15 00:30:28 +00:00
DJ
fb605dda4c Bug 1950611 - fix save and restore of groups when they trigger window closing. r=sthompson,jswinarton,sessionstore-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241490
2025-03-14 14:18:20 +00:00
Jeremy Swinarton
c828d955e5 Bug 1938397: Record active tab group metrics r=dao,tabbrowser-reviewers,sthompson
Differential Revision: https://phabricator.services.mozilla.com/D240196
2025-03-12 17:46:15 +00:00
Dão Gottwald
9754a011cf Bug 1908441 - Implement drag and drop of tab group into a new or other window. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241004
2025-03-12 11:29:36 +00:00
Alexandru Marc
e03b90be4c Backed out 4 changesets (bug 1953193, bug 1952495, bug 1953249, bug 1908441) for causing bc failures @ browser_bug495058.js CLOSED TREE
Backed out changeset 0ccf1105aa8c (bug 1953249)
Backed out changeset 2ccc75be9d26 (bug 1953193)
Backed out changeset 02b70f25b783 (bug 1952495)
Backed out changeset 46e2f887cea6 (bug 1908441)
2025-03-12 12:01:31 +02:00
Dão Gottwald
e53c0fb5e2 Bug 1908441 - Implement drag and drop of tab group into a new or other window. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241004
2025-03-12 08:19:40 +00:00
Goloman Adrian
168ed8ab47 Backed out 4 changesets (bug 1953193, bug 1908441, bug 1952495, bug 1953249) for causing bc failures @browser_tab_manager_drag.js. CLOSED TREE
Backed out changeset f8634c4fc742 (bug 1953249)
Backed out changeset 066cede5adcc (bug 1953193)
Backed out changeset 7afc87de4a01 (bug 1952495)
Backed out changeset 2ef344554c4c (bug 1908441)
2025-03-12 02:44:08 +02:00
Dão Gottwald
1642f3dfa4 Bug 1908441 - Implement drag and drop of tab group into a new or other window. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D241004
2025-03-11 21:39:05 +00:00
DJ
b4c31cf534 Bug 1950973 - batch process beforeUnload handlers when removing a tab group. r=dao,tabbrowser-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D240273
2025-03-11 18:55:05 +00:00
Dão Gottwald
148b80000f Bug 1952962 - Be less aggressive about scrolling the selected tab into view after dragging and dropping tabs. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D240997
2025-03-11 14:55:48 +00:00
Greg Stoll
c89735b508 Bug 1946432 - when unloading all tabs, don't switch to Firefox View if it's hidden r=tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D239778
2025-03-11 12:05:41 +00:00
Goloman Adrian
7f877be10f Backed out changeset edc7847f9776 (bug 1950973) for causing bc failures @browser_prompt_close_groups.js . 2025-03-07 05:08:36 +02:00
Dão Gottwald
f2fda56c21 Bug 1908439 - Drag and drop for moving a group within the window. r=dwalker,tabbrowser-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D239494
2025-03-07 01:58:05 +00:00
Goloman Adrian
e5e07cd91e Backed out changeset 58ef1accf6e7 (bug 1908439) for causing mochitest failures @test_tabbrowser.xhtml. CLOSED TREE 2025-03-07 02:42:12 +02:00
Dão Gottwald
0fb65f4185 Bug 1908439 - Drag and drop for moving a group within the window. r=dwalker,tabbrowser-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D239494
2025-03-06 22:20:21 +00:00
DJ
3526f7e308 Bug 1950973 - batch process beforeUnload handlers when removing a tab group. r=dao,tabbrowser-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D240273
2025-03-06 20:59:11 +00:00
Nick Grato
207d8697bf Bug 1949808 - Prevent smart tab topic output from replacing group label if user starts typing r=vazish,tabbrowser-reviewers,dao
adding additional check before populating input

Differential Revision: https://phabricator.services.mozilla.com/D240223
2025-03-06 15:38:51 +00:00
Butkovits Atila
76f1949306 Backed out changeset cd8f12bed08a (bug 1950973) for causing failures at test_restore_manually_with_tab_groups.py. CLOSED TREE 2025-03-06 18:05:15 +02:00
Butkovits Atila
b6264adeb4 Backed out changeset 79e3d8d9befa (bug 1949808) for causing failures at browser_tab_grouping_telemetry.js. CLOSED TREE 2025-03-06 13:53:35 +02:00
DJ
fb9b1427f2 Bug 1950973 - batch process beforeUnload handlers when removing a tab group. r=dao,tabbrowser-reviewers,sessionstore-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D240273
2025-03-06 11:25:20 +00:00
Nick Grato
be9d852d84 Bug 1949808 - Prevent smart tab topic output from replacing group label if user starts typing r=vazish,tabbrowser-reviewers,dao
adding additional check before populating input

Differential Revision: https://phabricator.services.mozilla.com/D240223
2025-03-06 10:30:44 +00:00
Eitan Isaacson
cf6484047a Bug 1898096 - Replace color settings with "contrast control". r=emilio,fluent-reviewers,settings-reviewers,accessibility-frontend-reviewers,morgan,bolsson,masayuki,mossop,pdfjs-reviewers,calixte
This patch changes the backing prefs by relying on the tristate offered
by browser.display.document_color_use instead of
browser.display.use_system_colors. This simplifies the color
decision tree, and offers a simplified UI.

The tristate preference offered to the user is as follows:
 1. "Use platform's contrast settings" (document_color_use=0)
 2. "Off" - never use HCM, regardless of platform setting (document_color_use=1)
 3. "On" - always use HCM, regardless of platform setting (document_color_use=2)

Option 3 also reveals a colors UI for the user to choose the palette the
browser HCM will use (bg/text/link/visited).

There are three color palettes to choose from in light of the preference
above they are:
 1. WIDGET_COLORS: The OS's configured colors used by its theme.
 2. HARDCODED_COLORS: Colors deemed as standard and are hard coded into
    Firefox (eg. white on black text, blue and purple links).
 3. PREFERENCE_COLORS: Colors that are stored in preferences and are
    configurable from the colors UI (eg. browser.visited_color and
    browser.display.background_color)

The decision over which palette to use is as follows:
 * If we are styling browser UI -> WIDGET_COLORS
 * else, if resist fingerprinting is enabled -> HARDCODED_COLORS
 * else, if document_color_use==0 AND OS HCM is on -> WIDGET_COLORS
 * else, if document_color_use==2 -> PREFERENCE_COLORS
 * else -> HARDCODED_COLORS

Differential Revision: https://phabricator.services.mozilla.com/D211115
2025-03-05 19:18:08 +00:00
Alexandru Marc
78ef84ae14 Backed out changeset f4d5303f5472 (bug 1898096) for causing ba failures @ browser_attributed_text.js 2025-03-05 03:27:02 +02:00