Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
121d544
refactor: Extract tab visibility logic to ZenFolder
octaviusz Mar 2, 2026
f6776cd
refactor: Replace custom `has-active` attribute to FF `hasactivetab`
octaviusz Mar 2, 2026
a6437fd
fix: Prevent adding new active tabs when dragging a folder
octaviusz Mar 2, 2026
411ba2d
Merge branch 'dev' into refactor-folders
octaviusz Mar 2, 2026
adc165d
refactor: Migrate active tab tracking from DOM attribute to internal …
octaviusz Mar 2, 2026
dd61bd0
fix: Small fix live folder and overflow issues
octaviusz Mar 2, 2026
6448e59
fix: Formatting
octaviusz Mar 2, 2026
c2bcf29
fix: correctly remove indent styling for tabs and split-view groups
octaviusz Mar 2, 2026
234c6ca
refactor: Centralize folder indentation removal logic
octaviusz Mar 3, 2026
adee683
Merge branch 'dev' into refactor-folders
octaviusz Mar 5, 2026
eb77877
Merge branch 'refactor-folders' of github.com:octaviusz/desktop into …
octaviusz Mar 5, 2026
f0beb68
fix: Split View is always visible inside folders
octaviusz Mar 5, 2026
b09d010
Merge branch 'dev' into refactor-folders
octaviusz Mar 12, 2026
ac71000
refactor: Overhaul animation system and DOM structure for folder states
octaviusz Mar 14, 2026
eec1087
Merge branch 'dev' into refactor-folders
octaviusz Mar 15, 2026
0448df2
chore: Update patches
octaviusz Mar 15, 2026
8f56b23
feat: More TODOs more work
octaviusz Mar 15, 2026
4a7b007
Merge branch 'dev' into refactor-folders
octaviusz Mar 15, 2026
1aa2258
fix; Some changes
octaviusz Mar 17, 2026
97e4b1b
Merge branch 'dev' into refactor-folders
octaviusz Mar 17, 2026
515f67d
refactor: Improve session restoration of Zen Folders and start working
octaviusz Mar 19, 2026
d360033
refactor: Wrap pinned tabs section for improved layout control
octaviusz Mar 20, 2026
40fec8a
fix: Correct store and restore active tabs position
octaviusz Mar 20, 2026
a7b1e8b
Merge branch 'dev' into refactor-folders
octaviusz Mar 20, 2026
701087c
fix: Patch
octaviusz Mar 20, 2026
ca2f1e8
fix: Append new folder to the end of the list
octaviusz Mar 20, 2026
6f8ac61
fix: Add compatibility for restoring old session data
octaviusz Mar 20, 2026
8f64c9d
Merge branch 'dev' into refactor-folders
octaviusz Mar 21, 2026
9841c01
refactor: Reworking the logic of some animations
octaviusz Mar 24, 2026
ea027bc
Merge branch 'dev' into refactor-folders
mr-cheffy Mar 24, 2026
bed977b
feat: Implement weight-based restoring system
octaviusz Mar 26, 2026
82ca40d
feat: Active tabs support for workspaces
octaviusz Mar 26, 2026
1a3c9db
fix: Improve animation stability and transition effects
octaviusz Mar 26, 2026
ef8b620
Merge branch 'dev' into refactor-folders
octaviusz Mar 29, 2026
0c4cfe0
Merge branch 'dev' into refactor-folders
octaviusz May 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
diff --git a/browser/components/sessionstore/TabGroupState.sys.mjs b/browser/components/sessionstore/TabGroupState.sys.mjs
index 1289549cf33ce6efb620c877bd1ba1c24475d2b0..4c34c923f4b129dd9ea79414d978c6432317340c 100644
index 1289549cf33ce6efb620c877bd1ba1c24475d2b0..ff128b9dc8cdcb418b8cc2a416026b58f8df4a1f 100644
--- a/browser/components/sessionstore/TabGroupState.sys.mjs
+++ b/browser/components/sessionstore/TabGroupState.sys.mjs
@@ -65,6 +65,9 @@ class _TabGroupState {
@@ -65,6 +65,11 @@ class _TabGroupState {
*/
collect(tabGroup) {
return {
+ pinned: tabGroup.pinned,
+ essential: tabGroup.essential,
+ splitView: tabGroup.hasAttribute("split-view-group"),
+ parentGroupId: tabGroup.group?.id,
+ isZenFolder: tabGroup.isZenFolder,
id: tabGroup.id,
name: tabGroup.label,
color: tabGroup.color,
48 changes: 26 additions & 22 deletions src/browser/components/tabbrowser/content/tab-js.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tab.js b/browser/components/tabbrowser/content/tab.js
index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d645641cd 100644
index b9381999a77ecacdb95c69494ac8972e9f13d14d..7976a3ca5bc45953126e354243d91a2c6d5dccd9 100644
--- a/browser/components/tabbrowser/content/tab.js
+++ b/browser/components/tabbrowser/content/tab.js
@@ -21,6 +21,7 @@
Expand Down Expand Up @@ -52,7 +52,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
return;
}

@@ -225,11 +228,25 @@
@@ -225,11 +228,23 @@
}

get visible() {
Expand All @@ -66,13 +66,11 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
+ }
+ // Selected tabs are always visible
+ if (this.selected || this.multiselected) return true;
+ // Recursively check all parent groups
+ let currentParent = this.group;
+ while (currentParent) {
+ if (currentParent.collapsed && !currentParent.activeTabs?.includes(this)) {
+ return false;
+ if (this.group) {
+ if (this.group.hasAttribute("split-view-group") && this.group?.group?.isZenFolder) {
+ return this.group.group.isTabVisibleInGroup(this);
+ }
+ currentParent = currentParent.group;
+ return this.group.isTabVisibleInGroup(this);
+ }
+ if (this.pinned && !this.hasAttribute("zen-essential") &&
+ gZenWorkspaces.activeWorkspaceElement?.hasCollapsedPinnedTabs &&
Expand All @@ -83,7 +81,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}

get hidden() {
@@ -308,7 +325,7 @@
@@ -308,7 +323,7 @@
return false;
}

Expand All @@ -92,16 +90,22 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}

get lastAccessed() {
@@ -393,7 +410,18 @@
@@ -393,7 +408,24 @@
}

get group() {
- return this.closest("tab-group");
+ if (typeof gBrowser === "undefined") {
+ return null;
+ }
+ if (gBrowser.isTabGroup(this.parentElement?.parentElement)) {
+ return this.parentElement.parentElement;
+ if (this._originalGroup && !this.splitView && (this.parentElement.classList.contains("tab-group-active-tabs-container") || this.parentElement.classList.contains("zen-workspace-pinned-active-tabs-section"))) return this._originalGroup;
+ let group = this.parentElement?.parentElement; // FF groups and Split View
+ if (group && gBrowser.isTabGroup(group)) {
+ return this.parentElement.parentElement
+ }
+ group = this.parentElement?.parentElement?.parentElement; // Folders
+ if (group && gBrowser.isTabGroup(group)) {
+ return this.parentElement.parentElement.parentElement
+ }
+ if (this.pinned && !this.hasAttribute('zen-essential')) {
+ let collapsiblePins = gZenWorkspaces.workspaceElement(this.getAttribute('zen-workspace-id'))?.collapsiblePins;
Expand All @@ -112,7 +116,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}

get splitview() {
@@ -475,6 +503,10 @@
@@ -475,6 +507,10 @@
}
}

Expand All @@ -123,15 +127,15 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
// If the previous target wasn't part of this tab then this is a mouseenter event.
if (!this.contains(event.relatedTarget)) {
this._mouseenter();
@@ -504,6 +536,7 @@
@@ -504,6 +540,7 @@
if (!this.contains(event.relatedTarget)) {
this._mouseleave();
}
+ gZenPinnedTabManager.onResetPinButtonMouseOut(this);
}

on_dragstart(event) {
@@ -538,6 +571,8 @@
@@ -538,6 +575,8 @@
this.style.MozUserFocus = "ignore";
} else if (
event.target.classList.contains("tab-close-button") ||
Expand All @@ -140,7 +144,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
event.target.classList.contains("tab-icon-overlay") ||
event.target.classList.contains("tab-audio-button")
) {
@@ -572,7 +607,7 @@
@@ -572,7 +611,7 @@
}
} else if (
event.altKey &&
Expand All @@ -149,7 +153,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
) {
eventMaySelectTab = false;
} else if (!this.selected && this.multiselected) {
@@ -597,6 +632,10 @@
@@ -597,6 +636,10 @@
this.style.MozUserFocus = "";
}

Expand All @@ -160,7 +164,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
on_click(event) {
if (event.button != 0) {
return;
@@ -620,14 +659,31 @@
@@ -620,14 +663,31 @@
trigger: "alt_click",
});
}
Expand Down Expand Up @@ -193,7 +197,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
gBrowser.multiSelectedTabsCount > 0 &&
!event.target.classList.contains("tab-close-button") &&
!event.target.classList.contains("tab-icon-overlay") &&
@@ -639,8 +695,9 @@
@@ -639,8 +699,9 @@
}

if (
Expand All @@ -205,7 +209,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
) {
if (this.activeMediaBlocked) {
if (this.multiselected) {
@@ -658,7 +715,7 @@
@@ -658,7 +719,7 @@
return;
}

Expand All @@ -214,7 +218,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
if (this.multiselected) {
gBrowser.removeMultiSelectedTabs(
lazy.TabMetrics.userTriggeredContext(
@@ -678,6 +735,14 @@
@@ -678,6 +739,14 @@
// (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true;
}
Expand All @@ -229,7 +233,7 @@ index b9381999a77ecacdb95c69494ac8972e9f13d14d..a210b53bb46373f8bab532a00b25301d
}

on_dblclick(event) {
@@ -701,6 +766,8 @@
@@ -701,6 +770,8 @@
animate: true,
triggeringEvent: event,
});
Expand Down
Loading