diff --git a/src/browser/base/content/browser-addons-js.patch b/src/browser/base/content/browser-addons-js.patch
index acb98ccc7b..728a3b33ae 100644
--- a/src/browser/base/content/browser-addons-js.patch
+++ b/src/browser/base/content/browser-addons-js.patch
@@ -1,5 +1,5 @@
diff --git a/browser/base/content/browser-addons.js b/browser/base/content/browser-addons.js
-index f33a300eb0eed74e286da24919ad3e8505f632c3..9f400e887424693d0ecceb9db79fccf2bd5a757d 100644
+index f33a300eb0eed74e286da24919ad3e8505f632c3..b45c1e5f3b93643ece3b8214e33d40b093689671 100644
--- a/browser/base/content/browser-addons.js
+++ b/browser/base/content/browser-addons.js
@@ -1069,7 +1069,7 @@ var gXPInstallObserver = {
@@ -10,7 +10,7 @@ index f33a300eb0eed74e286da24919ad3e8505f632c3..9f400e887424693d0ecceb9db79fccf2
+ position: gZenUIManager.panelUIPosition(),
},
};
-
+
@@ -1279,7 +1279,7 @@ var gXPInstallObserver = {
hideClose: true,
timeout: Date.now() + 30000,
@@ -19,7 +19,7 @@ index f33a300eb0eed74e286da24919ad3e8505f632c3..9f400e887424693d0ecceb9db79fccf2
+ position: gZenUIManager.panelUIPosition(),
},
};
-
+
@@ -2211,7 +2211,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.
@@ -27,7 +27,7 @@ index f33a300eb0eed74e286da24919ad3e8505f632c3..9f400e887424693d0ecceb9db79fccf2
- const anchorID = "unified-extensions-button";
+ const anchorID = "zen-site-data-icon-button";
const attr = anchorID + "popupnotificationanchor";
-
+
if (!aBrowser[attr]) {
@@ -2222,7 +2222,7 @@ var gUnifiedExtensions = {
anchorID
@@ -36,46 +36,91 @@ index f33a300eb0eed74e286da24919ad3e8505f632c3..9f400e887424693d0ecceb9db79fccf2
- ).firstElementChild;
+ );
}
-
+
return anchorID;
-@@ -2646,11 +2646,7 @@ var gUnifiedExtensions = {
- // Lazy load the unified-extensions-panel panel the first time we need to
- // display it.
- if (!this._panel) {
-- let template = document.getElementById(
-- "unified-extensions-panel-template"
-- );
-- template.replaceWith(template.content);
-- this._panel = document.getElementById("unified-extensions-panel");
-+ this._panel = document.getElementById("zen-unified-site-data-panel");
- let customizationArea = this._panel.querySelector(
- "#unified-extensions-area"
- );
-@@ -2703,6 +2699,7 @@ var gUnifiedExtensions = {
- // and no alternative content is available for display in the panel.
- const policies = this.getActivePolicies();
+@@ -2536,7 +2536,7 @@ var gUnifiedExtensions = {
+ requestAnimationFrame(() => this.updateAttention());
+ },
+
+- onToolbarVisibilityChange(toolbarId, isVisible) {
++ onToolbarVisibilityChange(toolbarId, isVisible, panel = this.panel) {
+ // A list of extension widget IDs (possibly empty).
+ let widgetIDs;
+
+@@ -2550,7 +2550,7 @@ var gUnifiedExtensions = {
+ }
+
+ // The list of overflowed extensions in the extensions panel.
+- const overflowedExtensionsList = this.panel.querySelector(
++ const overflowedExtensionsList = panel.querySelector(
+ "#overflowed-extensions-list"
+ );
+
+@@ -2681,7 +2681,7 @@ var gUnifiedExtensions = {
+
+ // `aEvent` and `reason` are optional. If `reason` is specified, it should be
+ // a valid argument to gUnifiedExtensions.recordButtonTelemetry().
+- async togglePanel(aEvent, reason) {
++ async togglePanel(aEvent, reason, panel = this._panel, view, button) {
+ if (!CustomizationHandler.isCustomizing()) {
+ if (aEvent) {
if (
-+ false &&
- policies.length &&
- !this.hasExtensionsInPanel(policies) &&
- !this.isPrivateWindowMissingExtensionsWithoutPBMAccess() &&
-@@ -2743,7 +2740,7 @@ var gUnifiedExtensions = {
+@@ -2718,32 +2718,30 @@ var gUnifiedExtensions = {
+ this.blocklistAttentionInfo =
+ await AddonManager.getBlocklistAttentionInfo();
+
+- let panel = this.panel;
+-
+ if (!this._listView) {
+ this._listView = PanelMultiView.getViewNode(
+ document,
+- "unified-extensions-view"
++ view,
+ );
+ this._listView.addEventListener("ViewShowing", this);
+ this._listView.addEventListener("ViewHiding", this);
+ }
+
+- if (this._button.open) {
++ if (button.open) {
+ PanelMultiView.hidePopup(panel);
+- this._button.open = false;
++ button.open = false;
+ } else {
+ // Overflow extensions placed in collapsed toolbars, if any.
+ for (const toolbarId of CustomizableUI.getCollapsedToolbarIds(window)) {
+ // We pass `false` because all these toolbars are collapsed.
+- this.onToolbarVisibilityChange(toolbarId, /* isVisible */ false);
++ this.onToolbarVisibilityChange(toolbarId, /* isVisible */ false, panel);
+ }
+
+ panel.hidden = false;
this.recordButtonTelemetry(reason || "extensions_panel_showing");
this.ensureButtonShownBeforeAttachingPanel(panel);
- PanelMultiView.openPopup(panel, this._button, {
+- PanelMultiView.openPopup(panel, this._button, {
- position: "bottomright topright",
-+ position: gZenUIManager.panelUIPosition(panel, this._button),
++ PanelMultiView.openPopup(panel, button, {
++ position: gZenUIManager.panelUIPosition(panel, button),
triggerEvent: aEvent,
});
}
-@@ -2930,18 +2927,20 @@ var gUnifiedExtensions = {
+@@ -2830,7 +2828,7 @@ var gUnifiedExtensions = {
+ if (
+ notInPanel ||
+ document.querySelector("#unified-extensions-area > :first-child")
+- ?.id === widgetId
++ ?.id === widgetIdz
+ ) {
+ moveUp.hidden = true;
+ }
+@@ -2930,18 +2928,20 @@ var gUnifiedExtensions = {
this._maybeMoveWidgetNodeBack(widgetId);
}
-
+
- this.pinToToolbar(widgetId, shouldPinToToolbar);
+ await this.pinToToolbar(widgetId, shouldPinToToolbar);
},
-
+
- pinToToolbar(widgetId, shouldPinToToolbar) {
+ async pinToToolbar(widgetId, shouldPinToToolbar) {
let newArea = shouldPinToToolbar
@@ -83,11 +128,11 @@ index f33a300eb0eed74e286da24919ad3e8505f632c3..9f400e887424693d0ecceb9db79fccf2
: CustomizableUI.AREA_ADDONS;
let newPosition = shouldPinToToolbar ? undefined : 0;
+ await gZenVerticalTabsManager._preCustomize();
-
+
CustomizableUI.addWidgetToArea(widgetId, newArea, newPosition);
// addWidgetToArea() will trigger onWidgetAdded or onWidgetMoved as needed,
// and our handlers will call updateAttention() as needed.
+ await gZenVerticalTabsManager._postCustomize();
},
-
+
async moveWidget(menu, direction) {
diff --git a/src/browser/base/content/navigator-toolbox-js.patch b/src/browser/base/content/navigator-toolbox-js.patch
index 9dc57d082e..6b85e4e4a5 100644
--- a/src/browser/base/content/navigator-toolbox-js.patch
+++ b/src/browser/base/content/navigator-toolbox-js.patch
@@ -1,5 +1,5 @@
diff --git a/browser/base/content/navigator-toolbox.js b/browser/base/content/navigator-toolbox.js
-index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..d9a3404905b73db7c8f202ab166d5f3c625351f6 100644
+index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..4df8419b20b25810bea8b344af84655f16b532c8 100644
--- a/browser/base/content/navigator-toolbox.js
+++ b/browser/base/content/navigator-toolbox.js
@@ -6,7 +6,7 @@
@@ -9,9 +9,24 @@ index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..d9a3404905b73db7c8f202ab166d5f3c
- const navigatorToolbox = document.getElementById("navigator-toolbox");
+ const navigatorToolbox = document.getElementById("browser");
const widgetOverflow = document.getElementById("widget-overflow");
-
+
function onPopupShowing(event) {
-@@ -185,6 +185,7 @@ document.addEventListener(
+@@ -137,7 +137,13 @@ document.addEventListener(
+ break;
+
+ case "unified-extensions-button":
+- gUnifiedExtensions.togglePanel(event);
++ gUnifiedExtensions.togglePanel(
++ event,
++ null,
++ window.gZenSiteDataPanel.extensionsPanel,
++ window.gZenSiteDataPanel.extensionsPanelView,
++ window.gZenSiteDataPanel.extensionsPanelButton,
++ );
+ break;
+
+ case "library-button":
+@@ -185,6 +191,7 @@ document.addEventListener(
#reload-button ,
#urlbar-go-button,
#reader-mode-button,
@@ -19,15 +34,15 @@ index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..d9a3404905b73db7c8f202ab166d5f3c
#picture-in-picture-button,
#urlbar-zoom-button,
#star-button-box,
-@@ -206,6 +207,7 @@ document.addEventListener(
+@@ -206,6 +213,7 @@ document.addEventListener(
case "vertical-tabs-newtab-button":
case "tabs-newtab-button":
case "new-tab-button":
+ case "zen-tabs-wrapper":
gBrowser.handleNewTabMiddleClick(element, event);
break;
-
-@@ -315,7 +317,7 @@ document.addEventListener(
+
+@@ -315,7 +323,7 @@ document.addEventListener(
#pageActionButton,
#downloads-button,
#fxa-toolbar-menu-button,
@@ -36,12 +51,20 @@ index 7b776b15d52367a008ce6bf53dcfcbbe007b7453..d9a3404905b73db7c8f202ab166d5f3c
#library-button
`);
if (!element) {
-@@ -394,7 +396,7 @@ document.addEventListener(
+@@ -394,8 +402,14 @@ document.addEventListener(
gSync.toggleAccountPanel(element, event);
break;
-
+
- case "unified-extensions-button":
+- gUnifiedExtensions.togglePanel(event);
+ case "zen-site-data-icon-button":
- gUnifiedExtensions.togglePanel(event);
++ gUnifiedExtensions.togglePanel(
++ event,
++ null,
++ window.gZenSiteDataPanel.unifiedPanel,
++ window.gZenSiteDataPanel.unifiedPanelView,
++ window.gZenSiteDataPanel.unifiedPanelButton,
++ );
break;
-
+
+ case "library-button":
diff --git a/src/browser/base/content/zen-panels/site-data.inc b/src/browser/base/content/zen-panels/site-data.inc
index e149df52ed..4929a16455 100644
--- a/src/browser/base/content/zen-panels/site-data.inc
+++ b/src/browser/base/content/zen-panels/site-data.inc
@@ -32,7 +32,7 @@
command="Browser:AddBookmarkAs"
flex="1" />
-
+
@@ -85,7 +85,7 @@