Bug 1488727 - Add a heading to about:addons sections r=aswan
☠☠ backed out by 45299a26e20a ☠ ☠
authorMark Striemer <mstriemer@mozilla.com>
Sun, 14 Oct 2018 15:14:06 +0000
changeset 489509 4d076c8654717bb23c89be253f7a1118203e4918
parent 489508 556f31a5e2230d5d06c23b5316d2231a74713251
child 489510 9cd889824b1ce9a3de0ab7686332b5b9789be6f0
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersaswan
bugs1488727
milestone64.0a1
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 {