Commit Graph

191 Commits

Author SHA1 Message Date
Jeremy Swinarton
62d713d116 Bug 1908422: Add closedGroups to SessionRestore for tab groups r=dao,sthompson,sessionstore-reviewers,tabbrowser-reviewers
This patch adds a `closedGroups` array to the SessionRestore state, and
adds functionality that ensures closed tab groups end up in the closed
groups array and that closed tab counts respect closed groups.

This does not update `undoClosedTab` or any related methods. Attempting
to restore a closed tab group will result in an error.

Differential Revision: https://phabricator.services.mozilla.com/D226397
2024-11-08 13:53:19 +00:00
Stephen Thompson
1af22827e1 Bug 1926354 - only allow drag-drop tab group creation on ungrouped tabs r=dao,tabbrowser-reviewers
Currently, we provide a visual indicator + functionality to create a new tab group by dropping any tab onto any other tab. We think users will generally only use this to create new tab groups between standalone tabs; users are probably more likely to be making a mistake if they end up creating a new tab group by dropping a tab onto another tab that's already in a tab group. In order to prevent that, this patch just turns off the ability to create a new tab group by dropping onto any grouped tab.

Differential Revision: https://phabricator.services.mozilla.com/D228381
2024-11-08 10:13:33 +00:00
Stephen Thompson
de5857f96b Bug 1927910 - limit color changes when dragging to create tab groups r=dao,tabbrowser-reviewers
When all 9 tab group colors are in use, drag-drop code picks a random tab group color to highlight the tab drop target if the drop will create a tab group. The random pick is executed once per dragover event, so the color appears to change a few times a second. Kinda cool but distracting.

This patch chooses the next new tab group color on dragstart, saves that color on the drag data, and uses that color for all of the presentation + logic for creating a new tab group from a drop. The color will still be random when there are many tab groups, but the color will stay the same throughout a single drag operation.

Differential Revision: https://phabricator.services.mozilla.com/D228386
2024-11-08 10:04:07 +00:00
Stephen Thompson
120dd5317f Bug 1922268: inserting tabs behaves with adjacent tab groups r=dao,tabbrowser-reviewers
Fixes a number of edge cases where tabs created/inserted in the tab strip were incorrectly being placed inside of an adjacent tab group or incorrectly being placed outside of the intended tab group

Differential Revision: https://phabricator.services.mozilla.com/D226705
2024-11-05 17:57:09 +00:00
Stephen Thompson
8e4dfe1e0e Bug 1921814 - add keyboard focus for tab group labels r=dao,dwalker,desktop-theme-reviewers,tabbrowser-reviewers
This patch makes tab group labels "focusable" using the keyboard when the tab strip contains both tabs and tab groups.

Differential Revision: https://phabricator.services.mozilla.com/D226154
2024-11-05 16:52:19 +00:00
DJ
3b0844e1e4 Bug 1922276 - addTabGroup: add showCreateUI option and don't show post-create UI by default. r=dao,jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226957
2024-11-05 15:59:01 +00:00
Florian Quèze
72e00a824e Bug 1927093 - Migrate scalars to use Glean APIs for browser.engagement.* (excluding browser.engagement.navigation.*), r=chutten,sessionstore-reviewers,tabbrowser-reviewers,places-reviewers,sfoster.
Differential Revision: https://phabricator.services.mozilla.com/D226371
2024-11-05 13:22:58 +00:00
Norisz Fay
a327d3221e Backed out changeset 9515be9963ea (bug 1927094) for causing bc failures on browser_hide_sidebar_on_popup.js CLOSED TREE 2024-11-05 13:53:00 +02:00
Gijs Kruitbosch
ea7dda1742 Bug 1927094 - optimize lineScrollAmount so it doesn't iterate over all tabs, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D226907
2024-11-05 10:03:35 +00:00
Iulian Moraru
ba826d51af Backed out changeset 068e6a4704bf (bug 1922276) for causing bc failures on browser_tab_groups.js. 2024-11-05 01:45:16 +02:00
DJ
0de1e8d91b Bug 1922276 - addTabGroup: add showCreateUI option and don't show post-create UI by default. r=dao,jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226957
2024-11-04 16:31:09 +00:00
Dão Gottwald
be20b43235 Bug 1925312 - Fix typo. r=tabbrowser-reviewers,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D227807
2024-11-04 15:29:55 +00:00
Greg Stoll
e8e176f8e8 Bug 1926055 part 1 - add "Unload Tab" to context menu r=tabbrowser-reviewers,fluent-reviewers,dao,bolsson
Also make sure to select another tab if unloading the currently selected
tab (or Firefox View if unloading all tabs in the window) and handle
multiselect.

