Merge branch 'dev' of https://github.com/zen-browser/desktop into dev
@@ -22,7 +22,7 @@ docs/issue-metrics/*.md
|
||||
|
||||
# Some CSS files are preprocessed and prettier doesn't handle them well
|
||||
# We also dont want to format the CSS files that are generated by the build
|
||||
src/zen/tabs/zen-tabs/vertical-tabs.css
|
||||
src/zen/tabs/zen-tabs.css
|
||||
src/zen/compact-mode/zen-compact-mode.css
|
||||
src/zen/common/ZenEmojies.mjs
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
## 🖥️ Compatibility
|
||||
|
||||
Zen is currently built using Firefox version `137.0.2`! 🚀
|
||||
Zen is currently built using Firefox version `138.0`! 🚀
|
||||
|
||||
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 138.0`!
|
||||
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
|
||||
|
||||
@@ -1 +1 @@
|
||||
7113caf804fda45f011f1900c25de638398d586e
|
||||
8113a66aeeec42dca9739c7b742a3408cb5b7cf7
|
||||
@@ -387,7 +387,7 @@ pref('zen.widget.linux.transparency', false);
|
||||
#endif
|
||||
|
||||
// Urlbar and autocomplete
|
||||
pref("browser.urlbar.maxRichResults", 6);
|
||||
pref("browser.urlbar.maxRichResults", 8);
|
||||
pref("browser.urlbar.trimHttps", true);
|
||||
pref("browser.search.separatePrivateDefault.ui.enabled", true);
|
||||
pref("browser.urlbar.update2.engineAliasRefresh", true);
|
||||
|
||||
@@ -51,8 +51,8 @@
|
||||
content/browser/zen-components/ZenTabUnloader.mjs (../../zen/tabs/ZenTabUnloader.mjs)
|
||||
content/browser/zen-components/ZenPinnedTabsStorage.mjs (../../zen/tabs/ZenPinnedTabsStorage.mjs)
|
||||
content/browser/zen-components/ZenPinnedTabManager.mjs (../../zen/tabs/ZenPinnedTabManager.mjs)
|
||||
content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css)
|
||||
* content/browser/zen-styles/zen-tabs/vertical-tabs.css (../../zen/tabs/zen-tabs/vertical-tabs.css)
|
||||
* content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css)
|
||||
content/browser/zen-styles/zen-tabs/vertical-tabs.css (../../zen/tabs/zen-tabs/vertical-tabs.css)
|
||||
|
||||
content/browser/zen-components/ZenGlanceManager.mjs (../../zen/glance/ZenGlanceManager.mjs)
|
||||
content/browser/zen-styles/zen-glance.css (../../zen/glance/zen-glance.css)
|
||||
@@ -92,3 +92,15 @@
|
||||
# JS Vendor
|
||||
content/browser/zen-vendor/tsparticles.confetti.bundle.min.js (../../zen/vendor/tsparticles.confetti.bundle.min.js)
|
||||
content/browser/zen-vendor/motion.min.mjs (../../zen/vendor/motion.min.mjs)
|
||||
|
||||
# FavIcons for startup
|
||||
content/browser/zen-images/favicons/calendar.ico (../../zen/images/favicons/calendar.ico)
|
||||
content/browser/zen-images/favicons/discord.ico (../../zen/images/favicons/discord.ico)
|
||||
content/browser/zen-images/favicons/figma.ico (../../zen/images/favicons/figma.ico)
|
||||
content/browser/zen-images/favicons/github.ico (../../zen/images/favicons/github.ico)
|
||||
content/browser/zen-images/favicons/notion.ico (../../zen/images/favicons/notion.ico)
|
||||
content/browser/zen-images/favicons/obsidian.ico (../../zen/images/favicons/obsidian.ico)
|
||||
content/browser/zen-images/favicons/slack.ico (../../zen/images/favicons/slack.ico)
|
||||
content/browser/zen-images/favicons/reddit.ico (../../zen/images/favicons/reddit.ico)
|
||||
content/browser/zen-images/favicons/x.ico (../../zen/images/favicons/x.ico)
|
||||
content/browser/zen-images/favicons/trello.ico (../../zen/images/favicons/trello.ico)
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..a469d122622fcf361eea8faa4a8d3a13a5a9e4f1 100644
|
||||
index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..2de9f51784a92442da84ead54312e879c1da127b 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
@@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -58,7 +58,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..a469d122622fcf361eea8faa4a8d3a13
|
||||
if (!this.#providesSearchMode(result)) {
|
||||
- this.view.close({ elementPicked: true });
|
||||
+ if (this._zenHandleUrlbarClose) {
|
||||
+ this._zenHandleUrlbarClose(true);
|
||||
+ this._zenHandleUrlbarClose(true, true);
|
||||
+ } else {
|
||||
+ this.view.close({ elementPicked: true });
|
||||
+ }
|
||||
@@ -108,6 +108,15 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..a469d122622fcf361eea8faa4a8d3a13
|
||||
this.removeAttribute("breakout-extend");
|
||||
this.#updateTextboxPosition();
|
||||
}
|
||||
@@ -2485,7 +2529,7 @@ export class UrlbarInput {
|
||||
|
||||
this.textbox.parentNode.style.setProperty(
|
||||
"--urlbar-container-height",
|
||||
- px(getBoundsWithoutFlushing(this.textbox.parentNode).height)
|
||||
+ px(getBoundsWithoutFlushing(this.textbox.parentNode).height + 8)
|
||||
);
|
||||
this.textbox.style.setProperty(
|
||||
"--urlbar-height",
|
||||
@@ -2998,7 +3042,7 @@ export class UrlbarInput {
|
||||
*/
|
||||
_trimValue(val) {
|
||||
@@ -158,7 +167,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..a469d122622fcf361eea8faa4a8d3a13
|
||||
}
|
||||
|
||||
_on_click(event) {
|
||||
+ if (lazy.ZEN_URLBAR_BEHAVIOR === 'float' && event.target == this.inputField) {
|
||||
+ if (event.target == this.inputField) {
|
||||
+ event.zenOriginalTarget = this.textbox;
|
||||
+ this._on_mousedown(event);
|
||||
+ }
|
||||
@@ -183,7 +192,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..a469d122622fcf361eea8faa4a8d3a13
|
||||
+ switch (event.zenOriginalTarget || event.currentTarget) {
|
||||
case this.textbox: {
|
||||
this._mousedownOnUrlbarDescendant = true;
|
||||
+ if (event.type != "click" && lazy.ZEN_URLBAR_BEHAVIOR === 'float') {
|
||||
+ if (event.type != "click") {
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/themes/shared/urlbar-searchbar.css b/browser/themes/shared/urlbar-searchbar.css
|
||||
index 574f83af7fa49ddcdff6711ca8b1d3bed1a35e0c..c2e8cb8b37438176db07a47e1e975ae1aea42252 100644
|
||||
index e237ee9edea85c1d2ef22f988df6b22755e343e6..b06fc06686a7a969e924ad0df662dec937b3c70d 100644
|
||||
--- a/browser/themes/shared/urlbar-searchbar.css
|
||||
+++ b/browser/themes/shared/urlbar-searchbar.css
|
||||
@@ -5,7 +5,7 @@
|
||||
@@ -7,11 +7,11 @@ index 574f83af7fa49ddcdff6711ca8b1d3bed1a35e0c..c2e8cb8b37438176db07a47e1e975ae1
|
||||
|
||||
:root {
|
||||
- --urlbar-container-padding: 1px;
|
||||
+ --urlbar-container-padding: 4px;
|
||||
+ --urlbar-container-padding: 2px;
|
||||
--urlbar-margin-inline: 5px;
|
||||
--urlbar-padding-block: 4px;
|
||||
}
|
||||
@@ -291,7 +291,9 @@
|
||||
@@ -292,7 +292,9 @@
|
||||
}
|
||||
|
||||
#urlbar[breakout][breakout-extend] {
|
||||
|
||||
@@ -324,7 +324,8 @@
|
||||
}
|
||||
|
||||
/* security */
|
||||
.identity-popup-security-connection {
|
||||
.identity-popup-security-connection,
|
||||
#appMenu-report-broken-site-button {
|
||||
list-style-image: url('security-broken.svg') !important;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/testing/profiles/mochitest/user.js b/testing/profiles/mochitest/user.js
|
||||
index a4068ac3f61161d014c49d54ae7a3bf886868f1b..b9861cfaae19a4a71b75ccc73095dc602df22b12 100644
|
||||
index a4068ac3f61161d014c49d54ae7a3bf886868f1b..6af5907abb46b6d3b871c159c73eec8373ee8ef5 100644
|
||||
--- a/testing/profiles/mochitest/user.js
|
||||
+++ b/testing/profiles/mochitest/user.js
|
||||
@@ -41,3 +41,9 @@ user_pref("places.history.floodingPrevention.enabled", false);
|
||||
@@ -41,3 +41,10 @@ user_pref("places.history.floodingPrevention.enabled", false);
|
||||
// permission, and we can open it and wait for the user to give permission, then
|
||||
// don't do that.
|
||||
user_pref("geo.prompt.open_system_prefs", false);
|
||||
@@ -12,3 +12,4 @@ index a4068ac3f61161d014c49d54ae7a3bf886868f1b..b9861cfaae19a4a71b75ccc73095dc60
|
||||
+user_pref("zen.watermark.enabled", false);
|
||||
+user_pref("zen.urlbar.replace-newtab", false);
|
||||
+user_pref("zen.testing.enabled", true);
|
||||
+user_pref("dom.security.https_only_mode", false); // Dont ask why
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
diff --git a/testing/profiles/profileserver/user.js b/testing/profiles/profileserver/user.js
|
||||
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..a68a1f692e050c2a2a7e5e1390dec9556e71d7ed 100644
|
||||
index 19ff7d474f6d22d2d386764e2e6942ce6a324470..b8a915b921e624c416d2ec379a2b54aedfcf9c36 100644
|
||||
--- a/testing/profiles/profileserver/user.js
|
||||
+++ b/testing/profiles/profileserver/user.js
|
||||
@@ -8,3 +8,11 @@
|
||||
@@ -8,3 +8,12 @@
|
||||
user_pref("dom.timeout.enable_budget_timer_throttling", false);
|
||||
// Turn off update
|
||||
user_pref("app.update.disabledForTesting", true);
|
||||
@@ -14,3 +14,4 @@ index 19ff7d474f6d22d2d386764e2e6942ce6a324470..a68a1f692e050c2a2a7e5e1390dec955
|
||||
+user_pref("zen.watermark.enabled", false);
|
||||
+user_pref("zen.urlbar.replace-newtab", false);
|
||||
+user_pref("zen.testing.enabled", true);
|
||||
+user_pref("dom.security.https_only_mode", false); // Dont ask why
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
diff --git a/toolkit/modules/ShortcutUtils.sys.mjs b/toolkit/modules/ShortcutUtils.sys.mjs
|
||||
index 360a7dbeeae3899af01945e35d5fe3aa0cb3c562..895d39fe5887ffae9cdbce9576df8b00d4cc8442 100644
|
||||
index 360a7dbeeae3899af01945e35d5fe3aa0cb3c562..354c0c9e65e443682a2b12113bc618af9e07910f 100644
|
||||
--- a/toolkit/modules/ShortcutUtils.sys.mjs
|
||||
+++ b/toolkit/modules/ShortcutUtils.sys.mjs
|
||||
@@ -382,12 +382,12 @@ export var ShortcutUtils = {
|
||||
@@ -140,6 +140,7 @@ export var ShortcutUtils = {
|
||||
key = keyCode.replace(/^VK_/, "");
|
||||
}
|
||||
} else {
|
||||
+ if (!keyAttribute) return "";
|
||||
key = keyAttribute.toUpperCase();
|
||||
}
|
||||
|
||||
@@ -382,12 +383,12 @@ export var ShortcutUtils = {
|
||||
return ShortcutUtils.MOVE_TAB_FORWARD;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -36,6 +36,7 @@ class ZenMultiWindowFeature {
|
||||
}
|
||||
for (const browser of ZenMultiWindowFeature.browsers) {
|
||||
try {
|
||||
if (browser.closed) continue;
|
||||
await callback(browser);
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
||||
@@ -77,7 +77,7 @@ export var ZenCustomizableUI = new (class {
|
||||
});
|
||||
|
||||
// remove all styles except for the width, since we are xulstoring the complet style list
|
||||
const width = toolbox.style.width || '180px';
|
||||
const width = toolbox.style.width || '228px';
|
||||
toolbox.removeAttribute('style');
|
||||
toolbox.style.width = width;
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ var gZenUIManager = {
|
||||
this._lastSearch = '';
|
||||
},
|
||||
|
||||
handleUrlbarClose(onSwitch) {
|
||||
handleUrlbarClose(onSwitch = false, onElementPicked = false) {
|
||||
// Validate browser state first
|
||||
if (!this._validateBrowserState()) {
|
||||
console.warn('Browser state invalid for URL bar close operation');
|
||||
@@ -350,27 +350,29 @@ var gZenUIManager = {
|
||||
}
|
||||
|
||||
// Handle search data
|
||||
if (onSwitch) {
|
||||
this.clearUrlbarData();
|
||||
} else {
|
||||
this._lastSearch = gURLBar._untrimmedValue || '';
|
||||
if (!onElementPicked) {
|
||||
if (onSwitch) {
|
||||
this.clearUrlbarData();
|
||||
} else {
|
||||
this._lastSearch = gURLBar._untrimmedValue || '';
|
||||
|
||||
if (this._clearTimeout) {
|
||||
clearTimeout(this._clearTimeout);
|
||||
if (this._clearTimeout) {
|
||||
clearTimeout(this._clearTimeout);
|
||||
}
|
||||
|
||||
this._clearTimeout = setTimeout(() => {
|
||||
this.clearUrlbarData();
|
||||
}, this.urlbarWaitToClear);
|
||||
}
|
||||
|
||||
this._clearTimeout = setTimeout(() => {
|
||||
this.clearUrlbarData();
|
||||
}, this.urlbarWaitToClear);
|
||||
}
|
||||
// Safely restore URL bar state with proper validation
|
||||
if (this._prevUrlbarLabel) {
|
||||
gURLBar.setURI(this._prevUrlbarLabel, onSwitch, false, false, !onSwitch);
|
||||
}
|
||||
|
||||
// Safely restore URL bar state with proper validation
|
||||
if (this._prevUrlbarLabel) {
|
||||
gURLBar.setURI(this._prevUrlbarLabel, onSwitch, false, false, !onSwitch);
|
||||
gURLBar.handleRevert();
|
||||
}
|
||||
|
||||
gURLBar.handleRevert();
|
||||
|
||||
if (gURLBar.focused) {
|
||||
gURLBar.view.close({ elementPicked: onSwitch });
|
||||
gURLBar.updateTextOverflow();
|
||||
|
||||
@@ -20,20 +20,12 @@ panel[type='arrow'][animate='open'] {
|
||||
}
|
||||
}
|
||||
}
|
||||
@media (-moz-platform: windows) and (not (-moz-windows-mica-popups)) {
|
||||
@media (-moz-platform: linux) or ((-moz-platform: windows) and (not (-moz-windows-mica-popups))) {
|
||||
/* Mica popups have a weird background while the animation is running */
|
||||
&::part(content) {
|
||||
animation: zen-jello-animation 0.35s ease;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-platform: linux) {
|
||||
/* Check https://github.com/zen-browser/desktop/issues/7633 as in
|
||||
* to why we dont animate addons */
|
||||
&:not(#customizationui-widget-panel)::part(content) {
|
||||
animation: zen-jello-animation 0.35s ease;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
panel[type='arrow'][animate]:not([animate='open']) {
|
||||
|
||||
@@ -9,19 +9,30 @@
|
||||
padding-block: 0 !important;
|
||||
}
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
--urlbar-container-padding: 4px;
|
||||
& #urlbar:not([breakout-extend='true']) {
|
||||
padding: 1px;
|
||||
--toolbarbutton-border-radius: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
#urlbar {
|
||||
--toolbarbutton-border-radius: 8px;
|
||||
--urlbarView-separator-color: light-dark(hsl(0, 0%, 90%), hsl(0, 0%, 20%));
|
||||
--urlbarView-hover-background: var(--toolbarbutton-hover-background);
|
||||
--urlbarView-highlight-background: var(--toolbarbutton-hover-background);
|
||||
border-radius: var(--toolbarbutton-border-radius);
|
||||
padding: 1px;
|
||||
border-radius: calc(var(--toolbarbutton-border-radius) - 2px);
|
||||
--urlbarView-results-padding: 10px !important;
|
||||
|
||||
:root:not([zen-single-toolbar='true']) &[zen-floating-urlbar='true'] {
|
||||
--urlbar-container-padding: 2px !important;
|
||||
}
|
||||
}
|
||||
|
||||
:root:not([zen-single-toolbar='true']) #urlbar:not([zen-floating-urlbar='true']) {
|
||||
--urlbarView-results-padding: 6px !important;
|
||||
}
|
||||
|
||||
.urlbar-input::placeholder {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
@@ -84,8 +95,11 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#urlbar:not([breakout-extend='true']) #identity-box {
|
||||
:root[zen-single-toolbar='true'] #urlbar:not([breakout-extend='true']) #identity-box {
|
||||
margin-inline-end: 0 !important;
|
||||
&.chromeUI:not([pageproxystate='invalid']) #identity-icon-box {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
.urlbar-page-action,
|
||||
@@ -177,7 +191,7 @@
|
||||
transform: none !important;
|
||||
display: flex;
|
||||
#urlbar:not(:hover) & {
|
||||
transition: 0;
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,11 +339,6 @@ button.popup-notification-dropmarker {
|
||||
border-radius: var(--urlbar-icon-border-radius) !important;
|
||||
}
|
||||
|
||||
/* Extensions or similar */
|
||||
#urlbar:not([breakout-extend='true']) #identity-box.chromeUI:not([pageproxystate='invalid']) #identity-icon-box {
|
||||
border-radius: 10px !important;
|
||||
}
|
||||
|
||||
/* Notification Stack */
|
||||
|
||||
.notificationbox-stack {
|
||||
@@ -407,7 +416,7 @@ button.popup-notification-dropmarker {
|
||||
|
||||
#urlbar[open] {
|
||||
z-index: 2;
|
||||
--urlbar-margin-inline: 5px !important;
|
||||
--urlbar-margin-inline: 5px;
|
||||
|
||||
& #identity-box {
|
||||
margin-right: var(--urlbar-margin-inline);
|
||||
@@ -538,4 +547,8 @@ button.popup-notification-dropmarker {
|
||||
color: color-mix(in srgb, var(--zen-colors-primary) 30%, lightgray) !important;
|
||||
}
|
||||
}
|
||||
|
||||
&[selected] {
|
||||
background-color: color-mix(in srgb, var(--zen-primary-color) 50%, transparent 50%) !important;
|
||||
}
|
||||
}
|
||||
|
||||
BIN
src/zen/images/favicons/calendar.ico
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
src/zen/images/favicons/discord.ico
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/zen/images/favicons/figma.ico
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
src/zen/images/favicons/github.ico
Normal file
|
After Width: | Height: | Size: 41 KiB |
BIN
src/zen/images/favicons/notion.ico
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
src/zen/images/favicons/obsidian.ico
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
src/zen/images/favicons/reddit.ico
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
src/zen/images/favicons/slack.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
src/zen/images/favicons/trello.ico
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
src/zen/images/favicons/x.ico
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
@@ -83,8 +83,23 @@
|
||||
|
||||
onTabIconChanged(tab, url = null) {
|
||||
const iconUrl = url ?? tab.iconImage.src;
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
tab.querySelector('.tab-background').style.setProperty('--zen-tab-icon', `url(${iconUrl})`);
|
||||
if (!iconUrl) {
|
||||
try {
|
||||
setTimeout(() => {
|
||||
PlacesUtils.favicons.getFaviconURLForPage(
|
||||
tab.linkedBrowser.currentURI,
|
||||
(url) => {
|
||||
if (url) gBrowser.setIcon(tab, url.spec);
|
||||
},
|
||||
|
||||
0
|
||||
);
|
||||
});
|
||||
} catch {}
|
||||
} else {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
tab.querySelector('.tab-background').style.setProperty('--zen-tab-icon', `url(${iconUrl})`);
|
||||
}
|
||||
}
|
||||
// TODO: work on this
|
||||
//if (tab.hasAttribute('zen-pinned-changed') || !this._pinsCache) {
|
||||
@@ -570,9 +585,9 @@
|
||||
const state = JSON.parse(tabState);
|
||||
|
||||
const foundEntryIndex = state.entries?.findIndex((entry) => entry.url === pin.url);
|
||||
if (!foundEntryIndex || foundEntryIndex === -1) {
|
||||
if (foundEntryIndex === -1) {
|
||||
state.entries = [
|
||||
{
|
||||
[state.entries[0]] ?? {
|
||||
url: pin.url,
|
||||
title: pin.title,
|
||||
triggeringPrincipal_base64: lazy.E10SUtils.SERIALIZED_SYSTEMPRINCIPAL,
|
||||
|
||||
@@ -16,3 +16,100 @@
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Single Toolbar Mode - Top Bar Handling (Includes External CSS)
|
||||
========================================================================== */
|
||||
:root[zen-single-toolbar='true']:not([customizing]) {
|
||||
#zen-appcontent-navbar-container {
|
||||
display: flex;
|
||||
-moz-window-dragging: drag; /* Allow dragging the window via this bar */
|
||||
min-height: var(--zen-element-separation);
|
||||
height: var(--zen-element-separation);
|
||||
|
||||
/* Ensure Personal Toolbar takes available width */
|
||||
& #PersonalToolbar {
|
||||
width: -moz-available;
|
||||
}
|
||||
|
||||
/* Include styles for the top bar under certain conditions:
|
||||
* - Bookmarks toolbar is visible OR
|
||||
* - The container is explicitly marked to hide controls (e.g., on Linux with reversed controls)
|
||||
*/
|
||||
&:has(#PersonalToolbar[collapsed='false']) {
|
||||
%include zen-tabs/vertical-tabs-topbar.inc.css
|
||||
}
|
||||
&[should-hide='true'] {
|
||||
%include zen-tabs/vertical-tabs-topbar.inc.css
|
||||
}
|
||||
|
||||
/* Hide the top bar completely in fullscreen mode */
|
||||
:root[inDOMFullscreen='true'] & {
|
||||
max-height: 0 !important;
|
||||
min-height: unset !important;
|
||||
opacity: 0 !important;
|
||||
pointer-events: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* ==========================================================================
|
||||
Very Special Occasions - Complex Layout Fixes
|
||||
========================================================================== */
|
||||
|
||||
/* Exclude these complex fixes if in compact mode */
|
||||
:root:not([zen-compact-mode='true']) {
|
||||
|
||||
/* --- Fix: Right Sidebar + Collapsed + Standard Window Buttons --- */
|
||||
&[zen-right-side='true']:not([zen-sidebar-expanded='true']):not([zen-window-buttons-reversed='true']) {
|
||||
/* Push toolbox down below the top toolbar */
|
||||
& #navigator-toolbox {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
/* Pull window buttons container leftwards over the collapsed sidebar */
|
||||
& .titlebar-buttonbox-container {
|
||||
margin-right: calc(-1 * var(--zen-toolbox-max-width)) !important;
|
||||
}
|
||||
/* Allow overflow for the button box */
|
||||
& #zen-appcontent-wrapper {
|
||||
overflow-x: visible;
|
||||
}
|
||||
/* Reset padding for top buttons */
|
||||
& #zen-sidebar-top-buttons-customization-target {
|
||||
padding-top: 0;
|
||||
}
|
||||
/* Add padding to the left of the nav container */
|
||||
& #zen-appcontent-navbar-container {
|
||||
padding-left: var(--zen-element-separation);
|
||||
}
|
||||
/* Include common fixes for this top-button scenario */
|
||||
%include zen-tabs/vertical-tabs-topbuttons-fix.css
|
||||
}
|
||||
|
||||
/* --- Fix: Left Sidebar + Collapsed + Reversed Window Buttons --- */
|
||||
&:not([zen-right-side='true']):not([zen-sidebar-expanded='true'])[zen-window-buttons-reversed='true'] {
|
||||
/* Push toolbox down below the top toolbar */
|
||||
& #navigator-toolbox {
|
||||
margin-top: var(--zen-toolbar-height) !important;
|
||||
}
|
||||
/* Pull window buttons container rightwards over the collapsed sidebar */
|
||||
& .titlebar-buttonbox-container {
|
||||
margin-left: calc(-1 * var(--zen-toolbox-max-width) + var(--zen-toolbox-padding) / 2) !important;
|
||||
}
|
||||
/* Allow overflow for the button box */
|
||||
& #zen-appcontent-wrapper {
|
||||
overflow-x: visible;
|
||||
}
|
||||
/* Reset padding for top buttons */
|
||||
& #zen-sidebar-top-buttons-customization-target {
|
||||
padding-top: 0;
|
||||
}
|
||||
/* Add padding to the right of the nav container */
|
||||
& #zen-appcontent-navbar-container {
|
||||
padding-right: var(--zen-element-separation);
|
||||
}
|
||||
/* Include common fixes for this top-button scenario */
|
||||
%include zen-tabs/vertical-tabs-topbuttons-fix.css
|
||||
}
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
["browser_zen_workspaces.js"]
|
||||
["workspaces/browser_basic_workspaces.js"]
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
https://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
'use strict';
|
||||
|
||||
add_task(async function test_TODO() {
|
||||
ok(true, 'TODO: implement the test');
|
||||
});
|
||||
13
src/zen/tests/workspaces/browser_basic_workspaces.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
https://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
'use strict';
|
||||
|
||||
add_setup(async function () {
|
||||
await ZenWorkspaces.createAndSaveWorkspace('Test Workspace 2');
|
||||
});
|
||||
|
||||
add_task(async function test_Check_Creation() {
|
||||
const workspaces = await ZenWorkspaces._workspaces();
|
||||
ok(workspaces.workspaces.length, 2);
|
||||
});
|
||||
@@ -68,10 +68,9 @@
|
||||
|
||||
async function setCachedFaviconForURL(pageUrl, iconURL) {
|
||||
try {
|
||||
// TODO: This always return "NS_ERROR_NOT_AVAILABLE" for some reason, figure out why
|
||||
await PlacesUtils.favicons.setFaviconForPage(
|
||||
Services.io.newURI(pageUrl),
|
||||
Services.io.newURI('fake-favicon-uri:' + pageUrl),
|
||||
Services.io.newURI(iconURL),
|
||||
Services.io.newURI(iconURL)
|
||||
);
|
||||
} catch (ex) {
|
||||
@@ -81,9 +80,21 @@
|
||||
|
||||
async function openInitialPinTab() {
|
||||
const tabs = [
|
||||
['https://reddit.com/r/zen_browser', 'Zen on Reddit', 'https://private-cdn.zen-browser.app/reddit.png'],
|
||||
['https://x.com/zen_browser', 'Zen on Twitter', 'https://private-cdn.zen-browser.app/x.png'],
|
||||
['https://reddit.com/r/zen_browser', 'Zen on Reddit', 'chrome://browser/content/zen-images/favicons/reddit.ico'],
|
||||
['https://x.com/zen_browser', 'Zen on Twitter', 'chrome://browser/content/zen-images/favicons/x.ico'],
|
||||
];
|
||||
|
||||
await PlacesUtils.history.insertMany(
|
||||
tabs.map((site) => ({
|
||||
url: site[0],
|
||||
visits: [
|
||||
{
|
||||
transition: PlacesUtils.history.TRANSITIONS.TYPED,
|
||||
},
|
||||
],
|
||||
}))
|
||||
);
|
||||
|
||||
for (const site of tabs) {
|
||||
const tab = window.gBrowser.addTrustedTab(site[0], {
|
||||
inBackground: true,
|
||||
@@ -376,47 +387,47 @@
|
||||
<html:div></html:div>
|
||||
</hbox>
|
||||
<html:div id="zen-welcome-initial-essentials-browser-sidebar-essentials">
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://obsidian.md" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/obsidian.ico');">
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://obsidian.md" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/obsidian.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" visuallyselected="" data-url="https://discord.com" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/discord.png');">
|
||||
<html:div class="tabbrowser-tab" fadein="" visuallyselected="" data-url="https://discord.com" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/discord.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://trello.com" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/trello.ico');">
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://trello.com" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/trello.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://slack.com/" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/slack.png');">
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://slack.com/" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/slack.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" visuallyselected="" data-url="https://github.com" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/github.png');">
|
||||
<html:div class="tabbrowser-tab" fadein="" visuallyselected="" data-url="https://github.com" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/github.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://twitter.com" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/x.png');">
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://twitter.com" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/x.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" visuallyselected="" data-url="https://notion.com" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/notion.ico');">
|
||||
<html:div class="tabbrowser-tab" fadein="" visuallyselected="" data-url="https://notion.com" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/notion.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://calendar.google.com" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/calendar.ico');">
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://calendar.google.com" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/calendar.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
</html:div>
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://youtube.com" style="--zen-tab-icon: url('https://private-cdn.zen-browser.app/youtube.ico');">
|
||||
<html:div class="tabbrowser-tab" fadein="" data-url="https://figma.com" style="--zen-tab-icon: url('chrome://browser/content/zen-images/favicons/figma.ico');">
|
||||
<stack class="tab-stack">
|
||||
<html:div class="tab-background"></html:div>
|
||||
</stack>
|
||||
@@ -443,6 +454,18 @@
|
||||
const selectedTabs = document
|
||||
.getElementById('zen-welcome-initial-essentials-browser-sidebar-essentials')
|
||||
.querySelectorAll('.tabbrowser-tab[visuallyselected]');
|
||||
|
||||
await PlacesUtils.history.insertMany(
|
||||
[...selectedTabs].map((tab) => ({
|
||||
url: tab.getAttribute('data-url'),
|
||||
visits: [
|
||||
{
|
||||
transition: PlacesUtils.history.TRANSITIONS.TYPED,
|
||||
},
|
||||
],
|
||||
}))
|
||||
);
|
||||
|
||||
for (const tab of selectedTabs) {
|
||||
const url = tab.getAttribute('data-url');
|
||||
const createdTab = window.gBrowser.addTrustedTab(url, {
|
||||
|
||||
@@ -370,7 +370,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
let essentialsContainer = document.querySelector(`.zen-essentials-container[container="${container}"]:not([cloned])`);
|
||||
if (!essentialsContainer) {
|
||||
essentialsContainer = document.createXULElement('vbox');
|
||||
essentialsContainer = document.createXULElement('hbox');
|
||||
essentialsContainer.className = 'zen-essentials-container zen-workspace-tabs-section';
|
||||
essentialsContainer.setAttribute('flex', '1');
|
||||
essentialsContainer.setAttribute('container', container);
|
||||
@@ -678,7 +678,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
|
||||
get workspaceEnabled() {
|
||||
if (typeof this._workspaceEnabled === 'undefined') {
|
||||
this._workspaceEnabled = !gZenUIManager.testingEnabled && this.shouldHaveWorkspaces;
|
||||
this._workspaceEnabled = this.shouldHaveWorkspaces;
|
||||
}
|
||||
return this._workspaceEnabled && !window.closed;
|
||||
}
|
||||
@@ -2386,6 +2386,16 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
);
|
||||
const workspaceObject = this.getWorkspaceFromId(workspaceId);
|
||||
const essentialContainer = this.getEssentialsSection(workspaceObject.containerTabId);
|
||||
const essentialNumChildren = essentialContainer.children.length;
|
||||
let essentialHackType = 0;
|
||||
if (essentialNumChildren % 3 === 0) {
|
||||
essentialHackType = 3;
|
||||
}
|
||||
if (essentialHackType > 0) {
|
||||
essentialContainer.setAttribute('data-hack-type', essentialHackType);
|
||||
} else {
|
||||
essentialContainer.removeAttribute('data-hack-type');
|
||||
}
|
||||
this._updateMarginTopPinnedTabs(arrowScrollbox, pinnedContainer, essentialContainer, workspaceIndicator, forAnimation);
|
||||
this.updateShouldHideSeparator(arrowScrollbox, pinnedContainer);
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
"appId": "zen",
|
||||
"binaryName": "zen",
|
||||
"version": {
|
||||
"product": "firefox-beta",
|
||||
"version": "137.0.2",
|
||||
"product": "firefox",
|
||||
"version": "138.0",
|
||||
"candidate": "138.0"
|
||||
},
|
||||
"buildOptions": {
|
||||
|
||||