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
index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b543b413441 100644
index 754ce380ed233eb8764af07af3c8dc95d3f39d5c..29864ab59819271b7319b273c08bdc2736d40c93 100644
--- a/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,
hideClose: true,
popupOptions: {
@@ -11,7 +11,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
},
};
@@ -1273,7 +1273,7 @@ var gXPInstallObserver = {
@@ -1280,7 +1280,7 @@ var gXPInstallObserver = {
hideClose: true,
timeout: Date.now() + 30000,
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
// in the "PopupNotificationsBeforeAnchor" handler elsewhere in this file.
getPopupAnchorID(aBrowser, aWindow) {
@@ -29,7 +29,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
const attr = anchorID + "popupnotificationanchor";
if (!aBrowser[attr]) {
@@ -2216,7 +2216,7 @@ var gUnifiedExtensions = {
@@ -2223,7 +2223,7 @@ var gUnifiedExtensions = {
anchorID
// Anchor on the toolbar icon to position the popup right below the
// button.
@@ -38,7 +38,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
}
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
// display it.
if (!this._panel) {
@@ -51,7 +51,16 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
let customizationArea = this._panel.querySelector(
"#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.ensureButtonShownBeforeAttachingPanel(panel);
PanelMultiView.openPopup(panel, this._button, {
@@ -60,7 +69,7 @@ index d7542a38a0242dd9c9c6390171d59992d75a0c19..baa5d84c26f7e74c779bc7e1a2b83b54
triggerEvent: aEvent,
});
}
@@ -2795,18 +2791,20 @@ var gUnifiedExtensions = {
@@ -2802,18 +2798,20 @@ var gUnifiedExtensions = {
this._maybeMoveWidgetNodeBack(widgetId);
}

View File

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

View File

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

View File

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

View File

@@ -357,6 +357,23 @@ export class nsZenSiteDataPanel {
this.window.BookmarkingUI.onStarCommand(event);
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();
}
}
}
}