Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 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
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,
46 changes: 24 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 e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e0474669fc15c20 100644
index e4266a159a0d5c42cc294602d00b8f66131f35d5..b6c96aa0c2b8889ce9d3fe25f10f759eff24b7ff 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 e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
return;
}

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

get visible() {
Expand All @@ -64,15 +64,11 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
+ if (!this.isOpen || this.hidden || this.hasAttribute("zen-empty-tab")) {
+ return false;
+ }
+ // 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) {
+ return false;
Expand All @@ -81,7 +77,7 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
}

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

Expand All @@ -90,16 +86,22 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
}

get lastAccessed() {
@@ -393,7 +408,18 @@
@@ -393,7 +404,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 @@ -110,7 +112,7 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
}

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

Expand All @@ -121,15 +123,15 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
// 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 +534,7 @@
@@ -504,6 +536,7 @@
if (!this.contains(event.relatedTarget)) {
this._mouseleave();
}
+ gZenPinnedTabManager.onResetPinButtonMouseOut(this);
}

on_dragstart(event) {
@@ -538,6 +569,8 @@
@@ -538,6 +571,8 @@
this.style.MozUserFocus = "ignore";
} else if (
event.target.classList.contains("tab-close-button") ||
Expand All @@ -138,7 +140,7 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
event.target.classList.contains("tab-icon-overlay") ||
event.target.classList.contains("tab-audio-button")
) {
@@ -592,16 +625,21 @@
@@ -592,16 +627,21 @@
this.style.MozUserFocus = "";
}

Expand All @@ -161,7 +163,7 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
gBrowser.multiSelectedTabsCount > 0 &&
!event.target.classList.contains("tab-close-button") &&
!event.target.classList.contains("tab-icon-overlay") &&
@@ -613,8 +651,9 @@
@@ -613,8 +653,9 @@
}

if (
Expand All @@ -173,7 +175,7 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
) {
if (this.activeMediaBlocked) {
if (this.multiselected) {
@@ -632,7 +671,7 @@
@@ -632,7 +673,7 @@
return;
}

Expand All @@ -182,7 +184,7 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
if (this.multiselected) {
gBrowser.removeMultiSelectedTabs(
lazy.TabMetrics.userTriggeredContext(
@@ -652,6 +691,14 @@
@@ -652,6 +693,14 @@
// (see tabbrowser-tabs 'click' handler).
gBrowser.tabContainer._blockDblClick = true;
}
Expand All @@ -197,7 +199,7 @@ index e4266a159a0d5c42cc294602d00b8f66131f35d5..88c321f05dabd948d06e155f6e047466
}

on_dblclick(event) {
@@ -675,6 +722,8 @@
@@ -675,6 +724,8 @@
animate: true,
triggeringEvent: event,
});
Expand Down
Loading