Bug 1389625 - clean up subview headers now that we use the title of the view instead, r?adw
The panel-subview-header is always hidden in photon (sub)panels, and so we now never show it.
Removing it avoids having to readd the old label for the bookmarks view, remove some unused
strings, and I noticed that we accidentally left the PanelUI-sidebar container which is
unused since
bug 1360282.
MozReview-Commit-ID: 4ProWA1sUUs
--- a/browser/components/customizableui/content/panelUI.inc.xul
+++ b/browser/components/customizableui/content/panelUI.inc.xul
@@ -74,17 +74,16 @@
#endif
#endif
command="cmd_quitApplication"/>
</hbox>
</footer>
</panelview>
<panelview id="PanelUI-history" flex="1">
- <label value="&appMenuHistory.label;" class="panel-subview-header"/>
<vbox class="panel-subview-body">
<toolbarbutton id="appMenuViewHistorySidebar"
label="&appMenuHistory.viewSidebar.label;"
type="checkbox"
class="subviewbutton subviewbutton-iconic"
key="key_gotoHistory"
oncommand="SidebarUI.toggle('viewHistorySidebar'); PanelUI.hide();">
<observes element="viewHistorySidebar" attribute="checked"/>
@@ -125,17 +124,16 @@
oncommand="PlacesCommandHook.showPlacesOrganizer('History'); CustomizableUI.hidePanelForNode(this);"/>
</panelview>
<panelview id="appMenu-library-recentlyClosedTabs"/>
<panelview id="appMenu-library-recentlyClosedWindows"/>
<panelview id="PanelUI-remotetabs" flex="1" class="PanelUI-subView"
descriptionheightworkaround="true">
- <label value="&appMenuRemoteTabs.label;" class="panel-subview-header"/>
<vbox class="panel-subview-body">
<!-- this widget has 3 boxes in the body, but only 1 is ever visible -->
<!-- When Sync is ready to sync -->
<vbox id="PanelUI-remotetabs-main" observes="sync-syncnow-state">
<vbox id="PanelUI-remotetabs-buttons">
<toolbarbutton id="PanelUI-remotetabs-view-sidebar"
class="subviewbutton subviewbutton-iconic"
observes="viewTabsSidebar"
@@ -222,17 +220,16 @@
label="&appMenuRemoteTabs.signin.label;"
oncommand="gSync.openPrefs('synced-tabs');"/>
</vbox>
</hbox>
</vbox>
</panelview>
<panelview id="PanelUI-bookmarks" flex="1" class="PanelUI-subView">
- <label value="&bookmarksMenu.label;" class="panel-subview-header"/>
<vbox class="panel-subview-body">
<toolbarbutton id="panelMenuBookmarkThisPage"
class="subviewbutton subviewbutton-iconic"
observes="bookmarkThisPageBroadcaster"
command="Browser:AddBookmarkAs"
onclick="PanelUI.hide();"/>
<toolbarbutton id="panelMenu_bookmarkingTools"
label="&bookmarkingTools.label;"
@@ -258,41 +255,31 @@
<toolbarbutton id="panelMenu_showAllBookmarks"
label="&showAllBookmarks2.label;"
class="subviewbutton panel-subview-footer"
command="Browser:ShowAllBookmarks"
onclick="PanelUI.hide();"/>
</panelview>
<panelview id="PanelUI-feeds" flex="1" oncommand="FeedHandler.subscribeToFeed(null, event);">
- <label value="&feedsMenu2.label;" class="panel-subview-header"/>
</panelview>
<panelview id="PanelUI-containers" flex="1">
- <label value="&containersMenu.label;" class="panel-subview-header"/>
<vbox id="PanelUI-containersItems"/>
</panelview>
<panelview id="PanelUI-helpView" flex="1" class="PanelUI-subView">
- <label value="&helpMenu.label;" class="panel-subview-header"/>
<vbox id="PanelUI-helpItems" class="panel-subview-body"/>
</panelview>
<panelview id="PanelUI-developer" flex="1">
- <label value="&webDeveloperMenu.label;" class="panel-subview-header"/>
<vbox id="PanelUI-developerItems" class="panel-subview-body"/>
</panelview>
- <panelview id="PanelUI-sidebar" flex="1">
- <label value="&appMenuSidebars.label;" class="panel-subview-header"/>
- <vbox id="PanelUI-sidebarItems" class="panel-subview-body"/>
- </panelview>
-
<panelview id="PanelUI-characterEncodingView" flex="1">
- <label value="&charsetMenu2.label;" class="panel-subview-header"/>
<vbox class="panel-subview-body">
<vbox id="PanelUI-characterEncodingView-pinned"
class="PanelUI-characterEncodingView-list"/>
<toolbarseparator/>
<vbox id="PanelUI-characterEncodingView-charsets"
class="PanelUI-characterEncodingView-list"/>
<toolbarseparator/>
<vbox>
--- a/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js
+++ b/browser/components/customizableui/test/browser_981418-widget-onbeforecreated-handler.js
@@ -12,20 +12,16 @@ add_task(async function testAddOnBeforeC
let onBeforeCreatedCalled = false;
let widgetSpec = {
id: kWidgetId,
type: "view",
viewId: kWidgetId + "idontexistyet",
onBeforeCreated(doc) {
let view = doc.createElement("panelview");
view.id = kWidgetId + "idontexistyet";
- let label = doc.createElement("label");
- label.setAttribute("value", "Hello world");
- label.className = "panel-subview-header";
- view.appendChild(label);
document.getElementById("PanelUI-multiView").appendChild(view);
onBeforeCreatedCalled = true;
},
onViewShowing() {
viewShownDeferred.resolve();
}
};
--- a/browser/extensions/flyweb/bootstrap.js
+++ b/browser/extensions/flyweb/bootstrap.js
@@ -197,30 +197,25 @@ let FlyWebView = {
tooltiptext: gFlyWebBundle.GetStringFromName("flyweb-button.tooltiptext"),
onBeforeCreated(aDocument) {
let panel = aDocument.createElement("panelview");
panel.id = "flyweb-panel";
panel.setAttribute("class", "PanelUI-subView");
panel.setAttribute("flex", "1");
- let label = aDocument.createElement("label");
- label.setAttribute("class", "panel-subview-header");
- label.setAttribute("value", gFlyWebBundle.GetStringFromName("flyweb-button.label"));
-
let empty = aDocument.createElement("description");
empty.id = "flyweb-items-empty";
empty.setAttribute("mousethrough", "always");
empty.textContent = gFlyWebBundle.GetStringFromName("flyweb-items-empty");
let items = aDocument.createElement("vbox");
items.id = "flyweb-items";
items.setAttribute("class", "panel-subview-body");
- panel.appendChild(label);
panel.appendChild(empty);
panel.appendChild(items);
panel.addEventListener("command", this);
aDocument.getElementById("PanelUI-multiView").appendChild(panel);
this._sheetURI = Services.io.newURI("chrome://flyweb/skin/flyweb.css");
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -157,17 +157,16 @@ These should match what Safari and other
<!ENTITY closeWindow.accesskey "d">
<!ENTITY bookmarksMenu.label "Bookmarks">
<!ENTITY bookmarksMenu.accesskey "B">
<!ENTITY bookmarkThisPageCmd.label "Bookmark This Page">
<!ENTITY editThisBookmarkCmd.label "Edit This Bookmark">
<!ENTITY bookmarkThisPageCmd.commandkey "d">
-<!ENTITY feedsMenu2.label "Subscribe to This Page">
<!ENTITY subscribeToPageMenupopup.label "Subscribe to This Page">
<!ENTITY subscribeToPageMenuitem.label "Subscribe to This Page…">
<!ENTITY addCurPagesCmd.label "Bookmark All Tabs…">
<!ENTITY showAllBookmarks2.label "Show All Bookmarks">
<!ENTITY recentBookmarks.label "Recently Bookmarked">
<!ENTITY otherBookmarksCmd.label "Other Bookmarks">
<!ENTITY mobileBookmarksCmd.label "Mobile Bookmarks">
<!ENTITY bookmarksToolbarChevron.tooltip "Show more bookmarks">
@@ -236,18 +235,16 @@ These should match what Safari and other
<!ENTITY hideBookmarksSidebar.label "Hide Bookmarks Sidebar">
<!ENTITY viewBookmarksToolbar.label "View Bookmarks Toolbar">
<!ENTITY hideBookmarksToolbar.label "Hide Bookmarks Toolbar">
<!ENTITY searchBookmarks.label "Search Bookmarks">
<!ENTITY bookmarkingTools.label "Bookmarking Tools">
<!ENTITY addBookmarksMenu.label "Add Bookmarks Menu to Toolbar">
<!ENTITY removeBookmarksMenu.label "Remove Bookmarks Menu from Toolbar">
-<!ENTITY containersMenu.label "Containers">
-
<!-- LOCALIZATION NOTE (bookmarksSidebarGtkCmd.commandkey): This command
- key should not contain the letters A-F, since these are reserved
- shortcut keys on Linux. -->
<!ENTITY bookmarksGtkCmd.commandkey "o">
<!ENTITY bookmarksWinCmd.commandkey "i">
<!ENTITY historyButton.label "History">
<!ENTITY historySidebarCmd.commandKey "h">
@@ -335,17 +332,16 @@ These should match what Safari and other
<!ENTITY showAllHistoryCmd2.label "Show All History">
<!ENTITY showAllHistoryCmd.commandkey "H">
<!ENTITY appMenuCustomize.label "Customize">
<!ENTITY appMenuCustomize.tooltip "Customize the Menu and Toolbars">
<!ENTITY appMenuCustomizeExit.label "Exit Customize">
<!ENTITY appMenuCustomizeExit.tooltip "Finish Customizing">
-<!ENTITY appMenuHistory.label "History">
<!ENTITY appMenuHistory.showAll.label "Show All History">
<!ENTITY appMenuHistory.clearRecent.label "Clear Recent History…">
<!ENTITY appMenuHistory.restoreSession.label "Restore Previous Session">
<!ENTITY appMenuHistory.viewSidebar.label "View History Sidebar">
<!ENTITY appMenuHistory.recentHistory.label "Recent History">
<!ENTITY appMenuHelp.label "Help">
<!ENTITY appMenuHelp.tooltip "Open Help Menu">
@@ -909,18 +905,16 @@ you can use these alternative items. Oth
width of the plugin popup notification that can appear if a plugin has been
blocked on a page. Should be wide enough to fit the pluginActivateNow.label
and pluginActivateAlways.label strings above on a single line. This must be
a CSS length value. -->
<!ENTITY pluginNotification.width "28em">
<!ENTITY uiTour.infoPanel.close "Close">
-<!ENTITY appMenuSidebars.label "Sidebars">
-
<!-- LOCALIZATION NOTE: (panicButton.view.mainTimeframeDesc, panicButton.view.5min, panicButton.view.2hr, panicButton.view.day):
The .mainTimeframeDesc string combined with any of the 3 others is meant to form a complete sentence, e.g. "Forget the last: Five minutes".
Please ensure that this remains the case in the translation. -->
<!ENTITY panicButton.view.mainTimeframeDesc "Forget the last:">
<!ENTITY panicButton.view.5min "Five minutes">
<!ENTITY panicButton.view.2hr "Two hours">
<!ENTITY panicButton.view.day "24 hours">
--- a/browser/themes/shared/customizableui/panelUI.inc.css
+++ b/browser/themes/shared/customizableui/panelUI.inc.css
@@ -215,37 +215,22 @@ panelview {
-moz-box-flex: 1;
}
#PanelUI-popup .panel-subview-body {
margin: -4px;
padding: 4px 4px;
}
-.panel-subview-header,
.subviewbutton.panel-subview-footer {
box-sizing: border-box;
min-height: 41px;
padding: 11px 12px;
}
-.panel-subview-header {
- margin: -4px -4px 4px;
- border-bottom: 1px solid var(--panel-separator-color);
- color: GrayText;
- font-variant: small-caps;
- /* Workaround for min-height not being accounted for in vertical layout. */
- height: 41px;
-}
-
-.cui-widget-panelview .panel-subview-header,
-photonpanelmultiview .panel-subview-header {
- display: none;
-}
-
.cui-widget-panelview .subviewbutton.panel-subview-footer {
margin: 4px 0 0;
-moz-box-pack: center;
}
#appMenu-popup > arrowscrollbox > autorepeatbutton,
#PanelUI-popup > arrowscrollbox > autorepeatbutton {
display: none;