From 8e3f1986d061a1892ac224bb999273821898ef04 Mon Sep 17 00:00:00 2001 From: Erdem Date: Fri, 30 May 2025 02:01:33 +0300 Subject: [PATCH 1/4] feature: essential tabs per raw --- src/browser/app/profile/features.inc | 2 +- .../components/preferences/zen-settings.js | 5 ++++ .../preferences/zenLooksAndFeel.inc.xhtml | 18 ++++++++++++ src/zen/common/zenThemeModifier.js | 7 +++++ src/zen/tabs/zen-tabs/vertical-tabs.css | 28 +++++++++++++++++++ 5 files changed, 59 insertions(+), 1 deletion(-) diff --git a/src/browser/app/profile/features.inc b/src/browser/app/profile/features.inc index f92e9ba985..4d34683b9b 100644 --- a/src/browser/app/profile/features.inc +++ b/src/browser/app/profile/features.inc @@ -1,4 +1,3 @@ - pref('zen.welcome-screen.seen', false, sticky); pref('zen.tabs.vertical', true); @@ -125,6 +124,7 @@ pref('zen.workspaces.natural-scroll', false); pref('zen.workspaces.scroll-modifier-key','ctrl'); // can be ctrl, alt, shift, or a meta key pref('services.sync.engine.workspaces', false); pref('zen.workspaces.container-specific-essentials-enabled', false); +pref('zen.essentials.per-row', 0); // 0 = auto (responsive), n = fixed number per row #ifdef MOZILLA_OFFICIAL pref('zen.workspaces.debug', false); diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js index 179637919e..aba05f7e8a 100644 --- a/src/browser/components/preferences/zen-settings.js +++ b/src/browser/components/preferences/zen-settings.js @@ -1222,6 +1222,11 @@ Preferences.addAll([ type: 'bool', default: true, }, + { + id: 'zen.essentials.per-row', + type: 'int', + default: 0, + }, { id: 'media.videocontrols.picture-in-picture.enabled', type: 'bool', diff --git a/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml b/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml index b3f3987b94..77bfa47636 100644 --- a/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml +++ b/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml @@ -39,6 +39,24 @@ data-l10n-id="zen-vertical-tabs-newtab-top-button-up" preference="zen.view.show-newtab-button-top"/> + + + + + + Date: Fri, 30 May 2025 02:04:35 +0300 Subject: [PATCH 2/4] Update zenLooksAndFeel.inc.xhtml --- src/browser/components/preferences/zenLooksAndFeel.inc.xhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml b/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml index 77bfa47636..cb87c3ef1b 100644 --- a/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml +++ b/src/browser/components/preferences/zenLooksAndFeel.inc.xhtml @@ -40,7 +40,7 @@ preference="zen.view.show-newtab-button-top"/> - + From d4b7a43dd263d6fc625c1e76cc5d81c612101558 Mon Sep 17 00:00:00 2001 From: Erdem Date: Fri, 30 May 2025 02:10:16 +0300 Subject: [PATCH 3/4] remove unneccesery comment --- src/zen/common/zenThemeModifier.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zen/common/zenThemeModifier.js b/src/zen/common/zenThemeModifier.js index 99074f163a..972c04a201 100644 --- a/src/zen/common/zenThemeModifier.js +++ b/src/zen/common/zenThemeModifier.js @@ -14,7 +14,7 @@ const kZenThemePrefsList = [ 'zen.theme.accent-color', 'zen.theme.border-radius', 'zen.theme.content-element-separation', - 'zen.essentials.per-row', // Add essentials per-row preference + 'zen.essentials.per-row', ]; const kZenMaxElementSeparation = 12; From 643b43347c32ef9dcb7f296f023b81413f7c5aa1 Mon Sep 17 00:00:00 2001 From: Erdem Date: Fri, 30 May 2025 02:17:22 +0300 Subject: [PATCH 4/4] linting fix --- src/zen/tabs/zen-tabs/vertical-tabs.css | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css index 27d1740bc2..42b0b7fa29 100644 --- a/src/zen/tabs/zen-tabs/vertical-tabs.css +++ b/src/zen/tabs/zen-tabs/vertical-tabs.css @@ -1266,35 +1266,35 @@ max-height 0.3s ease-out, grid-template-columns 0.3s ease-out; opacity: 1; - + /* Default auto-fit layout (preference = 0 or not set) */ grid-template-columns: repeat(auto-fit, minmax(max(23.7%, 48px), 1fr)); - + /* Override grid layout when specific per-row values are set */ - :root[style*="--zen-essentials-per-row: 1"] & { + :root[style*='--zen-essentials-per-row: 1'] & { grid-template-columns: repeat(auto-fit, minmax(100%, 1fr)) !important; } - :root[style*="--zen-essentials-per-row: 2"] & { + :root[style*='--zen-essentials-per-row: 2'] & { grid-template-columns: repeat(auto-fit, minmax(calc(50% - 2px), 1fr)) !important; } - :root[style*="--zen-essentials-per-row: 3"] & { + :root[style*='--zen-essentials-per-row: 3'] & { grid-template-columns: repeat(auto-fit, minmax(calc(33.33% - 2.67px), 1fr)) !important; } - :root[style*="--zen-essentials-per-row: 4"] & { + :root[style*='--zen-essentials-per-row: 4'] & { grid-template-columns: repeat(auto-fit, minmax(calc(25% - 3px), 1fr)) !important; } - :root[style*="--zen-essentials-per-row: 5"] & { + :root[style*='--zen-essentials-per-row: 5'] & { grid-template-columns: repeat(auto-fit, minmax(calc(20% - 3.2px), 1fr)) !important; } - :root[style*="--zen-essentials-per-row: 6"] & { + :root[style*='--zen-essentials-per-row: 6'] & { grid-template-columns: repeat(auto-fit, minmax(calc(16.67% - 3.33px), 1fr)) !important; } - + &[data-hack-type='1'] { grid-template-columns: repeat(auto-fit, minmax(max(30%, 48px), auto)); }