Commit Graph

99 Commits

Author SHA1 Message Date
Dão Gottwald
db518f5774 Bug 1934296 - Adding a tab to a collapsed group should expand the group. r=tabbrowser-reviewers,jswinarton
Differential Revision: https://phabricator.services.mozilla.com/D230982
2024-12-03 18:15:28 +00:00
Nikki Sharpley
cb461afb42 Bug 1930929 - Fix vertical pinned tabs drag animation on scroll overflow r=tabbrowser-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D230425
2024-11-28 15:06:35 +00:00
Emilio Cobos Álvarez
768894a512 Bug 1932600 - Use customtitlebar rather than tabsintitlebar in front-end code. r=dao,desktop-theme-reviewers,tabbrowser-reviewers,sidebar-reviewers,nsharpley
This is probably also a better reflection of reality now that we can
have vertical tabs which would by definition not be in the titlebar.

Differential Revision: https://phabricator.services.mozilla.com/D229767
2024-11-28 12:12:51 +00:00
Cristina Horotan
bb08cc9f1d Backed out 5 changesets (bug 1930292, bug 1932600) for causing chrome failures at test_maximized_persist.xhtml on a CLOSED TREE
Backed out changeset 2418bfee53f1 (bug 1932600)
Backed out changeset 3297e990715a (bug 1932600)
Backed out changeset 24a670dea977 (bug 1930292)
Backed out changeset 7dd9f48216dd (bug 1930292)
Backed out changeset 15a85ec739dd (bug 1930292)
2024-11-28 06:57:35 +02:00
Emilio Cobos Álvarez
26de824592 Bug 1932600 - Use customtitlebar rather than tabsintitlebar in front-end code. r=dao,desktop-theme-reviewers,tabbrowser-reviewers,sidebar-reviewers,nsharpley
This is probably also a better reflection of reality now that we can
have vertical tabs which would by definition not be in the titlebar.

Differential Revision: https://phabricator.services.mozilla.com/D229767
2024-11-28 03:26:50 +00:00
Dão Gottwald
3245dd9a52 Bug 1928189 - Let Firefox View show tabs from collapsed groups. r=sthompson,fxview-reviewers,sfoster
Differential Revision: https://phabricator.services.mozilla.com/D229896
2024-11-26 16:45:56 +00:00
Dão Gottwald
8f56f70b33 Bug 1933258 - Add pref for when to move other tabs out of the way during drag and drop. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D230142
2024-11-26 16:20:26 +00:00
Dão Gottwald
dceb0661a7 Bug 1932425 - When dragging tabs, move other tabs over when hitting 70% instead of 50% of their width. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D229756
2024-11-22 10:14:51 +00:00
Adi
ba7e26bf67 Backed out changeset 44fc1ca324c1 (bug 1932425) for causing bc failures @browser_multiselect_tabs_reorder.js. 2024-11-21 21:23:36 +02:00
Dão Gottwald
7cf50a4d97 Bug 1932425 - When dragging tabs, move other tabs over when hitting 70% instead of 50% of their width. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D229756
2024-11-21 16:52:27 +00:00
Nikki Sharpley
c52bf125ff Bug 1926831 - Remove animation of tab when dropped in blank tab space r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D228722
2024-11-20 14:34:36 +00:00
Narcis Beleuzu
a680adff4f Backed out changeset 31fba99f4d2d (bug 1926831) for lint failure on tabs.js . CLOSED TREE 2024-11-20 01:17:04 +02:00
Nikki Sharpley
9719411374 Bug 1926831 - Remove animation of tab when dropped in blank tab space r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D228722
2024-11-19 22:09:07 +00:00
Stephen Thompson
35bab3b13c Bug 1927540 - drop tab into/out of end of tab groups r=dao,tabbrowser-reviewers
When all tabs are inside of tab groups, this patch allows the user to drag a tab to become a standalone tab at the end of the tab stirp. The user also has the ability to drop the tab into the end of the tab group at the end of the tab strip if the tab is dropped closer to the tab group.

