From 22fd6133f179b2a6eb310c292b6830aafe5673d7 Mon Sep 17 00:00:00 2001 From: "mr. m" Date: Fri, 27 Feb 2026 12:54:41 +0100 Subject: [PATCH] feat: Improved styling for native MacOS popovers and fixed anchor positions, b=no-bug, c=workflows, media, common, folders --- .github/workflows/twilight-release-schedule.yml | 2 +- prefs/zen/media.yaml | 1 - src/external-patches/firefox/native_macos_popovers.patch | 2 +- src/external-patches/manifest.json | 6 +++++- src/zen/common/styles/zen-panel-ui.css | 2 +- src/zen/folders/ZenFolders.mjs | 2 +- src/zen/live-folders/ZenLiveFoldersManager.sys.mjs | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/twilight-release-schedule.yml b/.github/workflows/twilight-release-schedule.yml index c32ad1224..de9e3ff1e 100644 --- a/.github/workflows/twilight-release-schedule.yml +++ b/.github/workflows/twilight-release-schedule.yml @@ -2,7 +2,7 @@ name: Zen Twilight Scheduled Releases on: schedule: - - cron: "0 23 * * *" + - cron: "0 23 */2 * *" workflow_dispatch: inputs: create_release: diff --git a/prefs/zen/media.yaml b/prefs/zen/media.yaml index d5a63db23..abf40e5db 100644 --- a/prefs/zen/media.yaml +++ b/prefs/zen/media.yaml @@ -4,7 +4,6 @@ - name: image.jxl.enabled value: true - locked: true - name: svg.context-properties.content.enabled value: true diff --git a/src/external-patches/firefox/native_macos_popovers.patch b/src/external-patches/firefox/native_macos_popovers.patch index 80969236e..fe66bd2b8 100644 --- a/src/external-patches/firefox/native_macos_popovers.patch +++ b/src/external-patches/firefox/native_macos_popovers.patch @@ -22,7 +22,7 @@ diff --git a/browser/components/asrouter/modules/FeatureCallout.sys.mjs b/browse type="arrow" consumeoutsideclicks="never" norolluponanchor="true" -+ nonnativepopover="true" ++ position="${panel_position.panel_position_string}" ${hide_arrow ? "" : 'show-arrow=""'} ${autohide ? "" : 'noautohide="true"'} diff --git a/src/external-patches/manifest.json b/src/external-patches/manifest.json index 6a1dbdb96..50b0a829e 100644 --- a/src/external-patches/manifest.json +++ b/src/external-patches/manifest.json @@ -14,7 +14,11 @@ "replaces": { // The patch we sent was for firefox 149, but we are currently in 148, so theres // a conflict in the patch. See https://bugzilla.mozilla.org/show_bug.cgi?id=2015354 - "overridden": "overriden" + "overridden": "overriden", + // Specifically trying to target FeatureCallout.sys.mjs's change. + // IMPORTANT: Make sure Feature callouts STILL use native popopvers when + // syncing from upstream, as this is a critical part of the patch. + "+ nonnativepopover=\"true\"": "+ " } }, { diff --git a/src/zen/common/styles/zen-panel-ui.css b/src/zen/common/styles/zen-panel-ui.css index aaad51b1b..3e510f641 100644 --- a/src/zen/common/styles/zen-panel-ui.css +++ b/src/zen/common/styles/zen-panel-ui.css @@ -30,7 +30,7 @@ panel[type="arrow"]:not(#feature-callout) { } @media (-moz-platform: macos) { - &[followanchor="false"] { + &:where([followanchor="false"], [nonnativepopover="true"]) { appearance: auto !important; -moz-default-appearance: menupopup; /* We set the default background here, rather than on ::part(content), diff --git a/src/zen/folders/ZenFolders.mjs b/src/zen/folders/ZenFolders.mjs index 1e3e3a88d..cef5cc4f3 100644 --- a/src/zen/folders/ZenFolders.mjs +++ b/src/zen/folders/ZenFolders.mjs @@ -744,7 +744,7 @@ class nsZenFolders extends nsZenDOMOperatedFeature { size *= 48; return { position, - x: 10, + x: isRightSide ? -10 : 10, y: size / -2, }; } diff --git a/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs b/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs index 0b1c06b95..26a5bd338 100644 --- a/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs +++ b/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs @@ -275,7 +275,7 @@ class nsZenLiveFoldersManager { { selector: `[id="${folder.id}"] > .tab-group-label-container`, panel_position: { - anchor_attachment: "rightcenter", + anchor_attachment: isRightSide ? "leftcenter" : "rightcenter", callout_attachment: isRightSide ? "topright" : "topleft", }, },