mirror of
https://github.com/zen-browser/desktop.git
synced 2026-05-28 07:45:09 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b9f449f95 | ||
|
|
9433b8a8f0 | ||
|
|
561a03421f | ||
|
|
73ae2fa258 |
@@ -35,7 +35,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 `149.0.2`! 🚀
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 149.0`!
|
||||
- [`Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 149.0.2`!
|
||||
|
||||
### Contributing
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/customizableui/ToolbarContextMenu.sys.mjs b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
|
||||
index d5fd707b98e4b163a624c97ff4a8f2574e0b0180..a3ac939aa9133a678396c16bc6746444a3f3ac1f 100644
|
||||
index d5fd707b98e4b163a624c97ff4a8f2574e0b0180..b5d7e84c3567e83b95a6493e8333d3036dc88f36 100644
|
||||
--- a/browser/components/customizableui/ToolbarContextMenu.sys.mjs
|
||||
+++ b/browser/components/customizableui/ToolbarContextMenu.sys.mjs
|
||||
@@ -183,7 +183,7 @@ export var ToolbarContextMenu = {
|
||||
@@ -23,3 +23,11 @@ index d5fd707b98e4b163a624c97ff4a8f2574e0b0180..a3ac939aa9133a678396c16bc6746444
|
||||
|
||||
let toggleVerticalTabsItem = document.getElementById(
|
||||
"toolbar-context-toggle-vertical-tabs"
|
||||
@@ -267,6 +264,7 @@ export var ToolbarContextMenu = {
|
||||
document.getElementById("sidebarRevampSeparator").hidden =
|
||||
!showSidebarActions || isVerticalTabStripMenu;
|
||||
document.getElementById("customizationMenuSeparator").hidden =
|
||||
+ true ||
|
||||
toolbarItem?.id == "tabbrowser-tabs" ||
|
||||
(toolbarItem?.localName == "toolbarspring" &&
|
||||
!CustomizationHandler.isCustomizing()) ||
|
||||
|
||||
@@ -26,6 +26,12 @@ class nsHasPolyfill {
|
||||
if (selected?.tagName?.toLowerCase() === "menu") {
|
||||
return null;
|
||||
}
|
||||
if (selected) {
|
||||
gZenCompactModeManager.log(
|
||||
`Selector "${selector}" exists for: `,
|
||||
element
|
||||
);
|
||||
}
|
||||
return selected;
|
||||
});
|
||||
const { exists: shouldExist = true } = descendantSelectors;
|
||||
|
||||
@@ -432,6 +432,9 @@ window.gZenUIManager = {
|
||||
},
|
||||
|
||||
onUrlbarSearchModeChanged(event) {
|
||||
if (gReduceMotion) {
|
||||
return;
|
||||
}
|
||||
const { searchMode } = event.detail;
|
||||
const input = gURLBar;
|
||||
if (gURLBar.hasAttribute("breakout-extend") && !this._animatingSearchMode) {
|
||||
|
||||
@@ -233,6 +233,7 @@
|
||||
--zen-primary-color: rgb(11, 10, 11) !important;
|
||||
/* Make sure its in sync with getToolbarColor */
|
||||
--toolbox-textcolor: rgba(255, 255, 255, 0.8) !important;
|
||||
--toolbar-color-scheme: dark !important;
|
||||
}
|
||||
|
||||
&[zen-unsynced-window='true'] {
|
||||
|
||||
@@ -177,7 +177,6 @@ window.gZenCompactModeManager = {
|
||||
const attributes = [
|
||||
"panelopen",
|
||||
"open",
|
||||
"opening",
|
||||
"breakout-extend",
|
||||
"zen-floating-urlbar",
|
||||
];
|
||||
@@ -186,7 +185,7 @@ window.gZenCompactModeManager = {
|
||||
[
|
||||
{
|
||||
selector:
|
||||
":where([panelopen='true'], [open='true'], [showing='true'], [breakout-extend='true'])" +
|
||||
":where([panelopen='true'], [open='true'], [breakout-extend='true'])" +
|
||||
":not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore)",
|
||||
},
|
||||
],
|
||||
@@ -198,7 +197,7 @@ window.gZenCompactModeManager = {
|
||||
[
|
||||
{
|
||||
selector:
|
||||
":where([panelopen='true'], [open='true'], [showing='true'], #urlbar:focus-within, [breakout-extend='true'])" +
|
||||
":where([panelopen='true'], [open='true'], #urlbar:focus-within, [breakout-extend='true'])" +
|
||||
":not(.zen-compact-mode-ignore)",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
<!--
|
||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
-->
|
||||
<svg width="1920" height="1080" viewBox="0 0 1920 1080" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_23_113)"><rect width="1920" height="1080" fill="url(#paint0_linear_23_113)"/><circle cx="960" cy="1080" r="740" stroke="#F2F0E3" stroke-width="120"/><circle cx="960" cy="1080" r="558.095" stroke="#F2F0E3" stroke-width="80"/><circle cx="960" cy="1080" r="386.19" stroke="#F2F0E3" stroke-width="60"/><circle cx="960" cy="1080" r="214.286" stroke="#F2F0E3" stroke-width="40"/></g><defs><linearGradient id="paint0_linear_23_113" x1="960" y1="0" x2="960" y2="1080" gradientUnits="userSpaceOnUse"><stop stop-color="#EA6E54"/><stop offset="1" stop-color="#D9664E"/></linearGradient><clipPath id="clip0_23_113"><rect width="1920" height="1080" fill="white"/></clipPath></defs></svg>
|
||||
|
Before Width: | Height: | Size: 1023 B |
@@ -2,7 +2,6 @@
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
content/browser/zen-images/brand-header.svg (../../zen/images/brand-header.svg)
|
||||
content/browser/zen-images/layouts/collapsed.png (../../zen/images/layouts/collapsed.png)
|
||||
content/browser/zen-images/layouts/multiple-toolbar.png (../../zen/images/layouts/multiple-toolbar.png)
|
||||
content/browser/zen-images/layouts/single-toolbar.png (../../zen/images/layouts/single-toolbar.png)
|
||||
|
||||
@@ -1551,7 +1551,7 @@ class nsZenWorkspaces {
|
||||
!tab.hasAttribute("pending")
|
||||
);
|
||||
|
||||
await gBrowser.explicitUnloadTabs(tabsToUnload); // TODO: unit test this
|
||||
await gBrowser.explicitUnloadTabs(tabsToUnload);
|
||||
}
|
||||
|
||||
moveTabToWorkspace(tab, workspaceID) {
|
||||
|
||||
@@ -309,13 +309,16 @@
|
||||
/* mark: workspace element */
|
||||
zen-workspace {
|
||||
flex-direction: column;
|
||||
transition: padding-top 0.1s;
|
||||
width: calc(100% + var(--zen-toolbox-padding) * 2);
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
color: var(--toolbox-textcolor);
|
||||
|
||||
@media not (prefers-reduced-motion: reduce) {
|
||||
transition: padding-top 0.1s;
|
||||
}
|
||||
|
||||
:root:not([zen-sidebar-expanded='true']) & {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -130,10 +130,14 @@
|
||||
height: 22px;
|
||||
border: none;
|
||||
width: 100%;
|
||||
transition:
|
||||
height 0.08s ease-in-out,
|
||||
padding 0.08s ease-in-out,
|
||||
opacity 0.06s ease-in-out;
|
||||
|
||||
@media not (prefers-reduced-motion: reduce) {
|
||||
transition:
|
||||
height 0.08s ease-in-out,
|
||||
padding 0.08s ease-in-out,
|
||||
opacity 0.06s ease-in-out;
|
||||
}
|
||||
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
opacity: 1;
|
||||
|
||||
@@ -24,4 +24,6 @@ support-files = [
|
||||
|
||||
["browser_private_mode_startup.js"]
|
||||
|
||||
["browser_unload_all_other_spaces.js"]
|
||||
|
||||
["browser_workspace_bookmarks.js"]
|
||||
|
||||
162
src/zen/tests/spaces/browser_unload_all_other_spaces.js
Normal file
162
src/zen/tests/spaces/browser_unload_all_other_spaces.js
Normal file
@@ -0,0 +1,162 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
https://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
add_setup(async function () {});
|
||||
|
||||
// verify that with only one workspace, regular tabs should remain loaded
|
||||
add_task(async function test_UnloadAllOtherWorkspace_oneWorkspace() {
|
||||
const workspace =
|
||||
await gZenWorkspaces.createAndSaveWorkspace("Test Workspace");
|
||||
const workspaceId = workspace.uuid;
|
||||
await gZenWorkspaces.changeWorkspace(workspace);
|
||||
|
||||
const tabs = [];
|
||||
for (let i = 0; i < 3; i++) {
|
||||
const tab = await BrowserTestUtils.openNewForegroundTab(
|
||||
window.gBrowser,
|
||||
`data:text/html,<title>Hi! I am regular tab ${i}</title>`,
|
||||
true,
|
||||
{ skipAnimation: true }
|
||||
);
|
||||
tabs.push(tab);
|
||||
}
|
||||
|
||||
for (const tab of tabs) {
|
||||
ok(!tab.hasAttribute("pending"), "Tab should not be pending before unload");
|
||||
ok(tab.linkedPanel, "Tab should have linked panel before unload");
|
||||
}
|
||||
|
||||
await gZenWorkspaces.unloadAllOtherWorkspaces();
|
||||
|
||||
for (const tab of tabs) {
|
||||
ok(!tab.hasAttribute("pending"), "Tab should not be pending after unload");
|
||||
ok(tab.linkedPanel, "Tab should have linked panel after unload");
|
||||
}
|
||||
|
||||
await gZenWorkspaces.removeWorkspace(workspaceId);
|
||||
});
|
||||
|
||||
// with multiple workspaces, only regular tabs in other workspaces should be unloaded
|
||||
add_task(async function test_UnloadAllOtherWorkspace_multipleWorkspaces() {
|
||||
const inactiveWorkspace =
|
||||
await gZenWorkspaces.createAndSaveWorkspace("Inactive Workspace");
|
||||
const activeWorkspace =
|
||||
await gZenWorkspaces.createAndSaveWorkspace("Active Workspace");
|
||||
|
||||
const inactiveWorkspaceId = inactiveWorkspace.uuid;
|
||||
const activeWorkspaceId = activeWorkspace.uuid;
|
||||
|
||||
const inactiveWorkspaceTabs = [];
|
||||
for (let i = 0; i < 2; i++) {
|
||||
const tab = await BrowserTestUtils.openNewForegroundTab(
|
||||
gBrowser,
|
||||
`data:text/html,<title>Regular Tab ${i} in Inactive</title>`,
|
||||
true,
|
||||
{ skipAnimation: true }
|
||||
);
|
||||
tab.setAttribute("zen-workspace-id", inactiveWorkspaceId);
|
||||
inactiveWorkspaceTabs.push(tab);
|
||||
}
|
||||
|
||||
const activeWorkspaceTabs = [];
|
||||
for (let i = 0; i < 2; i++) {
|
||||
const tab = await BrowserTestUtils.openNewForegroundTab(
|
||||
gBrowser,
|
||||
`data:text/html,<title>Regular Tab ${i} in Active</title>`,
|
||||
true,
|
||||
{ skipAnimation: true }
|
||||
);
|
||||
tab.setAttribute("zen-workspace-id", activeWorkspaceId);
|
||||
activeWorkspaceTabs.push(tab);
|
||||
}
|
||||
|
||||
await gZenWorkspaces.unloadAllOtherWorkspaces();
|
||||
|
||||
for (const tab of activeWorkspaceTabs) {
|
||||
ok(
|
||||
!tab.hasAttribute("pending"),
|
||||
"Tab in active workspace should not be unloaded"
|
||||
);
|
||||
ok(tab.linkedPanel, "Tab in active workspace should have linked panel");
|
||||
}
|
||||
|
||||
for (const tab of inactiveWorkspaceTabs) {
|
||||
ok(
|
||||
tab.hasAttribute("pending"),
|
||||
"Tab in inactive workspace should be unloaded"
|
||||
);
|
||||
ok(
|
||||
!tab.linkedPanel,
|
||||
"Tab in inactive workspace should not have linked panel"
|
||||
);
|
||||
}
|
||||
await gZenWorkspaces.removeWorkspace(inactiveWorkspaceId);
|
||||
await gZenWorkspaces.removeWorkspace(activeWorkspaceId);
|
||||
});
|
||||
|
||||
// essentials in any workspace are not unloaded
|
||||
add_task(async function test_UnloadAllOtherWorkspace_essentials() {
|
||||
const activeWorkspace =
|
||||
await gZenWorkspaces.createAndSaveWorkspace("Active Workspace");
|
||||
const inactiveWorkspace =
|
||||
await gZenWorkspaces.createAndSaveWorkspace("Inactive Workspace");
|
||||
|
||||
const activeWorkspaceId = activeWorkspace.uuid;
|
||||
const inactiveWorkspaceId = inactiveWorkspace.uuid;
|
||||
|
||||
const activeWorkspaceTabs = [];
|
||||
for (let i = 0; i < 2; i++) {
|
||||
const tab = await BrowserTestUtils.openNewForegroundTab(
|
||||
gBrowser,
|
||||
`data:text/html,<title>Essential Tab ${i} in Active</title>`,
|
||||
true,
|
||||
{ skipAnimation: true }
|
||||
);
|
||||
tab.setAttribute("zen-workspace-id", activeWorkspaceId);
|
||||
tab.setAttribute("zen-essential", "true");
|
||||
activeWorkspaceTabs.push(tab);
|
||||
}
|
||||
|
||||
const inactiveWorkspaceTabs = [];
|
||||
for (let i = 0; i < 2; i++) {
|
||||
const tab = await BrowserTestUtils.openNewForegroundTab(
|
||||
gBrowser,
|
||||
`data:text/html,<title>Essential Tab ${i} in Inactive</title>`,
|
||||
true,
|
||||
{ skipAnimation: true }
|
||||
);
|
||||
gZenPinnedTabManager.addToEssentials(tab);
|
||||
inactiveWorkspaceTabs.push(tab);
|
||||
}
|
||||
|
||||
await gZenWorkspaces.unloadAllOtherWorkspaces();
|
||||
|
||||
for (const tab of activeWorkspaceTabs) {
|
||||
ok(
|
||||
!tab.hasAttribute("pending"),
|
||||
"Essential Tab in active workspace should not be unloaded"
|
||||
);
|
||||
ok(
|
||||
tab.linkedPanel,
|
||||
"Essential Tab in active workspace should have linked panel"
|
||||
);
|
||||
}
|
||||
|
||||
for (const tab of inactiveWorkspaceTabs) {
|
||||
ok(
|
||||
!tab.hasAttribute("pending"),
|
||||
"Essential Tab in inactive workspace should not be unloaded"
|
||||
);
|
||||
ok(
|
||||
tab.linkedPanel,
|
||||
"Essential Tab in inactive workspace should have linked panel"
|
||||
);
|
||||
}
|
||||
for (const tab of inactiveWorkspaceTabs) {
|
||||
gBrowser.removeTab(tab);
|
||||
}
|
||||
await gZenWorkspaces.removeWorkspace(inactiveWorkspaceId);
|
||||
await gZenWorkspaces.removeWorkspace(activeWorkspaceId);
|
||||
});
|
||||
@@ -20,7 +20,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.19.7b",
|
||||
"displayVersion": "1.19.8b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user