feat: Add dnd switch support for groups, p=#11854

* feat: Add dnd switch support for groups

* refactor: Use `changeFolderToSpace` for drag-and-drop workspace changes

* refactor: Use optional parameter instead of attribute

* fix: Formatting

* refactor: Move condition inside function

* Refactor tab group handling in drag-and-drop

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>

* feat: Only allow double click rename on labels, b=no-bug, c=common

---------

Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
Co-authored-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
Andrey Bochkarev
2026-01-10 16:41:28 +03:00
committed by GitHub
parent 44a28e2afe
commit fc7f10aef1
6 changed files with 56 additions and 21 deletions

View File

@@ -685,8 +685,11 @@ class nsZenWorkspaces {
const delta = event.delta * 300;
const stripWidth =
window.windowUtils.getBoundsWithoutFlushing(document.getElementById('navigator-toolbox')).width +
window.windowUtils.getBoundsWithoutFlushing(document.getElementById('zen-sidebar-splitter')).width * 2;
window.windowUtils.getBoundsWithoutFlushing(document.getElementById('navigator-toolbox'))
.width +
window.windowUtils.getBoundsWithoutFlushing(document.getElementById('zen-sidebar-splitter'))
.width *
2;
let translateX = this._swipeState.lastDelta + delta;
// Add a force multiplier as we are translating the strip depending on how close to the edge we are
let forceMultiplier = Math.min(1, 1 - Math.abs(translateX) / (stripWidth * 4.5)); // 4.5 instead of 4 to add a bit of a buffer
@@ -1681,7 +1684,8 @@ class nsZenWorkspaces {
!(this.#inChangingWorkspace && !forAnimation && !this._alwaysAnimatePaddingTop)
) {
delete this._alwaysAnimatePaddingTop;
const essentialsHeight = window.windowUtils.getBoundsWithoutFlushing(essentialContainer).height;
const essentialsHeight =
window.windowUtils.getBoundsWithoutFlushing(essentialContainer).height;
if (!forAnimation && animateContainer && gZenUIManager.motion && gZenStartup.isReady) {
gZenUIManager.motion.animate(
workspaceElement,