feat: Always show new site data popup, b=no-bug, c=glance

This commit is contained in:
Mr. M
2025-10-05 23:45:32 +02:00
parent 43c634f477
commit 9bf8bd97b2
5 changed files with 53 additions and 19 deletions

View File

@@ -1,8 +1,8 @@
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b543b413441 100644 index 754ce380ed233eb8764af07af3c8dc95d3f39d5c..29864ab59819271b7319b273c08bdc2736d40c93 100644
--- a/browser/base/content/browser-addons.js --- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js +++ b/browser/base/content/browser-addons.js
@@ -1064,7 +1064,7 @@ var gXPInstallObserver = { @@ -1071,7 +1071,7 @@ var gXPInstallObserver = {
persistent: true, persistent: true,
hideClose: true, hideClose: true,
popupOptions: { popupOptions: {
@@ -11,7 +11,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
}, },
}; };
@@ -1273,7 +1273,7 @@ var gXPInstallObserver = { @@ -1280,7 +1280,7 @@ var gXPInstallObserver = {
hideClose: true, hideClose: true,
timeout: Date.now() + 30000, timeout: Date.now() + 30000,
popupOptions: { popupOptions: {
@@ -20,7 +20,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
}, },
}; };
@@ -2205,7 +2205,7 @@ var gUnifiedExtensions = { @@ -2212,7 +2212,7 @@ var gUnifiedExtensions = {
// If the new ID is not added in NOTIFICATION_IDS, consider handling the case // If the new ID is not added in NOTIFICATION_IDS, consider handling the case
// in the "PopupNotificationsBeforeAnchor" handler elsewhere in this file. // in the "PopupNotificationsBeforeAnchor" handler elsewhere in this file.
getPopupAnchorID(aBrowser, aWindow) { getPopupAnchorID(aBrowser, aWindow) {
@@ -29,7 +29,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
const attr = anchorID + "popupnotificationanchor"; const attr = anchorID + "popupnotificationanchor";
if (!aBrowser[attr]) { if (!aBrowser[attr]) {
@@ -2216,7 +2216,7 @@ var gUnifiedExtensions = { @@ -2223,7 +2223,7 @@ var gUnifiedExtensions = {
anchorID anchorID
// Anchor on the toolbar icon to position the popup right below the // Anchor on the toolbar icon to position the popup right below the
// button. // button.
@@ -38,7 +38,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
} }
return anchorID; return anchorID;
@@ -2509,11 +2509,7 @@ var gUnifiedExtensions = { @@ -2516,11 +2516,7 @@ var gUnifiedExtensions = {
// Lazy load the unified-extensions-panel panel the first time we need to // Lazy load the unified-extensions-panel panel the first time we need to
// display it. // display it.
if (!this._panel) { if (!this._panel) {
@@ -51,7 +51,16 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
let customizationArea = this._panel.querySelector( let customizationArea = this._panel.querySelector(
"#unified-extensions-area" "#unified-extensions-area"
); );
@@ -2608,7 +2604,7 @@ var gUnifiedExtensions = { @@ -2570,7 +2566,7 @@ var gUnifiedExtensions = {
// The button should directly open `about:addons` when the user does not
// have any active extensions listed in the unified extensions panel.
- if (!this.hasExtensionsInPanel()) {
+ if (!this.hasExtensionsInPanel() && false) {
let viewID;
if (
Services.prefs.getBoolPref("extensions.getAddons.showPane", true) &&
@@ -2615,7 +2611,7 @@ var gUnifiedExtensions = {
this.recordButtonTelemetry(reason || "extensions_panel_showing"); this.recordButtonTelemetry(reason || "extensions_panel_showing");
this.ensureButtonShownBeforeAttachingPanel(panel); this.ensureButtonShownBeforeAttachingPanel(panel);
PanelMultiView.openPopup(panel, this._button, { PanelMultiView.openPopup(panel, this._button, {
@@ -60,7 +69,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
triggerEvent: aEvent, triggerEvent: aEvent,
}); });
} }
@@ -2795,18 +2791,20 @@ var gUnifiedExtensions = { @@ -2802,18 +2798,20 @@ var gUnifiedExtensions = {
this._maybeMoveWidgetNodeBack(widgetId); this._maybeMoveWidgetNodeBack(widgetId);
} }

View File

@@ -17,8 +17,7 @@
<hbox id="zen-site-data-header"> <hbox id="zen-site-data-header">
<toolbarbutton id="zen-site-data-header-share" <toolbarbutton id="zen-site-data-header-share"
data-l10n-id="zen-site-data-share" data-l10n-id="zen-site-data-share"
flex="1" flex="1" />
closemenu="none" />
<toolbarbutton id="zen-site-data-header-reader-mode" <toolbarbutton id="zen-site-data-header-reader-mode"
command="View:ReaderView" command="View:ReaderView"
flex="1" /> flex="1" />

View File

@@ -471,6 +471,11 @@
} }
/* permissions */ /* permissions */
#zen-site-data-icon-button {
display: flex !important;
}
#identity-permission-box, #identity-permission-box,
#identity-box:not([pageproxystate='invalid']) #identity-icon-box, #identity-box:not([pageproxystate='invalid']) #identity-icon-box,
#identity-box[pageproxystate='invalid'] #zen-site-data-icon-button { #identity-box[pageproxystate='invalid'] #zen-site-data-icon-button {

View File

@@ -98,10 +98,13 @@
--zen-element-separation: 6px; --zen-element-separation: 6px;
} }
.browserSidebarContainer.zen-glance-background {
box-shadow: var(--zen-big-shadow);
}
.browserSidebarContainer.zen-glance-background, .browserSidebarContainer.zen-glance-background,
.browserSidebarContainer.zen-glance-overlay .browserContainer:not([fade-out='true']) { .browserSidebarContainer.zen-glance-overlay .browserContainer:not([fade-out='true']) {
border-radius: var(--zen-native-inner-radius); border-radius: var(--zen-native-inner-radius);
box-shadow: var(--zen-big-shadow);
} }
.browserSidebarContainer.zen-glance-overlay { .browserSidebarContainer.zen-glance-overlay {
@@ -142,12 +145,7 @@
& .browserStack { & .browserStack {
border-radius: var(--zen-native-inner-radius); border-radius: var(--zen-native-inner-radius);
overflow: hidden; overflow: hidden;
} box-shadow: var(--zen-big-shadow);
& browser {
background: light-dark(rgb(255, 255, 255), rgb(32, 32, 32)) !important;
width: 100%;
height: 100%;
opacity: 1; opacity: 1;
transition: opacity 0.08s; transition: opacity 0.08s;
@@ -156,14 +154,20 @@
} }
} }
& browser {
background: light-dark(rgb(255, 255, 255), rgb(32, 32, 32)) !important;
width: 100%;
height: 100%;
}
&[animate='true'] { &[animate='true'] {
position: absolute; position: absolute;
} }
} }
&[fade-out='true'] { &[fade-out='true'] {
& browser { & .browserStack {
transition: opacity 0.25s ease-in-out; transition: opacity 0.2s ease-in-out;
opacity: 0; opacity: 0;
} }
} }

View File

@@ -357,6 +357,23 @@ export class nsZenSiteDataPanel {
this.window.BookmarkingUI.onStarCommand(event); this.window.BookmarkingUI.onStarCommand(event);
break; break;
} }
case 'zen-site-data-header-share': {
if (Services.zen.canShare()) {
const buttonRect = event.target.getBoundingClientRect();
const currentUrl = this.window.gBrowser.currentURI;
Services.zen.share(
currentUrl,
'',
'',
buttonRect.left,
this.window.innerHeight - buttonRect.bottom,
buttonRect.width,
buttonRect.height
);
} else {
this.window.gZenCommonActions.copyCurrentURLToClipboard();
}
}
} }
} }