Differential Revision: https://phabricator.services.mozilla.com/D226346
2024-11-04 12:20:08 +00:00
Butkovits Atila
3609354615 Backed out changeset 5c7de47bcacb (bug 1927094) for causing Bug 1928689. a=backout 2024-11-01 18:11:08 +02:00
DJ
181219c0f1 Bug 1923651 - implement "move group to new window" in tabgroup edit menu. r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226325
2024-10-31 15:01:07 +00:00
Gijs Kruitbosch
785b95b32e Bug 1927094 - optimize lineScrollAmount so it doesn't iterate over all tabs, r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D226907
2024-10-31 10:55:30 +00:00
DJ
079c3f85da Bug 1926293 - handle moving tabs into groups across windows. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226729
2024-10-28 14:15:58 +00:00
Sam Foster
95be994d16 Bug 1922307 - Adjust the height of the auto-hiding menu toolbar when the tabstrip is hidden. r=desktop-theme-reviewers,dao,tabbrowser-reviewers,urlbar-reviewers
* Set the 'tabs-hidden' attribute on the #navigator-toolbox instead of the #nav-bar
* Add a --urlbar-padding-block variable for the padding around the urlbar

Differential Revision: https://phabricator.services.mozilla.com/D226568
2024-10-24 22:54:23 +00:00
Gijs Kruitbosch
edbf38b3fa Bug 1924534 - make scrolledtostart work for vertical tabs by relying on pinned instead of _pinnedUnscrollable, r=dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226756
2024-10-24 16:20:27 +00:00
Gijs Kruitbosch
f479b0afd6 Bug 1926834 - put pid pref getter on tabbrowser and use from both tab hover previews and tabbrowser itself, r=tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D226767
2024-10-24 15:25:36 +00:00
Dão Gottwald
a255af1381 Bug 1926582 - Rename things related to moving multiselected tabs together to avoid confusion with tab groups. r=dwalker,jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226640
2024-10-24 14:12:27 +00:00
Florian Quèze
fc2b365faf Bug 1923028 - Migrate scalars to use Glean APIs for browser.ui.interaction.* probes outside of BrowserUsageTelemetry.sys.mjs, r=chutten,mconley.
Differential Revision: https://phabricator.services.mozilla.com/D226514
2024-10-24 10:52:57 +00:00
Brian Grinstead
f6bb34aa25 Bug 1925724 - Use page wireframe for tab hover preview as a fallback when a normal thumnail is not available;r=mconley,sessionstore-reviewers,tabbrowser-reviewers,farre
This will only work when the pref is enabled (browser.history.collectWireframes), and is being landed primarily
to allow some expanded testing to see if it's worth cleaning this up further and turning it on.

Differential Revision: https://phabricator.services.mozilla.com/D226080
2024-10-24 03:34:40 +00:00
Stanca Serban
33720e7c62 Backed out 2 changesets (bug 1926582, bug 1926394) for causing mochitests failures in browser_preserveTabPipIconOverlay.js. CLOSED TREE
Backed out changeset 851d64f4461e (bug 1926582)
Backed out changeset 79c92abcd174 (bug 1926394)
2024-10-23 19:41:00 +03:00
Dão Gottwald
229b55fa59 Bug 1926582 - Rename things related to moving multiselected tabs together to avoid confusion with tab groups. r=dwalker,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226640
2024-10-23 14:26:43 +00:00
Dão Gottwald
4be8b6fec6 Bug 1926359 - Add tab group line to dragged tabs when dragging into a group. r=dwalker,tabbrowser-reviewers
Ideally the line should cover the whole group, but I don't know that we can do this given our use of display:contents. If someone has ideas we can file a followup on that. As it stands the line will extend under dragged tabs themselves, but left or right from those there can be gaps in the line.

Differential Revision: https://phabricator.services.mozilla.com/D226634
2024-10-23 14:21:34 +00:00
Tooru Fujisawa
c12ea81355 Bug 1923593 - Ignore the active tab when handling drag and drop for the tab list. r=mak,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D225723
2024-10-23 07:24:39 +00:00
Dão Gottwald
387c997901 Bug 1926248 - Opening the tab group create or edit panel should focus the name field, and Enter should close the panel. r=sthompson,jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226455
2024-10-22 15:50:24 +00:00
Sandor Molnar
d6591f5235 Backed out 2 changesets (bug 1926055) for causing bc failures @ browser_multiselect_tabs_unload_with_beforeunload.js CLOSED TREE
Backed out changeset 85a555f31920 (bug 1926055)
Backed out changeset db41b497b1be (bug 1926055)
2024-10-22 06:14:17 +03:00
Greg Stoll
ec2f8cd479 Bug 1926055 part 1 - add "Unload Tab" to context menu r=tabbrowser-reviewers,fluent-reviewers,dao,bolsson
Also make sure to select another tab if unloading the currently selected
tab (or Firefox View if unloading all tabs in the window) and handle
multiselect.

