From fb9bbc3a5118c4969d10c9e66f021c5d2ae32db2 Mon Sep 17 00:00:00 2001 From: salmonumbrella <182032677+salmonumbrella@users.noreply.github.com> Date: Sat, 13 Dec 2025 16:08:13 -0800 Subject: [PATCH] feat(downloads): add pref to control download popup position independently, p=#11607 * feat(downloads): add pref to control download popup position independently Add `zen.downloads.icon-popup-position` preference that allows users to control the download popup/indicator position independently from the vertical tabs position. Valid values: - "follow-tabs" (default): popup appears on same side as vertical tabs - "left": popup always appears on the left - "right": popup always appears on the right This is useful for users who have vertical tabs on the right but prefer the download indicator to appear on the left side of the screen. * feat: Convert pref to integers, b=no-bug, c=no-component --------- Co-authored-by: salmonumbrella Co-authored-by: mr. m --- prefs/zen/downloads.yaml | 6 ++++++ src/zen/downloads/ZenDownloadAnimation.mjs | 3 +++ 2 files changed, 9 insertions(+) diff --git a/prefs/zen/downloads.yaml b/prefs/zen/downloads.yaml index 94a507fb6..c0326efcd 100644 --- a/prefs/zen/downloads.yaml +++ b/prefs/zen/downloads.yaml @@ -7,3 +7,9 @@ - name: zen.downloads.download-animation-duration value: 1000 # ms + +- name: zen.downloads.icon-popup-position + # 0: Follow tab's position + # 1: Left side always + # 2: Right side always + value: 0 diff --git a/src/zen/downloads/ZenDownloadAnimation.mjs b/src/zen/downloads/ZenDownloadAnimation.mjs index f205d80b8..5001f636d 100644 --- a/src/zen/downloads/ZenDownloadAnimation.mjs +++ b/src/zen/downloads/ZenDownloadAnimation.mjs @@ -131,6 +131,9 @@ class nsZenDownloadAnimationElement extends HTMLElement { } #areTabsOnRightSide() { + const position = Services.prefs.getIntPref('zen.downloads.icon-popup-position', 0); + if (position === 1) return false; + if (position === 2) return true; return Services.prefs.getBoolPref('zen.tabs.vertical.right-side'); }