Bug 1488732 - Add support link to about:addons sidebar r=aswan
authorMark Striemer <mstriemer@mozilla.com>
Fri, 12 Oct 2018 23:32:02 +0000
changeset 496847 40d620c9c6ee52bc3e3b5181c4336a74044af7c1
parent 496846 661d9ca2bed9ec587170e2ec697844b444874a02
child 496857 a7f531e64021113368611572eb0b6683c01d4654
child 496890 c8a216c42434250f626a6cfe2975fba30e9de40c
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1488732
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 1488732 - Add support link to about:addons sidebar r=aswan Differential Revision: https://phabricator.services.mozilla.com/D8100
toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xul
toolkit/mozapps/extensions/test/browser/browser_list.js
--- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
+++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.dtd
@@ -37,16 +37,17 @@
 <!ENTITY warning.updatesecurity.enable.label       "Enable">
 <!ENTITY warning.updatesecurity.enable.tooltip     "Enable add-on update security checking">
 
 <!-- categories / views -->
 <!ENTITY view.discover.label                  "Get Add-ons">
 <!ENTITY view.recentUpdates.label             "Recent Updates">
 <!ENTITY view.availableUpdates.label          "Available Updates">
 
+<!ENTITY helpButton.label                      "Add-ons Support">
 <!ENTITY preferencesWin.label                  "&brandShortName; Options">
 <!ENTITY preferencesUnix.label                 "&brandShortName; Preferences">
 
 <!-- addon updates -->
 <!ENTITY updates.checkForUpdates.label        "Check for Updates">
 <!ENTITY updates.checkForUpdates.accesskey    "C">
 <!ENTITY updates.viewUpdates.label            "View Recent Updates">
 <!ENTITY updates.viewUpdates.accesskey        "V">
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -145,16 +145,20 @@ function initialize(event) {
   });
   addonPage.addEventListener("keypress", function(event) {
     gHeader.onKeyPress(event);
   });
   if (!isDiscoverEnabled()) {
     gViewDefault = "addons://list/extension";
   }
 
+  let helpButton = document.getElementById("helpButton");
+  let helpUrl = Services.urlFormatter.formatURLPref("app.support.baseURL") + "addons-help";
+  helpButton.setAttribute("href", helpUrl);
+
   document.getElementById("preferencesButton")
     .addEventListener("click", () => {
       let mainWindow = getMainWindow();
       if ("switchToTabHavingURI" in mainWindow) {
         mainWindow.switchToTabHavingURI("about:preferences", true, {
           triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
         });
       }
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -163,17 +163,27 @@
                 &preferencesWin.label;
 #else
                 &preferencesUnix.label;
 #endif
             </label>
           </hbox>
         </label>
       </hbox>
+
+      <hbox class="sidebar-footer-button help-button" pack="center">
+        <label id="helpButton" class="text-link">
+          <hbox align="center">
+            <image class="sidebar-footer-icon help-icon"/>
+            <label class="sidebar-footer-label" flex="1">&helpButton.label;</label>
+          </hbox>
+        </label>
+      </hbox>
     </vbox>
+
     <vbox class="main-content" flex="1">
       <!-- view port -->
       <deck id="view-port" flex="1" selectedIndex="0">
         <!-- discover view -->
         <deck id="discover-view" flex="1" class="view-pane" selectedIndex="0" tabindex="0">
           <vbox id="discover-loading" align="center" pack="stretch" flex="1" class="alert-container">
             <spacer class="alert-spacer-before"/>
             <hbox class="alert loading" align="center">
--- a/toolkit/mozapps/extensions/test/browser/browser_list.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_list.js
@@ -631,10 +631,16 @@ add_task(async function() {
   is_element_visible(filterButton, "Button for showing disabled unsigned extensions should be visible again");
   is_element_hidden(showAllButton, "Button for showing all extensions should be hidden again");
   is_element_hidden(signingInfoUI, "Signing info UI should be hidden again");
 
   Services.prefs.setBoolPref("xpinstall.signatures.required", false);
 });
 
 add_task(async function() {
+  is(gManagerWindow.document.getElementById("helpButton").href,
+     Services.urlFormatter.formatURLPref("app.support.baseURL") + "addons-help",
+     "The help link is setup correctly");
+});
+
+add_task(async function() {
   return close_manager(gManagerWindow);
 });