Compare commits

...

8 Commits

Author SHA1 Message Date
mr-cheffy
d7efa809bb chore: Sync upstream to Firefox 152.0.6 2026-07-14 17:13:39 +00:00
Andrey Bochkarev
c7e4217204 no-bug: Ignore zen-empty-tab in #isLastTabWindow (gh-14564)
When dragging a tab from the blank window to the main window, the blank
window doesn't close because '#isLastTabWindow' considers
'zen-empty-tab' as a normal tab.
2026-07-13 13:40:43 +02:00
Andrey Bochkarev
e837158e4c gh-14545: Correctly handle dnd moving a tab to an empty space (gh-14562) 2026-07-12 17:29:29 +02:00
Andrey Bochkarev
a1a2268f9b gh-14511: Prevent switching spaces when dragging outside (gh-14515)
fixed: https://github.com/zen-browser/desktop/issues/14511
2026-07-12 12:57:45 +02:00
Nicholas Leigh
274b9f9f83 gh-14495: Fix misaligned symbolic space icons in Space options menu on Linux (gh-14498) 2026-07-11 13:38:05 +02:00
Ashvin Jangid
fe0cf3601a gh-14544: Fix essentials promo ui leaving gap on pressing esc (gh-14547)
Fixes https://github.com/zen-browser/desktop/issues/14544

Also fixes essentials promo having weird ui with container specific
essentials


https://github.com/user-attachments/assets/f6df3e48-5fa2-471e-afbb-2472efa0620b
2026-07-11 12:45:20 +02:00
Kristijan Ribarić
61e0790144 gh-14470: Rename all occurances of Workspaces to Spaces in sync (gh-14528) 2026-07-09 01:37:00 +02:00
Andrey Bochkarev
03f251ff4a gh-13870: Remove two spaces cycling (gh-14529) 2026-07-09 01:36:51 +02:00
7 changed files with 40 additions and 43 deletions

View File

@@ -34,7 +34,7 @@ Zen is a firefox-based browser with the aim of pushing your productivity to a ne
### Firefox Versions
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.5`! 🚀
- [`Release`](https://zen-browser.app/download) - Is currently built using Firefox version `152.0.6`! 🚀
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 152.0.5`!
### Contributing

View File