Differential Revision: https://phabricator.services.mozilla.com/D229440
2024-11-19 20:26:31 +00:00
Dão Gottwald
f537dbd899 Bug 1926382 - Shift group labels along with the group's first tab. r=sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D229122
2024-11-15 16:30:38 +00:00
Gijs Kruitbosch
a50c45946e Bug 1927094 - optimize lineScrollAmount so it doesn't iterate over all tabs, r=mconley,dao
Differential Revision: https://phabricator.services.mozilla.com/D226907
2024-11-14 17:14:50 +00:00
Dão Gottwald
c40a1cb421 Bug 1929898 - Implement pause on drag and drop to create tab group. r=sthompson
Differential Revision: https://phabricator.services.mozilla.com/D228570
2024-11-12 16:54:20 +00:00
Stephen Thompson
b25e5f9796 Bug 1929384 - do not close window if there are still collapsed tab groups r=dao,tabbrowser-reviewers
When closing the last visible tab, if there are any collapsed tab groups, make one of the tabs in a tab group active. Based on pre-existing behavior, activating a tab in a collapsed tab group causes the tab group to expand.

Currently, if you close the last visible tab while you still have collapsed tab groups present on the tab bar, the browser window will close. This is surprising and sad behavior for users.

Differential Revision: https://phabricator.services.mozilla.com/D228274
2024-11-11 10:39:11 +00:00
Dão Gottwald
372e1282c7 Bug 1927884 - Update tab line colour when moving between groups. r=sthompson
Differential Revision: https://phabricator.services.mozilla.com/D228466
2024-11-08 18:57:28 +00:00
Nikki Sharpley
d694d21a6e Bug 1918217 - Improve drag and drop experience for pinned tabs when vertical tabs expanded r=tabbrowser-reviewers,dao
- you can now drag and drop when there are only 2 or 3 pinned tabs
- the position of the dragged tab has been fixed when scrolling overflow

Differential Revision: https://phabricator.services.mozilla.com/D227992
2024-11-08 17:35:48 +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
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
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
Butkovits Atila
3609354615 Backed out changeset 5c7de47bcacb (bug 1927094) for causing Bug 1928689. a=backout 2024-11-01 18:11:08 +02: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
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
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
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
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
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
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
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
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
Nikki Sharpley
39f9b1c3a2 Bug 1921761 - Compute maxTabsPerRow dynamically r=sidebar-reviewers,tabbrowser-reviewers,sfoster,dao
Since the tabs size and padding has been updated, the max number of tabs
per row is no longer 6. There is also a plan to make the number of tabs per
row dynamic based on an adjustable sidebar main width. Additionally, There
is a proposed patch to pack pinned tabs when expanded - Bug 1921081. Hence,
this patch aims to make the `maxTabsPerRow` variable dynamic too.

Differential Revision: https://phabricator.services.mozilla.com/D224315
2024-10-08 18:31:28 +00:00
Gregory Pappas
782bd92f4c Bug 1921762 - Fix horizontal tabstrip drop animation r=tabbrowser-reviewers,nsharpley,dao
Differential Revision: https://phabricator.services.mozilla.com/D224157
2024-10-01 13:52:39 +00:00
Gijs Kruitbosch
70debc7c0a Bug 1920319 - add dedicated keypress handler for new tab buttons, r=tabbrowser-reviewers,dao
Right now, tabbrowser relies on browser-toolbarKeyNav.js for keyboard access to these buttons on macOS.
There's also toolkit handling for space, but not enter, in https://searchfox.org/mozilla-central/rev/9fe73403523732f57cd82d30590ecc272fb0b165/toolkit/content/widgets/button.js#27-34 .
In vertical tabs mode, browser-toolbarKeyNav does not help us as the buttons aren't in the toolbox.
On Nightly, the containers-related code in https://searchfox.org/mozilla-central/rev/9fe73403523732f57cd82d30590ecc272fb0b165/browser/components/tabbrowser/content/tabs.js#1422-1428
adds the buttons to gClickAndHoldListeners, which have their own keypress handling. This happens whenever
containers are enabled. Those are not enabled by default on non-nightly, and so we end up missing a keypress
handler in vertical tabs mode on non-Nightly on macOS.

This is all a big mess and we should probably figure out a better solution. But given this needs beta uplift,
the expedient solution seems to be a dedicated listener and making sure that only 1 listener is invoked.

Differential Revision: https://phabricator.services.mozilla.com/D224094
2024-09-30 13:15:28 +00:00
Dão Gottwald
97f432dc06 Bug 1920922 - Update hidden tab checks to account for tabs in collapsed groups. r=tabbrowser-reviewers,dwalker
Differential Revision: https://phabricator.services.mozilla.com/D223469
2024-09-26 04:18:45 +00:00
Jeremy Swinarton
669e5f193b Bug 1920731: Prevent gBrowser.tabs from returning tab groups r=dwalker,sthompson,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D223362
2024-09-25 17:31:38 +00:00