Bug 1583231 - Fix indentation, tooltip use, and CSS of what's new panel and toolbarbutton r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D46931

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrei Oprea 2019-09-26 11:06:30 +00:00
Родитель 08192838cd
Коммит b47a6216fe
4 изменённых файлов: 16 добавлений и 47 удалений

Просмотреть файл

@ -1137,13 +1137,12 @@
<toolbaritem id="PanelUI-button"
removable="false">
<toolbarbutton id="whats-new-menu-button"
class="toolbarbutton-1"
hidden="true"
badged="true"
consumeanchor="PanelUI-button"
onmousedown="PanelUI.showSubView('PanelUI-whatsNew', this, event);"
onkeypress="PanelUI.showSubView('PanelUI-whatsNew', this, event);"/>
<toolbarbutton id="whats-new-menu-button"
class="toolbarbutton-1"
hidden="true"
badged="true"
onmousedown="PanelUI.showSubView('PanelUI-whatsNew', this, event);"
onkeypress="PanelUI.showSubView('PanelUI-whatsNew', this, event);"/>
<toolbarbutton id="PanelUI-menu-button"
class="toolbarbutton-1"
badged="true"

Просмотреть файл

@ -396,11 +396,11 @@
label="&webDeveloperMenu.label;"
closemenu="none"
oncommand="PanelUI.showSubView('PanelUI-developer', this)"/>
<toolbarbutton id="appMenu-whatsnew-button"
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
hidden="true"
closemenu="none"
oncommand="PanelUI.showSubView('PanelUI-whatsNew', this)"/>
<toolbarbutton id="appMenu-whatsnew-button"
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
hidden="true"
closemenu="none"
oncommand="PanelUI.showSubView('PanelUI-whatsNew', this)"/>
<toolbarbutton id="appMenu-help-button"
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
label="&appMenuHelp.label;"
@ -861,14 +861,9 @@
<panelview id="PanelUI-whatsNew" class="PanelUI-subView">
<vbox class="panel-subview-body">
<box id="PanelUI-whatsNew-title" class="panel-header">
<label/>
</box>
<toolbaritem id="PanelUI-whatsNew-content"
orient="vertical"
smoothscroll="false"
flatList="true"
tooltip="bhTooltip">
smoothscroll="false">
<html:div id="PanelUI-whatsNew-message-container" role="document">
<!-- What's New messages will be rendered here -->
</html:div>

Просмотреть файл

@ -24,7 +24,6 @@ const PROTECTIONS_PANEL_INFOMSG_PREF =
const TOOLBAR_BUTTON_ID = "whats-new-menu-button";
const APPMENU_BUTTON_ID = "appMenu-whatsnew-button";
const PANEL_HEADER_SELECTOR = "#PanelUI-whatsNew-title > label";
const BUTTON_STRING_ID = "cfr-whatsnew-button";
const WHATS_NEW_PANEL_SELECTOR = "PanelUI-whatsNew-message-container";
@ -428,13 +427,6 @@ class _ToolbarPanelHub {
const document = win.browser.ownerDocument;
this.maybeInsertFTL(win);
this._showElement(document, TOOLBAR_BUTTON_ID, BUTTON_STRING_ID);
// The toolbar dropdown panel uses this extra header element that is hidden
// in the appmenu subview version of the panel. We only need to set it
// when showing the toolbar button.
document.l10n.setAttributes(
document.querySelector(PANEL_HEADER_SELECTOR),
"cfr-whatsnew-panel-header"
);
}
_hideToolbarButton(win) {

Просмотреть файл

@ -1804,7 +1804,6 @@ toolbarpaletteitem[place="menu-panel"] > .subviewbutton-nav::after {
/* What's New panel */
#customizationui-widget-multiview #PanelUI-whatsNew {
min-width: @menuPanelWidth@;
max-width: @menuPanelWidth@;
}
@ -1845,28 +1844,12 @@ toolbarpaletteitem[place="menu-panel"] > .subviewbutton-nav::after {
color: white;
}
#customizationui-widget-multiview #PanelUI-whatsNew-content {
height: 586px;
panelview[mainview] #PanelUI-whatsNew-content {
height: 43em;
}
#PanelUI-whatsNew-title {
display: none;
}
/**
* The Applications Menu container has some extra padding that does not
* exist when the What's New dropdown is shown directly from the toolbar
*/
#PanelUI-whatsNew-content {
margin-top: -6px;
}
#customizationui-widget-multiview #PanelUI-whatsNew-content {
margin: 0;
}
#customizationui-widget-multiview #PanelUI-whatsNew-title {
display: flex;
#PanelUI-whatsNew .panel-subview-body {
padding-top: 0;
}
#PanelUI-whatsNew .whatsNew-message {