Bug 1488727 - Add a heading to about:addons sections r=aswan
authorMark Striemer <mstriemer@mozilla.com>
Sun, 14 Oct 2018 19:20:22 +0000
changeset 441190 4420c564868c8e9e9e7b0330d96430a7901192e0
parent 441189 0a45a5634cf18f31b1ab848f4c71b34cabe80ec5
child 441191 aa4cdd603e44a5035074927038fa37bc44c68525
push id70956
push usermstriemer@mozilla.com
push dateSun, 14 Oct 2018 20:10:51 +0000
treeherderautoland@aa4cdd603e44 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1488727
milestone64.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1488727 - Add a heading to about:addons sections r=aswan Differential Revision: https://phabricator.services.mozilla.com/D8103
toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xul
toolkit/themes/shared/extensions/extensions.inc.css
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties
@@ -102,8 +102,14 @@ type.dictionary.name=Dictionaries
 type.service.name=Services
 type.legacy.name=Legacy Extensions
 type.unsupported.name=Unsupported
 
 #LOCALIZATION NOTE(legacyWarning.description) %S is the brandShortName
 legacyWarning.description=Missing something? Some extensions are no longer supported by %S.
 #LOCALIZATION NOTE(legacyThemeWarning.description) %S is the brandShortName
 legacyThemeWarning.description=Missing something? Some themes are no longer supported by %S.
+
+listHeading.extension=Manage your extensions
+listHeading.theme=Manage your themes
+listHeading.plugin=Manage your plugins
+listHeading.locale=Manage your languages
+listHeading.dictionary=Manage your dictionaries
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -2375,16 +2375,23 @@ var gListView = {
 
     if (!(aType in AddonManager.addonTypes))
       throw Components.Exception("Attempting to show unknown type " + aType, Cr.NS_ERROR_INVALID_ARG);
 
     this._type = aType;
     this.node.setAttribute("type", aType);
     this.showEmptyNotice(false);
 
+    try {
+      document.getElementById("list-view-heading-name")
+        .textContent = gStrings.ext.GetStringFromName(`listHeading.${aType}`);
+    } catch (e) {
+      // In tests we sometimes render this view with a type we don't support, that's fine.
+    }
+
     this._listBox.textContent = "";
 
     if (aType == "plugin") {
       navigator.plugins.refresh(false);
     }
 
     getAddonsAndInstalls(aType, (aAddonsList, aInstallsList) => {
       if (gViewController && aRequest != gViewController.currentViewRequest)
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -282,16 +282,20 @@
                        searchbuttonlabel="&search.buttonlabel;"
                        placeholder="&search.placeholder2;" maxlength="100"/>
             </hbox>
           </hbox>
 
           <deck id="headered-views-content" flex="1" selectedIndex="0">
             <!-- list view -->
             <vbox id="list-view" flex="1" class="view-pane" align="stretch" tabindex="0">
+              <hbox id="list-view-heading">
+                <label id="list-view-heading-name" class="header-name" flex="1"/>
+              </hbox>
+
               <!-- info UI for add-ons that have been disabled for being unsigned -->
               <vbox id="disabled-unsigned-addons-info" hidden="true">
                 <label id="disabled-unsigned-addons-heading" value="&disabledUnsigned.heading;"/>
                 <description>
                   &disabledUnsigned.description.start;<label class="text-link plain" id="find-alternative-addons">&disabledUnsigned.description.findAddonsLink;</label>&disabledUnsigned.description.end;
                 </description>
                 <hbox pack="start"><label class="text-link" id="signing-learn-more">&disabledUnsigned.learnMore;</label></hbox>
                 <description id="signing-dev-info">
--- a/toolkit/themes/shared/extensions/extensions.inc.css
+++ b/toolkit/themes/shared/extensions/extensions.inc.css
@@ -272,16 +272,22 @@ button.warning {
   background-color: #ebebeb;
   cursor: pointer;
 }
 
 .header-button > .toolbarbutton-text {
   display: none;
 }
 
+#list-view-heading {
+  margin-top: 24px;
+  margin-bottom: 16px;
+  margin-inline-start: 28px;
+}
+
 /*** discover view ***/
 
 .discover-spacer-before,
 .discover-spacer-after {
   -moz-box-flex: 1;
 }
 
 #discover-error .alert {