feat: Improved indentation when dragging tabs and folders (#9908)

* feat: Improved indentation when dragging tabs and folders

* fix: Formatting
This commit is contained in:
octaviusz
2025-08-16 21:09:53 +03:00
committed by GitHub
parent fcaac2ee0c
commit ce2311c086
5 changed files with 66 additions and 53 deletions

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabgroup.js b/browser/components/tabbrowser/content/tabgroup.js
index caea196b22b4689f55780a528661d87b52f4e728..ef687c6c693abab2b62023cfa7f44705acc5d04f 100644
index caea196b22b4689f55780a528661d87b52f4e728..54f3be2b115f6b3691792796f758534aec90206d 100644
--- a/browser/components/tabbrowser/content/tabgroup.js
+++ b/browser/components/tabbrowser/content/tabgroup.js
@@ -13,10 +13,12 @@
@@ -87,7 +87,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..ef687c6c693abab2b62023cfa7f44705
}
get color() {
@@ -338,12 +351,57 @@
@@ -338,12 +351,61 @@
tabGroupName,
})
.then(result => {
@@ -144,10 +144,14 @@ index caea196b22b4689f55780a528661d87b52f4e728..ef687c6c693abab2b62023cfa7f44705
+ }
+ }
+ return true;
+ }
+
+ get level() {
+ return this.group?.level + 1 || 0;
}
/**
@@ -373,7 +431,7 @@
@@ -373,7 +435,7 @@
*/
addTabs(tabs, metricsContext) {
for (let tab of tabs) {
@@ -156,7 +160,7 @@ index caea196b22b4689f55780a528661d87b52f4e728..ef687c6c693abab2b62023cfa7f44705
tab.ownerGlobal.gBrowser.unpinTab(tab);
}
let tabToMove =
@@ -437,7 +495,7 @@
@@ -437,7 +499,7 @@
*/
on_click(event) {
let isToggleElement =
@@ -165,10 +169,11 @@ index caea196b22b4689f55780a528661d87b52f4e728..ef687c6c693abab2b62023cfa7f44705
event.target === this.#overflowCountLabel;
if (isToggleElement && event.button === 0) {
event.preventDefault();
@@ -470,5 +528,6 @@
@@ -470,5 +532,6 @@
}
}
+ window.MozTabbrowserTabGroup = MozTabbrowserTabGroup;
customElements.define("tab-group", MozTabbrowserTabGroup);
}