forked from mirrors/gecko-dev
Bug 1797836 - Part 3: Add a new AREA_ADDONS for the Unified Extensions panel. r=Gijs
This area doesn't have any special rules applied yet, nor can it have items moved to it except programmatically. All of that will come later, including tests. Differential Revision: https://phabricator.services.mozilla.com/D161079
This commit is contained in:
parent
42a671591b
commit
2945d873b2
3 changed files with 26 additions and 1 deletions
|
|
@ -1543,6 +1543,13 @@ var gUnifiedExtensions = {
|
|||
);
|
||||
template.replaceWith(template.content);
|
||||
this._panel = document.getElementById("unified-extensions-panel");
|
||||
let customizationArea = this._panel.querySelector(
|
||||
"#unified-extensions-area"
|
||||
);
|
||||
CustomizableUI.registerPanelNode(
|
||||
customizationArea,
|
||||
CustomizableUI.AREA_ADDONS
|
||||
);
|
||||
CustomizableUI.addPanelCloseListeners(this._panel);
|
||||
}
|
||||
return this._panel;
|
||||
|
|
|
|||
|
|
@ -243,6 +243,16 @@ var CustomizableUIInternal = {
|
|||
true
|
||||
);
|
||||
|
||||
this.registerArea(
|
||||
CustomizableUI.AREA_ADDONS,
|
||||
{
|
||||
type: CustomizableUI.TYPE_PANEL,
|
||||
defaultPlacements: [],
|
||||
anchor: "unified-extensions-button",
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
let navbarPlacements = [
|
||||
"back-button",
|
||||
"forward-button",
|
||||
|
|
@ -321,6 +331,7 @@ var CustomizableUIInternal = {
|
|||
return new Set([
|
||||
...this._builtinToolbars,
|
||||
CustomizableUI.AREA_FIXED_OVERFLOW_PANEL,
|
||||
CustomizableUI.AREA_ADDONS,
|
||||
]);
|
||||
},
|
||||
|
||||
|
|
@ -3602,7 +3613,10 @@ var CustomizableUI = {
|
|||
* Constant reference to the ID of the non-dymanic (fixed) list in the overflow panel.
|
||||
*/
|
||||
AREA_FIXED_OVERFLOW_PANEL: "widget-overflow-fixed-list",
|
||||
|
||||
/**
|
||||
* Constant reference to the ID of the addons area.
|
||||
*/
|
||||
AREA_ADDONS: "unified-extensions-area",
|
||||
/**
|
||||
* Constant indicating the area is a panel.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -85,6 +85,10 @@
|
|||
<!-- overflowed extension buttons from the nav-bar will go here -->
|
||||
</vbox>
|
||||
|
||||
<vbox class="panel-subview-body" id="unified-extensions-area">
|
||||
<!-- default area for extension browser action buttons -->
|
||||
</vbox>
|
||||
|
||||
<vbox class="panel-subview-body unified-extensions-list">
|
||||
<!-- active visible extensions go here -->
|
||||
</vbox>
|
||||
|
|
|
|||
Loading…
Reference in a new issue