From 98448b95721017156e745d30b2de35c4c454e837 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Fri, 2 May 2025 17:11:47 +0200 Subject: [PATCH 1/9] chore: Added support for hidden sidebar with opened urlbar, b=(no-bug), c=compact-mode --- src/zen/compact-mode/zen-compact-mode.css | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/zen/compact-mode/zen-compact-mode.css b/src/zen/compact-mode/zen-compact-mode.css index 8f5d0eb5f..263a841e8 100644 --- a/src/zen/compact-mode/zen-compact-mode.css +++ b/src/zen/compact-mode/zen-compact-mode.css @@ -55,10 +55,11 @@ transition: left 0.15s ease, right 0.15s ease, - opacity 1.5s ease; + visibility 0.15s ease; top: 0; bottom: var(--zen-element-separation); padding: 0 var(--zen-compact-float) !important; + visibility: hidden; :root[zen-single-toolbar='true'] & { top: calc(var(--zen-element-separation) / 2); @@ -76,7 +77,7 @@ } &:not([zen-right-side='true']) #navigator-toolbox { - left: calc(-1 * var(--actual-zen-sidebar-width) + 0.1px); + left: calc(-1 * var(--actual-zen-sidebar-width) + 1px); } /* When we have multiple toolbars and the top-toolbar is NOT being hidden, @@ -96,7 +97,7 @@ &[zen-right-side='true'] { & #navigator-toolbox:not([animate='true']) { - right: calc(-1 * var(--actual-zen-sidebar-width) + 0.1px); + right: calc(-1 * var(--actual-zen-sidebar-width) + 1px); } & .browserSidebarContainer { @@ -113,6 +114,7 @@ outline: 1px solid var(--zen-colors-border-contrast); outline-offset: -1px; min-width: var(--zen-toolbox-min-width); + box-shadow: var(--zen-big-shadow); :root[zen-sidebar-expanded='true'] & { width: calc(var(--zen-sidebar-width) + var(--zen-toolbox-padding)); @@ -163,6 +165,8 @@ #navigator-toolbox:has( *:is([panelopen='true'], [open='true'], #urlbar:focus-within):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore) ) { + visibility: visible; + &:not([animate='true']) { --zen-compact-mode-func: linear( 0 0%, @@ -277,16 +281,11 @@ right var(--zen-compact-mode-time) var(--zen-compact-mode-func); &:not([supress-primary-adjustment='true']) { - opacity: 1; left: calc(var(--zen-element-separation) / -2); :root[zen-right-side='true'] & { right: calc(var(--zen-element-separation) / -2); left: auto; - } - - & #titlebar { - box-shadow: var(--zen-big-shadow); - } + } } } } From 71558dca716892327ec94f9176ddac75a2f2e820 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Fri, 2 May 2025 18:04:05 +0200 Subject: [PATCH 2/9] fix: Fixed sidebar not appearing from the right side on linux, b=(no-bug), c=common, compact-mode --- src/build/moz-configure/init-configure.patch | 14 --------- src/zen/common/ZenUIManager.mjs | 4 --- src/zen/compact-mode/zen-compact-mode.css | 31 ++++++++------------ 3 files changed, 12 insertions(+), 37 deletions(-) delete mode 100644 src/build/moz-configure/init-configure.patch diff --git a/src/build/moz-configure/init-configure.patch b/src/build/moz-configure/init-configure.patch deleted file mode 100644 index 8733040aa..000000000 --- a/src/build/moz-configure/init-configure.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure -index 9bf4bb29a40045da21909dc1a2a49dbca5d6ac3e..bb594ec0a0e00760763bb3f6313e9cf576f2c4b7 100644 ---- a/build/moz.configure/init.configure -+++ b/build/moz.configure/init.configure -@@ -1101,7 +1101,8 @@ def milestone(build_env, build_project, version_path, as_milestone, _): - - is_nightly = is_release_or_beta = None - -- if "a1" in milestone: -+ is_nightly = True -+ if "t" in milestone: - is_nightly = True - elif "a" not in milestone: - is_release_or_beta = True diff --git a/src/zen/common/ZenUIManager.mjs b/src/zen/common/ZenUIManager.mjs index 8e17e3d85..8aee8398a 100644 --- a/src/zen/common/ZenUIManager.mjs +++ b/src/zen/common/ZenUIManager.mjs @@ -277,10 +277,6 @@ var gZenUIManager = { await new Promise((resolve) => setTimeout(resolve, 10)); document.getElementById('Browser:OpenLocation').doCommand(); - - // Wait for URL bar to be ready - await new Promise((resolve) => setTimeout(resolve, 10)); - gURLBar.search(this._lastSearch || ''); } catch (e) { console.error('Error opening location in new tab:', e); diff --git a/src/zen/compact-mode/zen-compact-mode.css b/src/zen/compact-mode/zen-compact-mode.css index ceadf30dd..68a6adf3e 100644 --- a/src/zen/compact-mode/zen-compact-mode.css +++ b/src/zen/compact-mode/zen-compact-mode.css @@ -5,16 +5,6 @@ */ /* All overrides for compact mode go here */ -:root { - --zen-compact-mode-offset: 0.1px; - - @media not (-moz-platform: macos) { - &[sizemode='maximized'][zen-right-side='true'] { - --zen-compact-mode-offset: 1px; - } - } -} - :root[zen-compact-mode='true']:not([customizing]):not([inDOMFullscreen='true']) { %include ../tabs/zen-tabs/vertical-tabs-topbuttons-fix.css @media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') { @@ -54,11 +44,15 @@ #navigator-toolbox { --zen-toolbox-max-width: 48px !important; - --zen-compact-float: var(--zen-element-separation); + --zen-compact-float: max(var(--zen-element-separation), 4px); /* Initial padding for when we are animating */ padding: 0 0 0 var(--zen-toolbox-padding) !important; + & #urlbar { + visibility: visible; + } + &:not([animate='true']) { position: fixed; z-index: 10; @@ -69,7 +63,6 @@ top: 0; bottom: var(--zen-element-separation); padding: 0 var(--zen-compact-float) !important; - visibility: hidden; :root[zen-single-toolbar='true'] & { top: calc(var(--zen-element-separation) / 2); @@ -125,6 +118,8 @@ outline-offset: -1px; min-width: var(--zen-toolbox-min-width); box-shadow: var(--zen-big-shadow); + transition: visibility 0.15s; /* Same as the toolbox */ + visibility: hidden; :root[zen-sidebar-expanded='true'] & { width: calc(var(--zen-sidebar-width) + var(--zen-toolbox-padding)); @@ -144,11 +139,6 @@ * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_display/Containing_block#identifying_the_containing_block */ } - & #urlbar[open][zen-floating-urlbar='true'] { - transition: left 0.05s ease; - visibility: visible; - } - &::before { content: ''; position: absolute; @@ -175,8 +165,6 @@ #navigator-toolbox:has( *:is([panelopen='true'], [open='true'], #urlbar:focus-within):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore) ) { - visibility: visible; - &:not([animate='true']) { --zen-compact-mode-func: linear( 0 0%, @@ -291,6 +279,11 @@ right var(--zen-compact-mode-time) var(--zen-compact-mode-func); &:not([supress-primary-adjustment='true']) { + & #titlebar { + transition: none; + visibility: visible; + } + left: calc(var(--zen-element-separation) / -2); :root[zen-right-side='true'] & { right: calc(var(--zen-element-separation) / -2); From 8a72d253aa5dbe7fd721eb8494b537f0554769a7 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Fri, 2 May 2025 18:38:34 +0200 Subject: [PATCH 3/9] style: Fixed minimum floating size of 4px for compact mode, b=(no-bug), c=compact-mode --- src/zen/compact-mode/zen-compact-mode.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zen/compact-mode/zen-compact-mode.css b/src/zen/compact-mode/zen-compact-mode.css index 68a6adf3e..38cbb0351 100644 --- a/src/zen/compact-mode/zen-compact-mode.css +++ b/src/zen/compact-mode/zen-compact-mode.css @@ -44,7 +44,7 @@ #navigator-toolbox { --zen-toolbox-max-width: 48px !important; - --zen-compact-float: max(var(--zen-element-separation), 4px); + --zen-compact-float: var(--zen-element-separation); /* Initial padding for when we are animating */ padding: 0 0 0 var(--zen-toolbox-padding) !important; From 2550b2fe417f7b40de9cfb97ce0ad899fbbf49ab Mon Sep 17 00:00:00 2001 From: Alvin Joy <89687635+alvinsjoy@users.noreply.github.com> Date: Sat, 3 May 2025 00:43:39 +0530 Subject: [PATCH 4/9] fix: use list-style-image rather than menu-image for appMenu items, b=(no-bug), c=images --- src/browser/themes/shared/zen-icons/icons.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css index 21f954682..b6adc9032 100644 --- a/src/browser/themes/shared/zen-icons/icons.css +++ b/src/browser/themes/shared/zen-icons/icons.css @@ -967,23 +967,23 @@ menuitem[id='placesContext_showAllBookmarks'], } #appMenuRecentlyClosedTabs { - --menu-image: url('container-tab.svg'); + list-style-image: url('container-tab.svg'); } #appMenuClearRecentHistory { - --menu-image: url('edit-delete.svg'); + list-style-image: url('edit-delete.svg'); } #appMenuRecentlyClosedWindows { - --menu-image: url('window.svg'); + list-style-image: url('window.svg'); } #appMenuSearchHistory { - --menu-image: url('search-glass.svg'); + list-style-image: url('search-glass.svg'); } #PanelUI-historyMore { - --menu-image: url('manage.svg'); + list-style-image: url('manage.svg'); } menuitem[id='placesContext_new:bookmark'], From d800c209055ca03bec54d1c6cfe87496c36f1358 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Fri, 2 May 2025 23:39:14 +0200 Subject: [PATCH 5/9] fix: Fixed some issues before release, b=(no-bug), c=common, compact-mode, workspaces --- .../tabbrowser/content/tabbrowser-js.patch | 8 +-- .../urlbar/UrlbarInput-sys-mjs.patch | 71 +++++++++++-------- src/zen/common/ZenUIManager.mjs | 2 + src/zen/common/styles/zen-urlbar.css | 6 +- src/zen/compact-mode/ZenCompactMode.mjs | 27 ++++--- src/zen/workspaces/ZenWorkspaces.mjs | 3 +- 6 files changed, 74 insertions(+), 43 deletions(-) diff --git a/src/browser/components/tabbrowser/content/tabbrowser-js.patch b/src/browser/components/tabbrowser/content/tabbrowser-js.patch index a91f4a787..335518c96 100644 --- a/src/browser/components/tabbrowser/content/tabbrowser-js.patch +++ b/src/browser/components/tabbrowser/content/tabbrowser-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js -index 6dece2b9d0462d90a28e75350ce983d87816ef73..a285c5cbc23eaeebc8248b950c0275645f8a5cd3 100644 +index 6dece2b9d0462d90a28e75350ce983d87816ef73..4cc07f008d99138a76c8e9813c857c352b425006 100644 --- a/browser/components/tabbrowser/content/tabbrowser.js +++ b/browser/components/tabbrowser/content/tabbrowser.js @@ -415,11 +415,58 @@ @@ -543,14 +543,14 @@ index 6dece2b9d0462d90a28e75350ce983d87816ef73..a285c5cbc23eaeebc8248b950c027564 if (unloadBlocked) { return; } -@@ -5247,6 +5409,7 @@ - aExcludeTabs.push(FirefoxViewHandler.tab); +@@ -5248,6 +5410,7 @@ } -+ aExcludeTabs.push(...ZenWorkspaces.getTabsToExclude(aTab)); let excludeTabs = new Set(aExcludeTabs); ++ ZenWorkspaces.getTabsToExclude(aTab).forEach(tab => excludeTabs.add(tab)); // If this tab has a successor, it should be selectable, since + // hiding or closing a tab removes that tab as a successor. @@ -5260,13 +5423,13 @@ !excludeTabs.has(aTab.owner) && Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose") diff --git a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch index cc14d0474..81c94281a 100644 --- a/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch +++ b/src/browser/components/urlbar/UrlbarInput-sys-mjs.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs -index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a87a77c58 100644 +index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8d1a80e97fa711352d4b725f2d299a073dbae4db 100644 --- a/browser/components/urlbar/UrlbarInput.sys.mjs +++ b/browser/components/urlbar/UrlbarInput.sys.mjs @@ -68,6 +68,13 @@ XPCOMUtils.defineLazyPreferenceGetter( @@ -16,19 +16,24 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a const DEFAULT_FORM_HISTORY_NAME = "searchbar-history"; const SEARCH_BUTTON_CLASS = "urlbar-search-button"; -@@ -349,7 +356,11 @@ export class UrlbarInput { +@@ -349,7 +356,16 @@ export class UrlbarInput { // See _on_select(). HTMLInputElement.select() dispatches a "select" // event but does not set the primary selection. this._suppressPrimaryAdjustment = true; -+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", !this.document.getElementById("navigator-toolbox").hasAttribute("zen-has-hover")); ++ const zenToolbox = this.document.getElementById("navigator-toolbox"); ++ zenToolbox.setAttribute("supress-primary-adjustment", !( ++ zenToolbox.hasAttribute("zen-has-hover") || ++ zenToolbox.hasAttribute("zen-has-empty-tab") || ++ zenToolbox.hasAttribute("zen-user-show") ++ )); this.inputField.select(); + this.document.ownerGlobal.setTimeout(() => { -+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment"); ++ zenToolbox.removeAttribute("supress-primary-adjustment"); + }, 1000); this._suppressPrimaryAdjustment = false; } -@@ -425,6 +436,10 @@ export class UrlbarInput { +@@ -425,6 +441,10 @@ export class UrlbarInput { hideSearchTerms = false, isSameDocument = false ) { @@ -39,20 +44,25 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a // We only need to update the searchModeUI on tab switch conditionally // as we only persist searchMode with ScotchBonnet enabled. if ( -@@ -698,8 +713,11 @@ export class UrlbarInput { +@@ -698,8 +718,16 @@ export class UrlbarInput { return; } } - -+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", !this.document.getElementById("navigator-toolbox").hasAttribute("zen-has-hover")); ++ const zenToolbox = this.document.getElementById("navigator-toolbox"); ++ zenToolbox.setAttribute("supress-primary-adjustment", !( ++ zenToolbox.hasAttribute("zen-has-hover") || ++ zenToolbox.hasAttribute("zen-has-empty-tab") || ++ zenToolbox.hasAttribute("zen-user-show") ++ )); this.handleNavigation({ event }); + this.document.ownerGlobal.setTimeout(() => { -+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment"); -+ }, 200); ++ zenToolbox.removeAttribute("supress-primary-adjustment"); ++ }, 1000); } /** -@@ -1093,7 +1111,11 @@ export class UrlbarInput { +@@ -1093,7 +1121,11 @@ export class UrlbarInput { } if (!this.#providesSearchMode(result)) { @@ -65,7 +75,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a } this.controller.recordSelectedResult(event, result); -@@ -2125,6 +2147,10 @@ export class UrlbarInput { +@@ -2125,6 +2157,10 @@ export class UrlbarInput { await this.#updateLayoutBreakoutDimensions(); } @@ -76,7 +86,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a startLayoutExtend() { if (!this.#allowBreakout || this.hasAttribute("breakout-extend")) { // Do not expand if the Urlbar does not support being expanded or it is -@@ -2147,6 +2173,13 @@ export class UrlbarInput { +@@ -2147,6 +2183,13 @@ export class UrlbarInput { this.setAttribute("breakout-extend", "true"); @@ -90,7 +100,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a // Enable the animation only after the first extend call to ensure it // doesn't run when opening a new window. if (!this.hasAttribute("breakout-extend-animate")) { -@@ -2166,6 +2199,19 @@ export class UrlbarInput { +@@ -2166,6 +2209,24 @@ export class UrlbarInput { return; } @@ -99,18 +109,23 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a + } + + // Arc like URLbar: Blur the input on exit -+ this.document.getElementById("navigator-toolbox").setAttribute("supress-primary-adjustment", !this.document.getElementById("navigator-toolbox").hasAttribute("zen-has-hover")); ++ const zenToolbox = this.document.getElementById("navigator-toolbox"); ++ zenToolbox.setAttribute("supress-primary-adjustment", !( ++ zenToolbox.hasAttribute("zen-has-hover") || ++ zenToolbox.hasAttribute("zen-has-empty-tab") || ++ zenToolbox.hasAttribute("zen-user-show") ++ )); + this.window.gBrowser.selectedBrowser.focus(); -+ this.window.setTimeout(() => { -+ this.document.getElementById("navigator-toolbox").removeAttribute("supress-primary-adjustment"); -+ }, 100); ++ this.document.ownerGlobal.setTimeout(() => { ++ zenToolbox.removeAttribute("supress-primary-adjustment"); ++ }, 1000); + + this.removeAttribute("zen-floating-urlbar"); + this.removeAttribute("breakout-extend"); this.#updateTextboxPosition(); } -@@ -2485,7 +2531,7 @@ export class UrlbarInput { +@@ -2485,7 +2546,7 @@ export class UrlbarInput { this.textbox.parentNode.style.setProperty( "--urlbar-container-height", @@ -119,7 +134,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a ); this.textbox.style.setProperty( "--urlbar-height", -@@ -2998,7 +3044,7 @@ export class UrlbarInput { +@@ -2998,7 +3059,7 @@ export class UrlbarInput { */ _trimValue(val) { let trimmedValue = lazy.UrlbarPrefs.get("trimURLs") @@ -128,7 +143,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a : val; // Only trim value if the directionality doesn't change to RTL and we're not // showing a strikeout https protocol. -@@ -3368,6 +3414,10 @@ export class UrlbarInput { +@@ -3368,6 +3429,10 @@ export class UrlbarInput { } reuseEmpty = true; } @@ -139,7 +154,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a if ( where == "tab" && reuseEmpty && -@@ -3375,6 +3425,9 @@ export class UrlbarInput { +@@ -3375,6 +3440,9 @@ export class UrlbarInput { ) { where = "current"; } @@ -149,7 +164,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a return where; } -@@ -3632,6 +3685,7 @@ export class UrlbarInput { +@@ -3632,6 +3700,7 @@ export class UrlbarInput { this.setResultForCurrentValue(null); this.handleCommand(); this.controller.clearLastQueryContextCache(); @@ -157,7 +172,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a this._suppressStartQuery = false; }); -@@ -3639,7 +3693,6 @@ export class UrlbarInput { +@@ -3639,7 +3708,6 @@ export class UrlbarInput { contextMenu.addEventListener("popupshowing", () => { // Close the results pane when the input field contextual menu is open, // because paste and go doesn't want a result selection. @@ -165,7 +180,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a let controller = this.document.commandDispatcher.getControllerForCommand("cmd_paste"); -@@ -4053,6 +4106,11 @@ export class UrlbarInput { +@@ -4053,6 +4121,11 @@ export class UrlbarInput { } _on_click(event) { @@ -177,7 +192,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a if ( event.target == this.inputField || event.target == this._inputContainer || -@@ -4124,7 +4182,7 @@ export class UrlbarInput { +@@ -4124,7 +4197,7 @@ export class UrlbarInput { } } @@ -186,7 +201,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a this.view.autoOpen({ event }); } else { if (this._untrimOnFocusAfterKeydown) { -@@ -4164,9 +4222,12 @@ export class UrlbarInput { +@@ -4164,9 +4237,12 @@ export class UrlbarInput { } _on_mousedown(event) { @@ -200,7 +215,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a if ( event.target != this.inputField && -@@ -4176,8 +4237,8 @@ export class UrlbarInput { +@@ -4176,8 +4252,8 @@ export class UrlbarInput { break; } @@ -211,7 +226,7 @@ index 4b69136aa31bfef3a1d3b57ad0c75fe07fa26be0..8ae25b8ba4ff4f599e1b5b2c545c681a // Keep the focus status, since the attribute may be changed // upon calling this.focus(). -@@ -4218,7 +4279,7 @@ export class UrlbarInput { +@@ -4218,7 +4294,7 @@ export class UrlbarInput { } // Don't close the view when clicking on a tab; we may want to keep the // view open on tab switch, and the TabSelect event arrived earlier. diff --git a/src/zen/common/ZenUIManager.mjs b/src/zen/common/ZenUIManager.mjs index 8aee8398a..9ee10fafc 100644 --- a/src/zen/common/ZenUIManager.mjs +++ b/src/zen/common/ZenUIManager.mjs @@ -341,6 +341,8 @@ var gZenUIManager = { } gURLBar.handleRevert(); + } else if (onElementPicked && onSwitch) { + this.clearUrlbarData(); } if (gURLBar.focused) { diff --git a/src/zen/common/styles/zen-urlbar.css b/src/zen/common/styles/zen-urlbar.css index 83c577b21..5a7aeb752 100644 --- a/src/zen/common/styles/zen-urlbar.css +++ b/src/zen/common/styles/zen-urlbar.css @@ -461,6 +461,10 @@ button.popup-notification-dropmarker { #urlbar-container:has(&) { border-radius: 10px; background: var(--toolbarbutton-hover-background); + :root:not([zen-single-toolbar='true']) & { + max-height: 32px !important; + min-height: unset; + } } } @@ -526,7 +530,7 @@ button.popup-notification-dropmarker { margin-right: 0 !important; } -.urlbarView:not([action-override='true']) .urlbarView-row[type='switchtab'] .urlbarView-no-wrap { +.urlbarView:not([action-override='true']) .urlbarView-row:is([type='switchtab'], [type='clipboard']) .urlbarView-no-wrap { width: 100%; } diff --git a/src/zen/compact-mode/ZenCompactMode.mjs b/src/zen/compact-mode/ZenCompactMode.mjs index 620006bd9..ed7cccdac 100644 --- a/src/zen/compact-mode/ZenCompactMode.mjs +++ b/src/zen/compact-mode/ZenCompactMode.mjs @@ -245,22 +245,31 @@ var gZenCompactModeManager = { } ) .then(() => { + if (gZenUIManager._hasSetSingleToolbar) { + gURLBar.textbox.style.visibility = 'visible'; + } this.sidebar.style.transition = 'none'; - this.sidebar.style.opacity = 0; + const titlebar = document.getElementById('titlebar'); + titlebar.style.visibility = 'hidden'; + titlebar.style.transition = 'none'; + this.sidebar.removeAttribute('animate'); + document.documentElement.removeAttribute('zen-compact-animating'); + + this.getAndApplySidebarWidth({}); + this._ignoreNextResize = true; + setTimeout(() => { - this.sidebar.removeAttribute('animate'); - document.documentElement.removeAttribute('zen-compact-animating'); - - this.getAndApplySidebarWidth({}); - this._ignoreNextResize = true; - this.sidebar.style.removeProperty('margin-right'); this.sidebar.style.removeProperty('margin-left'); - this.sidebar.style.removeProperty('opacity'); this.sidebar.style.removeProperty('transition'); + this.sidebar.style.removeProperty('transform'); + titlebar.style.removeProperty('visibility'); + titlebar.style.removeProperty('transition'); + + gURLBar.textbox.style.removeProperty('visibility'); resolve(); - }, 0); + }); }); } else if (canHideSidebar && !isCompactMode) { document.getElementById('browser').style.overflow = 'clip'; diff --git a/src/zen/workspaces/ZenWorkspaces.mjs b/src/zen/workspaces/ZenWorkspaces.mjs index 743747bce..631117d43 100644 --- a/src/zen/workspaces/ZenWorkspaces.mjs +++ b/src/zen/workspaces/ZenWorkspaces.mjs @@ -2775,7 +2775,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature { (tab) => tab.getAttribute('zen-workspace-id') !== tabWorkspaceId && !tab.hasAttribute('zen-essential') && - !(this.containerSpecificEssentials && tab.getAttribute('container') !== aTab.getAttribute('container')) + !(this.containerSpecificEssentials && tab.getAttribute('container') !== aTab.getAttribute('container')) && + !tab.hasAttribute('zen-empty-tab') ); } From 991437ab2ffec8ae368c74db7bad760bc3ae55f9 Mon Sep 17 00:00:00 2001 From: Alvin Joy <89687635+alvinsjoy@users.noreply.github.com> Date: Sat, 3 May 2025 10:03:21 +0530 Subject: [PATCH 6/9] Add !important --- src/browser/themes/shared/zen-icons/icons.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/browser/themes/shared/zen-icons/icons.css b/src/browser/themes/shared/zen-icons/icons.css index b6adc9032..33dd3cf9a 100644 --- a/src/browser/themes/shared/zen-icons/icons.css +++ b/src/browser/themes/shared/zen-icons/icons.css @@ -967,23 +967,23 @@ menuitem[id='placesContext_showAllBookmarks'], } #appMenuRecentlyClosedTabs { - list-style-image: url('container-tab.svg'); + list-style-image: url('container-tab.svg') !important; } #appMenuClearRecentHistory { - list-style-image: url('edit-delete.svg'); + list-style-image: url('edit-delete.svg') !important; } #appMenuRecentlyClosedWindows { - list-style-image: url('window.svg'); + list-style-image: url('window.svg') !important; } #appMenuSearchHistory { - list-style-image: url('search-glass.svg'); + list-style-image: url('search-glass.svg') !important; } #PanelUI-historyMore { - list-style-image: url('manage.svg'); + list-style-image: url('manage.svg') !important; } menuitem[id='placesContext_new:bookmark'], From 72ab38b9af74a0ef300fce0a0df18d818b897def Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Sat, 3 May 2025 11:32:20 +0200 Subject: [PATCH 7/9] fix: Fixed compact mode collapsed toolbar, b=(no-bug), c=compact-mode --- src/zen/compact-mode/zen-compact-mode.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zen/compact-mode/zen-compact-mode.css b/src/zen/compact-mode/zen-compact-mode.css index 38cbb0351..38ca6c7d0 100644 --- a/src/zen/compact-mode/zen-compact-mode.css +++ b/src/zen/compact-mode/zen-compact-mode.css @@ -43,7 +43,7 @@ } #navigator-toolbox { - --zen-toolbox-max-width: 48px !important; + --zen-toolbox-max-width: 66px !important; --zen-compact-float: var(--zen-element-separation); /* Initial padding for when we are animating */ From fc2c119b94ca5ef3a520c30ef1adbc71198e8826 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Sat, 3 May 2025 12:24:36 +0200 Subject: [PATCH 8/9] fix: Fixed jittering when opening compact mode on windows, b=(closes #7990), c=compact-mode, workspaces --- src/zen/compact-mode/ZenCompactMode.mjs | 14 ++++++++++---- src/zen/compact-mode/zen-compact-mode.css | 2 +- src/zen/workspaces/ZenGradientGenerator.mjs | 5 ++++- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/zen/compact-mode/ZenCompactMode.mjs b/src/zen/compact-mode/ZenCompactMode.mjs index ed7cccdac..ad5218b72 100644 --- a/src/zen/compact-mode/ZenCompactMode.mjs +++ b/src/zen/compact-mode/ZenCompactMode.mjs @@ -419,9 +419,10 @@ var gZenCompactModeManager = { // Dont register the hover if the urlbar is floating and we are hovering over it this.clearFlashTimeout('has-hover' + target.id); if ( - event.target.closest('#urlbar[zen-floating-urlbar]') || + event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') || this.sidebar.getAttribute('supress-primary-adjustment') === 'true' ) { + this._hasHoveredUrlbar = this.sidebar.getAttribute('supress-primary-adjustment') !== 'true'; return; } window.requestAnimationFrame(() => target.setAttribute('zen-has-hover', 'true')); @@ -452,10 +453,15 @@ var gZenCompactModeManager = { } if ( - this.hoverableElements[i].keepHoverDuration && - !event.target.querySelector('#urlbar[zen-floating-urlbar]') && - !(this.sidebar.getAttribute('supress-primary-adjustment') === 'true') + event.explicitOriginalTarget.closest('#urlbar[zen-floating-urlbar]') || + this.sidebar.getAttribute('supress-primary-adjustment') === 'true' || + this._hasHoveredUrlbar ) { + delete this._hasHoveredUrlbar; + return; + } + + if (this.hoverableElements[i].keepHoverDuration) { this.flashElement(target, this.hoverableElements[i].keepHoverDuration, 'has-hover' + target.id, 'zen-has-hover'); } else { this._removeHoverFrames[target.id] = window.requestAnimationFrame(() => target.removeAttribute('zen-has-hover')); diff --git a/src/zen/compact-mode/zen-compact-mode.css b/src/zen/compact-mode/zen-compact-mode.css index 38ca6c7d0..a9c66f99f 100644 --- a/src/zen/compact-mode/zen-compact-mode.css +++ b/src/zen/compact-mode/zen-compact-mode.css @@ -163,7 +163,7 @@ #navigator-toolbox:has(.tabbrowser-tab:active), &[zen-renaming-tab='true'] #navigator-toolbox, #navigator-toolbox:has( - *:is([panelopen='true'], [open='true'], #urlbar:focus-within):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore) + *:is([panelopen='true'], [open='true'], #urlbar:focus-within, [breakout-extend='true']):not(#urlbar[zen-floating-urlbar='true']):not(tab):not(.zen-compact-mode-ignore) ) { &:not([animate='true']) { --zen-compact-mode-func: linear( diff --git a/src/zen/workspaces/ZenGradientGenerator.mjs b/src/zen/workspaces/ZenGradientGenerator.mjs index 06d31b572..82ea426d3 100644 --- a/src/zen/workspaces/ZenGradientGenerator.mjs +++ b/src/zen/workspaces/ZenGradientGenerator.mjs @@ -380,12 +380,15 @@ - + `); listItems.querySelector('.zen-theme-picker-custom-list-item').setAttribute('data-color', color); listItems.querySelector('.zen-theme-picker-dot').style.setProperty('--zen-theme-picker-dot-color', color); listItems.querySelector('.zen-theme-picker-custom-list-item-label').textContent = color; + listItems + .querySelector('.zen-theme-picker-custom-list-item-remove') + .addEventListener('command', this.removeCustomColor.bind(this)); this.customColorList.appendChild(listItems); } From 1831e3e2fa966de84f62a763d7cd3688e19c90b1 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Sat, 3 May 2025 12:29:16 +0200 Subject: [PATCH 9/9] chore: Bump version, b=(no-bug), c=no-component --- surfer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/surfer.json b/surfer.json index 16fba92b0..e183d6343 100644 --- a/surfer.json +++ b/surfer.json @@ -19,7 +19,7 @@ "brandShortName": "Zen", "brandFullName": "Zen Browser", "release": { - "displayVersion": "1.12b", + "displayVersion": "1.12.1b", "github": { "repo": "zen-browser/desktop" }, @@ -39,7 +39,7 @@ "brandShortName": "Twilight", "brandFullName": "Zen Twilight", "release": { - "displayVersion": "1.12t", + "displayVersion": "1.12.1t", "github": { "repo": "zen-browser/desktop" }