Bug 1496062 - Remove add-on type specific search labels. r=mstriemer,fluent-reviewers
authorjayati <gaurijove@gmail.com>
Tue, 28 Apr 2020 21:00:44 +0000
changeset 526563 0863829d7f893fae4fb04d8d2628093e8c3e20e1
parent 526562 5b670677bfc5f9a6be5eeda34e8071536a268a54
child 526564 63aa05c6c9b02d377e188de636958e2ab5094d20
push id37358
push useropoprus@mozilla.com
push dateWed, 29 Apr 2020 03:05:14 +0000
treeherdermozilla-central@6bb8423186c1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstriemer, fluent-reviewers
bugs1496062
milestone77.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 1496062 - Remove add-on type specific search labels. r=mstriemer,fluent-reviewers Differential Revision: https://phabricator.services.mozilla.com/D72390
toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
toolkit/mozapps/extensions/content/aboutaddons.html
toolkit/mozapps/extensions/content/aboutaddons.js
--- a/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
+++ b/toolkit/locales/en-US/toolkit/about/aboutAddons.ftl
@@ -480,16 +480,14 @@ extension-heading = Manage Your Extensio
 theme-heading = Manage Your Themes
 plugin-heading = Manage Your Plugins
 dictionary-heading = Manage Your Dictionaries
 locale-heading = Manage Your Languages
 updates-heading = Manage Your Updates
 discover-heading = Personalize Your { -brand-short-name }
 shortcuts-heading = Manage Extension Shortcuts
 
-theme-heading-search-label = Find more themes
-extension-heading-search-label = Find more extensions
 default-heading-search-label = Find more add-ons
 addons-heading-search-input =
     .placeholder = Search addons.mozilla.org
 
 addon-page-options-button =
     .title = Tools for all add-ons
--- a/toolkit/mozapps/extensions/content/aboutaddons.html
+++ b/toolkit/mozapps/extensions/content/aboutaddons.html
@@ -60,17 +60,17 @@
 
     <!-- Include helpers for the inline options browser select and context menus. -->
     <content-select-dropdown></content-select-dropdown>
     <proxy-context-menu id="contentAreaContextMenu"></proxy-context-menu>
 
     <template name="addon-page-header">
       <div class="sticky-container">
         <div class="main-search">
-          <label for="search-addons" class="search-label"></label>
+          <label for="search-addons" class="search-label" data-l10n-id="default-heading-search-label"></label>
           <search-addons data-l10n-id="search-header-shortcut" data-l10n-attrs="key"></search-addons>
         </div>
         <div class="main-heading">
           <button class="back-button" action="go-back" data-l10n-id="header-back-button" hidden></button>
           <h1 class="header-name"></h1>
           <div class="spacer"></div>
           <addon-updates-message id="updates-message" hidden></addon-updates-message>
           <div class="page-options-menu">
--- a/toolkit/mozapps/extensions/content/aboutaddons.js
+++ b/toolkit/mozapps/extensions/content/aboutaddons.js
@@ -1297,17 +1297,16 @@ class GlobalWarnings extends MessageBarS
 }
 customElements.define("global-warnings", GlobalWarnings);
 
 class AddonPageHeader extends HTMLElement {
   connectedCallback() {
     if (this.childElementCount === 0) {
       this.appendChild(importTemplate("addon-page-header"));
       this.heading = this.querySelector(".header-name");
-      this.searchLabel = this.querySelector(".search-label");
       this.backButton = this.querySelector(".back-button");
       this.pageOptionsMenuButton = this.querySelector(
         '[action="page-options"]'
       );
       // The addon-page-options element is outside of this element since this is
       // position: sticky and that would break the positioning of the menu.
       this.pageOptionsMenu = document.getElementById(
         this.getAttribute("page-options-id")
@@ -1338,27 +1337,16 @@ class AddonPageHeader extends HTMLElemen
     this.backButton.hidden = viewType !== "detail" && viewType !== "shortcuts";
 
     let { contentWindow } = getBrowserElement();
     this.backButton.disabled = !contentWindow.history.state?.previousView;
 
     if (viewType !== "detail") {
       document.l10n.setAttributes(this.heading, `${viewType}-heading`);
     }
-
-    let customSearchLabelTypes = {
-      shortcuts: "extension",
-      extension: "extension",
-      theme: "theme",
-    };
-    let searchLabelType = customSearchLabelTypes[viewType] || "default";
-    document.l10n.setAttributes(
-      this.searchLabel,
-      `${searchLabelType}-heading-search-label`
-    );
   }
 
   handleEvent(e) {
     let { backButton, pageOptionsMenu, pageOptionsMenuButton } = this;
     if (e.type === "click") {
       switch (e.target) {
         case backButton:
           window.history.back();