@@ -1 +1 @@
6bd10168f81fb90f878132d87cf681200afbcd91
e7fbb446077536139cdd78b6a0386a97237af20f

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
index 08b5b56e069d038d72c87355920c4ce8a55ed805..e1a3a18081c7a8153f8d12c187bf4dd522944fcb 100644
index 08b5b56e069d038d72c87355920c4ce8a55ed805..0e4f57c21d28ccf173d8d1e13e96c2c1f8a79f34 100644
--- a/browser/components/tabbrowser/content/tabbrowser.js
+++ b/browser/components/tabbrowser/content/tabbrowser.js
@@ -511,6 +511,7 @@
@@ -692,6 +692,15 @@ index 08b5b56e069d038d72c87355920c4ce8a55ed805..e1a3a18081c7a8153f8d12c187bf4dd5
return;
}
@@ -5776,7 +5973,7 @@
*/
#isLastTabInWindow(tab) {
for (const otherTab of this.tabs) {
- if (otherTab != tab && otherTab.isOpen && !otherTab.hidden) {
+ if (otherTab != tab && otherTab.isOpen && !otherTab.hidden && !otherTab.hasAttribute("zen-empty-tab")) {
return false;
}
}
@@ -5867,7 +6064,7 @@
closeWindowWithLastTab != null
? closeWindowWithLastTab

View File

@@ -69,6 +69,7 @@
#changeSpaceTimer = null;
#isAnimatingTabMove = false;
#firstHapticFeedbackPlayed = false;
#lastDragOverTime = 0;
#dragOverSplit = {};
@@ -723,9 +724,11 @@
const { isNearLeftEdge, isNearRightEdge } =
this.#shouldSwitchSpace(event);
if (isNearLeftEdge || isNearRightEdge) {
if (!this.#changeSpaceTimer && !this.#isOutOfWindow) {
this.#lastDragOverTime = Date.now();
if (!this.#changeSpaceTimer) {
this.#changeSpaceTimer = setTimeout(() => {
if (this.#isOutOfWindow) {
const timeSinceLastDragOver = Date.now() - this.#lastDragOverTime;
if (timeSinceLastDragOver > 250) {
return;
}
this.clearDragOverVisuals();
@@ -1333,7 +1336,8 @@
// Essentials should be properly handled by ::animateVerticalPinnedGridDragOver
if (!dropElement || dropElement.hasAttribute("zen-essential")) {
this.clearDragOverVisuals();
return null;
// If dropElement is null or essential, dropElement should be the empty tab
return [dropBefore, gZenWorkspaces._emptyTab];
}
if (dropElement.hasAttribute("zen-empty-tab") && dropElement.group) {
let secondTab = dropElement.group.tabs[1];

View File

@@ -460,16 +460,19 @@ class nsZenWorkspaces {
document
.getElementById("zen-essentials")
.appendChild(essentialsContainer);
// Set an initial hidden state if the essentials section is not supposed
// to be shown on the current workspace
if (
this.containerSpecificEssentials &&
this.getActiveWorkspaceFromCache()?.containerTabId != container
) {
essentialsContainer.setAttribute("hidden", "true");
}
}
// Set a hidden state if the essentials section is not supposed
// to be shown on the current workspace, else remove the hidden state
if (
this.containerSpecificEssentials &&
this.getActiveWorkspaceFromCache()?.containerTabId != container
) {
essentialsContainer.setAttribute("hidden", "true");
} else {
essentialsContainer.removeAttribute("hidden");
}
return essentialsContainer;
}
@@ -1161,6 +1164,9 @@ class nsZenWorkspaces {
const item = document.createXULElement("menuitem");
item.className = "zen-workspace-context-menu-item";
item.setAttribute("zen-workspace-id", workspace.uuid);
if (AppConstants.platform === "linux") {
disableCurrent = true;
}
if (!disableCurrent) {
item.setAttribute("type", "radio");
}
@@ -1864,11 +1870,6 @@ class nsZenWorkspaces {
}
const newTransform = diff * 100;
element.style.transform = `translateX(${newTransform + offsetPixels / 2}%)`;
// A special case for two spaces
if (spaceLen === 2 && diff !== 0) {
const side = offsetPixels > 0 ? -100 : 100;
element.style.transform = `translateX(${side + offsetPixels / 2}%)`;
}
}
// Hide other essentials with different containerTabId
for (const container of otherContainersEssentials) {
@@ -2099,12 +2100,6 @@ class nsZenWorkspaces {
offset += spaceLen;
}
offset = offset * 100;
// A special case for two spaces
if (spaceLen === 2 && offset !== 0) {
const currentTransform =
parseFloat(element.style.transform.split("(")[1]) || 0;
offset = currentTransform >= 0 ? 100 : -100;
}
const newTransform = `translateX(${offset}%)`;
// Only animate the workspace that is coming in, to avoid having multiple workspaces
// animating off-screen at the same time which can cause performance issues. With an off
@@ -2181,17 +2176,6 @@ class nsZenWorkspaces {
existingOffset = currentTransform || (isGoingLeft ? -100 : 100);
newOffset = 0;
}
if (spaceLen === 2) {
if (containsPrev && !containsNew) {
existingOffset = currentTransform;
newOffset = currentTransform >= 0 ? 100 : -100;
} else {
existingOffset = currentTransform >= 0 ? 100 : -100;
newOffset = 0;
}
}
const newTransform = `translateX(${newOffset}%)`;
let existingTransform = `translateX(${existingOffset}%)`;
if (shouldAnimate) {

View File

@@ -33,10 +33,10 @@ const RECORD_TYPE_BY_PREFIX = Object.freeze({
* Workspaces engine collection.
*/
export class ZenWorkspacesRecord extends CryptoWrapper {
_logName = "Sync.Record.ZenWorkspaces";
_logName = "Sync.Record.ZenSpaces";
}
ZenWorkspacesRecord.prototype.type = "workspaces";
ZenWorkspacesRecord.prototype.type = "spaces";
function parseRecordId(id) {
const sep = id.indexOf("~");
@@ -51,7 +51,7 @@ function parseRecordId(id) {
function createRecordId(type, id) {
const prefix = RECORD_ID_PREFIX_BY_TYPE[type];
if (!prefix) {
throw new Error(`Unknown Workspaces Sync record type: ${type}`);
throw new Error(`Unknown Spaces Sync record type: ${type}`);
}
return `${prefix}~${id}`;
}
@@ -371,11 +371,11 @@ class ZenWorkspacesTracker extends Tracker {
*/
export class ZenWorkspacesEngine extends SyncEngine {
static get name() {
return "Workspaces";
return "Spaces";
}
constructor(service) {
super("Workspaces", service);
super("Spaces", service);
}
get _storeObj() {

View File

@@ -5,7 +5,7 @@
"binaryName": "zen",
"version": {
"product": "firefox",
"version": "152.0.5",
"version": "152.0.6",
"candidate": "152.0.5",
"candidateBuild": 1
},