Differential Revision: https://phabricator.services.mozilla.com/D226346
2024-10-22 01:34:34 +00:00
Dão Gottwald
fed3bf0d27 Bug 1926058 - groupDropIndex is an index within all tabs, so use it on this.allTabs to get the tab we're looking for. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226360
2024-10-21 19:18:01 +00:00
Dão Gottwald
f049ccd8d8 Bug 1925842 - Rename _numPinnedTabs to pinnedTabCount. r=tabbrowser-reviewers,jswinarton,dwalker
Also move getDuplicateTabsToClose and getAllDuplicateTabsToClose away from essentials at the top, closer to related methods.

Differential Revision: https://phabricator.services.mozilla.com/D226279
2024-10-21 14:35:06 +00:00
Dão Gottwald
75cf3245b3 Bug 1925738 - Use text-align:center on group label. r=jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226217
2024-10-21 14:16:32 +00:00
Dão Gottwald
dd1c36f139 Bug 1925843 - Make sure groupDropIndex is in bounds. r=jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226250
2024-10-21 14:15:39 +00:00
Dão Gottwald
90a5fa39db Bug 1908438 - Drag and drop support for creating a group. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D225799
2024-10-18 17:59:44 +00:00
Jeremy Swinarton
548e49013a Bug 1922655: New tab groups are positioned in the tab strip based on TabContextMenu.contextTab r=dao,sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D225071
2024-10-16 20:04:07 +00:00
Jeremy Swinarton
0323d4afe9 Bug 1918712: Context menu to remove tab from group r=dao,fluent-reviewers,tabbrowser-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D224480
2024-10-16 15:18:21 +00:00
DJ
d43a8cef11 Bug 1923865 - revise call signature for addTabGroup. r=jswinarton,sessionstore-reviewers,tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D225386
2024-10-15 14:10:39 +00:00
Dão Gottwald
c6ec7829ac Bug 1924129 - When moving tabs, calculate the distance tabs need to shift by looking at the first and last moving tab rather than multiplying the size of one tab by the number of moving tabs. r=tabbrowser-reviewers,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D225365
2024-10-15 05:54:18 +00:00
Stephen Thompson
5a16e0d7c5 Bug 1915172 - Restore open tab groups r=dao,jswinarton,sessionstore-reviewers,tabbrowser-reviewers
1908418 added tab groups and their tab relationships to each window. This patch will restore tab groups and the tabs within them.

Differential Revision: https://phabricator.services.mozilla.com/D224955
2024-10-14 15:31:29 +00:00
Dão Gottwald
891bd8ee42 Bug 1924041 - Stop setting the "hashiddentabs" attribute. r=tabbrowser-reviewers,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D225325
2024-10-11 14:25:14 +00:00
Dão Gottwald
b6f07a6c23 Bug 1924036 - Remove obsolete showOnlyTheseTabs API and reimplement in BrowserTestUtils. r=tabbrowser-reviewers,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D225323
2024-10-11 14:25:13 +00:00
DJ
44408879b4 Bug 1918687 - addTabGroup: select unused color if no color specified. r=jswinarton,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D225102
2024-10-10 20:00:23 +00:00
Sam Foster
33db87f9be Bug 1922898 - Correct inactive titlebar color in linux; ensure titlebar toolbars get the browser-titlebar class. r=desktop-theme-reviewers,dao,tabbrowser-reviewers
- Remove the titlebar-color class which is now redundant with browser-titlebar
- Fix the specificity in the linux stylesheet ensuring titlebar toolbars show the theme's background images not the falback colors

Differential Revision: https://phabricator.services.mozilla.com/D224862
2024-10-10 17:28:23 +00:00
Jeremy Swinarton
0026e1e3bc Bug 1922262: Tab group context menu chicklet uses correct styling r=dao,desktop-theme-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224547
2024-10-10 15:00:02 +00:00
Dão Gottwald
a5b1716f01 Bug 1921860 - Tab counts should include hidden tabs and tabs in collapsed tab groups. r=sthompson
Differential Revision: https://phabricator.services.mozilla.com/D225206
2024-10-10 13:59:46 +00:00
Butkovits Atila
0cf60d509c Backed out changeset 51e855a9eb6c (bug 1922262) for causing failures at browser_tab_groups.js. CLOSED TREE 2024-10-09 20:21:39 +03:00
Jeremy Swinarton
6e84c51003 Bug 1922262: Tab group context menu chicklet uses correct styling r=dao,desktop-theme-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224547
2024-10-09 15:26:24 +00:00
DJ
7d6283ad1c Bug 1908433 - Add UI for editing an existing tab group. r=jswinarton,dao,fluent-reviewers,desktop-theme-reviewers,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D223876
2024-10-09 14:49:18 +00:00
Dão Gottwald
4268ec21d4 Bug 1923635 - Various MozTabbrowserTabs cleanup. r=dwalker,tabbrowser-reviewers
Did this while working on drag-and-drop code.

Differential Revision: https://phabricator.services.mozilla.com/D225062
2024-10-09 14:46:09 +00:00