Bug 1273958 Fix suppression of search box for disco pane r=kmag,r=rhelmer, a=gchang
authorAndrew Swan <aswan@mozilla.com>
Fri, 20 May 2016 16:42:48 -0700
changeset 341716 1b9b86015cdc134c6acc9e492108ba76d2a5dbc8
parent 341715 43db2c56b8ca32cf4bae9821328b78e9c4404a10
child 341717 9f311d92805addcd093ba46dabfcf385a0f7fed3
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskmag, rhelmer, gchang
bugs1273958
milestone49.0a2
Bug 1273958 Fix suppression of search box for disco pane r=kmag,r=rhelmer, a=gchang Hiding the header was causing some problems so instead restructure the XUL to put the discovery pane in the top-level deck alongside a vbox with the header and a deck with all the other panes that have the header. MozReview-Commit-ID: 2PnW1F9aYgt
toolkit/mozapps/extensions/content/extensions.js
toolkit/mozapps/extensions/content/extensions.xul
toolkit/mozapps/extensions/test/browser/browser_bug562797.js
toolkit/mozapps/extensions/test/browser/browser_bug562854.js
toolkit/mozapps/extensions/test/browser/browser_bug581076.js
toolkit/mozapps/extensions/test/browser/browser_experiments.js
toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
toolkit/mozapps/extensions/test/browser/browser_searching.js
toolkit/mozapps/extensions/test/browser/browser_uninstalling.js
toolkit/mozapps/extensions/test/browser/head.js
--- a/toolkit/mozapps/extensions/content/extensions.js
+++ b/toolkit/mozapps/extensions/content/extensions.js
@@ -626,17 +626,18 @@ var gViewController = {
   currentViewRequest: 0,
   viewObjects: {},
   viewChangeCallback: null,
   initialViewSelected: false,
   lastHistoryIndex: -1,
 
   initialize: function() {
     this.viewPort = document.getElementById("view-port");
-    this.headerEl = document.getElementById("header");
+    this.headeredViews = document.getElementById("headered-views");
+    this.headeredViewsDeck = document.getElementById("headered-views-content");
 
     this.viewObjects["search"] = gSearchView;
     this.viewObjects["discover"] = gDiscoverView;
     this.viewObjects["list"] = gListView;
     this.viewObjects["detail"] = gDetailView;
     this.viewObjects["updates"] = gUpdatesView;
 
     for (let type in this.viewObjects) {
@@ -747,63 +748,79 @@ var gViewController = {
     };
     gHistory.replaceState(state);
 
     this.loadViewInternal(aViewId, null, state);
     this.initialViewSelected = true;
     notifyInitialized();
   },
 
+  get displayedView() {
+    if (this.viewPort.selectedPanel == this.headeredViews) {
+      return this.headeredViewsDeck.selectedPanel;
+    } else {
+      return this.viewPort.selectedPanel;
+    }
+  },
+
+  set displayedView(view) {
+    let node = view.node;
+    if (node.parentNode == this.headeredViewsDeck) {
+      this.headeredViewsDeck.selectedPanel = node;
+      this.viewPort.selectedPanel = this.headeredViews;
+    } else {
+      this.viewPort.selectedPanel = node;
+    }
+  },
+
   loadViewInternal: function(aViewId, aPreviousView, aState) {
     var view = this.parseViewId(aViewId);
 
     if (!view.type || !(view.type in this.viewObjects))
       throw Components.Exception("Invalid view: " + view.type);
 
     var viewObj = this.viewObjects[view.type];
     if (!viewObj.node)
       throw Components.Exception("Root node doesn't exist for '" + view.type + "' view");
 
     if (this.currentViewObj && aViewId != aPreviousView) {
-      this.headerEl.hidden = Boolean(viewObj.hideHeader);
-
       try {
         let canHide = this.currentViewObj.hide();
         if (canHide === false)
           return;
-        this.viewPort.selectedPanel.removeAttribute("loading");
+        this.displayedView.removeAttribute("loading");
       } catch (e) {
         // this shouldn't be fatal
         Cu.reportError(e);
       }
     }
 
     gCategories.select(aViewId, aPreviousView);
 
     this.currentViewId = aViewId;
     this.currentViewObj = viewObj;
 
-    this.viewPort.selectedPanel = this.currentViewObj.node;
-    this.viewPort.selectedPanel.setAttribute("loading", "true");
+    this.displayedView = this.currentViewObj;
+    this.currentViewObj.node.setAttribute("loading", "true");
     this.currentViewObj.node.focus();
 
     if (aViewId == aPreviousView)
       this.currentViewObj.refresh(view.param, ++this.currentViewRequest, aState);
     else
       this.currentViewObj.show(view.param, ++this.currentViewRequest, aState);
   },
 
   // Moves back in the document history and removes the current history entry
   popState: function(aCallback) {
     this.viewChangeCallback = aCallback;
     gHistory.popState();
   },
 
   notifyViewChanged: function() {
-    this.viewPort.selectedPanel.removeAttribute("loading");
+    this.displayedView.removeAttribute("loading");
 
     if (this.viewChangeCallback) {
       this.viewChangeCallback();
       this.viewChangeCallback = null;
     }
 
     var event = document.createEvent("Events");
     event.initEvent("ViewChanged", true, true);
@@ -3318,17 +3335,17 @@ var gDetailView = {
         aCallback();
       return;
     }
 
     // We can't use a promise for this, since some code (especially in tests)
     // relies on us finishing before the ViewChanged event bubbles up to its
     // listeners, and promises resolve asynchronously.
     let whenViewLoaded = callback => {
-      if (gViewController.viewPort.selectedPanel.hasAttribute("loading")) {
+      if (gViewController.displayedView.hasAttribute("loading")) {
         gDetailView.node.addEventListener("ViewChanged", function viewChangedEventListener() {
           gDetailView.node.removeEventListener("ViewChanged", viewChangedEventListener);
           callback();
         });
       } else {
         callback();
       }
     };
--- a/toolkit/mozapps/extensions/content/extensions.xul
+++ b/toolkit/mozapps/extensions/content/extensions.xul
@@ -156,209 +156,341 @@
                       disabled="true"/>
         <richlistitem id="category-recentUpdates" value="addons://updates/recent"
                       class="category"
                       name="&view.recentUpdates.label;" priority="101000"
                       tooltiptext="&view.recentUpdates.label;" disabled="true"/>
       </richlistbox>
     </vbox>
     <vbox class="main-content" flex="1">
-      <!-- main header -->
-      <hbox id="header" align="center">
-        <button id="show-all-extensions" hidden="true"
-                label="&showAllExtensions.button.label;"
-                command="cmd_showAllExtensions"/>
-        <spacer flex="1"/>
-        <hbox id="updates-container" align="center">
-          <image class="spinner"/>
-          <label id="updates-noneFound" hidden="true"
-                 value="&updates.noneFound.label;"/>
-          <button id="updates-manualUpdatesFound-btn" class="button-link"
-                  hidden="true" label="&updates.manualUpdatesFound.label;"
-                  command="cmd_goToAvailableUpdates"/>
-          <label id="updates-progress" hidden="true"
-                 value="&updates.updating.label;"/>
-          <label id="updates-installed" hidden="true"
-                 value="&updates.installed.label;"/>
-          <label id="updates-downloaded" hidden="true"
-                 value="&updates.downloaded.label;"/>
-          <button id="updates-restart-btn" class="button-link" hidden="true"
-                  label="&updates.restart.label;"
-                  command="cmd_restartApp"/>
-        </hbox>
-        <button id="show-disabled-unsigned-extensions" hidden="true"
-                class="warning"
-                label="&showUnsignedExtensions.button.label;"
-                command="cmd_showUnsignedExtensions"/>
-        <toolbarbutton id="header-utils-btn" class="header-button" type="menu"
-                tooltiptext="&toolsMenu.tooltip;">
-          <menupopup id="utils-menu">
-            <menuitem id="utils-updateNow"
-                      label="&updates.checkForUpdates.label;"
-                      accesskey="&updates.checkForUpdates.accesskey;"
-                      command="cmd_findAllUpdates"/>
-            <menuitem id="utils-viewUpdates"
-                      label="&updates.viewUpdates.label;"
-                      accesskey="&updates.viewUpdates.accesskey;"
-                      command="cmd_goToRecentUpdates"/>
-            <menuseparator id="utils-installFromFile-separator"/>
-            <menuitem id="utils-installFromFile"
-                      label="&installAddonFromFile.label;"
-                      accesskey="&installAddonFromFile.accesskey;"
-                      command="cmd_installFromFile"/>
-            <menuitem id="utils-debugAddons"
-                      label="&debugAddons.label;"
-                      accesskey="&debugAddons.accesskey;"
-                      command="cmd_debugAddons"/>
-            <menuseparator/>
-            <menuitem id="utils-autoUpdateDefault"
-                      label="&updates.updateAddonsAutomatically.label;"
-                      accesskey="&updates.updateAddonsAutomatically.accesskey;"
-                      type="checkbox" autocheck="false"
-                      command="cmd_toggleAutoUpdateDefault"/>
-            <menuitem id="utils-resetAddonUpdatesToAutomatic"
-                      label="&updates.resetUpdatesToAutomatic.label;"
-                      accesskey="&updates.resetUpdatesToAutomatic.accesskey;"
-                      command="cmd_resetAddonAutoUpdate"/>
-            <menuitem id="utils-resetAddonUpdatesToManual"
-                      label="&updates.resetUpdatesToManual.label;"
-                      accesskey="&updates.resetUpdatesToManual.accesskey;"
-                      command="cmd_resetAddonAutoUpdate"/>
-          </menupopup>
-        </toolbarbutton>
-        <textbox id="header-search" type="search" searchbutton="true"
-                 searchbuttonlabel="&search.buttonlabel;"
-                 placeholder="&search.placeholder;"/>
-      </hbox>
-        <!-- view port -->
-        <deck id="view-port" flex="1" selectedIndex="0">
+      <!-- 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">
+              <image/>
+              <label value="&loading.label;"/>
+            </hbox>
+            <spacer class="alert-spacer-after"/>
+          </vbox>
+          <vbox id="discover-error" align="center" pack="stretch" flex="1" class="alert-container">
+            <spacer class="alert-spacer-before"/>
+            <hbox>
+              <spacer class="discover-spacer-before"/>
+              <hbox class="alert" align="center">
+                <image class="discover-logo"/>
+                <vbox flex="1" align="stretch">
+                  <label class="discover-title">&discover.title;</label>
+                  <description class="discover-description">&discover.description2;</description>
+                  <description class="discover-footer">&discover.footer;</description>
+                </vbox>
+              </hbox>
+              <spacer class="discover-spacer-after"/>
+            </hbox>
+            <spacer class="alert-spacer-after"/>
+          </vbox>
+          <browser id="discover-browser" type="content" flex="1"
+                     disablehistory="true" homepage="about:blank"/>
+        </deck>
 
-          <!-- 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">
-                <image/>
-                <label value="&loading.label;"/>
+        <!-- container for views with the search/tools header -->
+        <vbox id="headered-views" flex="1">
+          <!-- main header -->
+          <hbox id="header" align="center">
+            <button id="show-all-extensions" hidden="true"
+                    label="&showAllExtensions.button.label;"
+                    command="cmd_showAllExtensions"/>
+            <spacer flex="1"/>
+            <hbox id="updates-container" align="center">
+              <image class="spinner"/>
+              <label id="updates-noneFound" hidden="true"
+                     value="&updates.noneFound.label;"/>
+              <button id="updates-manualUpdatesFound-btn" class="button-link"
+                      hidden="true" label="&updates.manualUpdatesFound.label;"
+                      command="cmd_goToAvailableUpdates"/>
+              <label id="updates-progress" hidden="true"
+                     value="&updates.updating.label;"/>
+              <label id="updates-installed" hidden="true"
+                     value="&updates.installed.label;"/>
+              <label id="updates-downloaded" hidden="true"
+                     value="&updates.downloaded.label;"/>
+              <button id="updates-restart-btn" class="button-link" hidden="true"
+                      label="&updates.restart.label;"
+                      command="cmd_restartApp"/>
+            </hbox>
+            <button id="show-disabled-unsigned-extensions" hidden="true"
+                    class="warning"
+                    label="&showUnsignedExtensions.button.label;"
+                    command="cmd_showUnsignedExtensions"/>
+            <toolbarbutton id="header-utils-btn" class="header-button" type="menu"
+                           tooltiptext="&toolsMenu.tooltip;">
+              <menupopup id="utils-menu">
+                <menuitem id="utils-updateNow"
+                          label="&updates.checkForUpdates.label;"
+                          accesskey="&updates.checkForUpdates.accesskey;"
+                          command="cmd_findAllUpdates"/>
+                <menuitem id="utils-viewUpdates"
+                          label="&updates.viewUpdates.label;"
+                          accesskey="&updates.viewUpdates.accesskey;"
+                          command="cmd_goToRecentUpdates"/>
+                <menuseparator id="utils-installFromFile-separator"/>
+                <menuitem id="utils-installFromFile"
+                          label="&installAddonFromFile.label;"
+                          accesskey="&installAddonFromFile.accesskey;"
+                          command="cmd_installFromFile"/>
+                <menuitem id="utils-debugAddons"
+                          label="&debugAddons.label;"
+                          accesskey="&debugAddons.accesskey;"
+                          command="cmd_debugAddons"/>
+                <menuseparator/>
+                <menuitem id="utils-autoUpdateDefault"
+                          label="&updates.updateAddonsAutomatically.label;"
+                          accesskey="&updates.updateAddonsAutomatically.accesskey;"
+                          type="checkbox" autocheck="false"
+                          command="cmd_toggleAutoUpdateDefault"/>
+                <menuitem id="utils-resetAddonUpdatesToAutomatic"
+                          label="&updates.resetUpdatesToAutomatic.label;"
+                          accesskey="&updates.resetUpdatesToAutomatic.accesskey;"
+                          command="cmd_resetAddonAutoUpdate"/>
+                <menuitem id="utils-resetAddonUpdatesToManual"
+                          label="&updates.resetUpdatesToManual.label;"
+                          accesskey="&updates.resetUpdatesToManual.accesskey;"
+                          command="cmd_resetAddonAutoUpdate"/>
+              </menupopup>
+            </toolbarbutton>
+            <textbox id="header-search" type="search" searchbutton="true"
+                     searchbuttonlabel="&search.buttonlabel;"
+                     placeholder="&search.placeholder;"/>
+          </hbox>
+
+          <deck id="headered-views-content" flex="1" selectedIndex="0">
+            <!-- search view -->
+            <vbox id="search-view" flex="1" class="view-pane" tabindex="0">
+              <hbox class="view-header global-warning-container" align="center">
+                <!-- global warnings -->
+                <hbox class="global-warning" flex="1">
+                  <hbox class="global-warning-safemode" flex="1" align="center"
+                        tooltiptext="&warning.safemode.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.safemode.label;"/>
+                  </hbox>
+                  <hbox class="global-warning-checkcompatibility" flex="1" align="center"
+                        tooltiptext="&warning.checkcompatibility.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.checkcompatibility.label;"/>
+                  </hbox>
+                  <button class="button-link global-warning-checkcompatibility"
+                          label="&warning.checkcompatibility.enable.label;"
+                          tooltiptext="&warning.checkcompatibility.enable.tooltip;"
+                          command="cmd_enableCheckCompatibility"/>
+                  <hbox class="global-warning-updatesecurity" flex="1" align="center"
+                        tooltiptext="&warning.updatesecurity.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.updatesecurity.label;"/>
+                  </hbox>
+                  <button class="button-link global-warning-updatesecurity"
+                          label="&warning.updatesecurity.enable.label;"
+                          tooltiptext="&warning.updatesecurity.enable.tooltip;"
+                          command="cmd_enableUpdateSecurity"/>
+                  <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
+                </hbox>
+                <spacer flex="1"/>
+                <hbox id="search-sorters" class="sort-controls"
+                      showrelevance="true" sortby="relevancescore" ascending="false"/>
               </hbox>
-              <spacer class="alert-spacer-after"/>
-            </vbox>
-            <vbox id="discover-error" align="center" pack="stretch" flex="1" class="alert-container">
-              <spacer class="alert-spacer-before"/>
-              <hbox>
-                <spacer class="discover-spacer-before"/>
-                <hbox class="alert" align="center">
-                  <image class="discover-logo"/>
-                  <vbox flex="1" align="stretch">
-                    <label class="discover-title">&discover.title;</label>
-                    <description class="discover-description">&discover.description2;</description>
-                    <description class="discover-footer">&discover.footer;</description>
-                  </vbox>
+              <hbox id="search-filter" align="center">
+                <label id="search-filter-label" value="&search.filter2.label;"/>
+                <radiogroup id="search-filter-radiogroup" orient="horizontal"
+                            align="center" persist="value" value="remote">
+                  <radio id="search-filter-local" class="search-filter-radio"
+                         label="&search.filter2.installed.label;" value="local"
+                         tooltiptext="&search.filter2.installed.tooltip;"/>
+                  <radio id="search-filter-remote" class="search-filter-radio"
+                         label="&search.filter2.available.label;" value="remote"
+                         tooltiptext="&search.filter2.available.tooltip;"/>
+                </radiogroup>
+              </hbox>
+              <vbox id="search-loading" class="alert-container"
+                    flex="1" hidden="true">
+                <spacer class="alert-spacer-before"/>
+                <hbox class="alert loading" align="center">
+                  <image/>
+                  <label value="&loading.label;"/>
                 </hbox>
-                <spacer class="discover-spacer-after"/>
-              </hbox>
-              <spacer class="alert-spacer-after"/>
+                <spacer class="alert-spacer-after"/>
+              </vbox>
+              <vbox id="search-list-empty" class="alert-container"
+                    flex="1" hidden="true">
+                <spacer class="alert-spacer-before"/>
+                <vbox class="alert">
+                  <label value="&listEmpty.search.label;"/>
+                  <button class="discover-button"
+                          id="discover-button-search"
+                          label="&listEmpty.button.label;"
+                          command="cmd_goToDiscoverPane"/>
+                </vbox>
+                <spacer class="alert-spacer-after"/>
+              </vbox>
+              <richlistbox id="search-list" class="list" flex="1">
+                <hbox pack="center">
+                  <label id="search-allresults-link" class="text-link"/>
+                </hbox>
+              </richlistbox>
             </vbox>
-            <browser id="discover-browser" type="content" flex="1"
-                     disablehistory="true" homepage="about:blank"/>
-          </deck>
 
-          <!-- search view -->
-          <vbox id="search-view" flex="1" class="view-pane" tabindex="0">
-            <hbox class="view-header global-warning-container" align="center">
-              <!-- global warnings -->
-              <hbox class="global-warning" flex="1">
-                <hbox class="global-warning-safemode" flex="1" align="center"
-                      tooltiptext="&warning.safemode.label;">
-                  <image class="warning-icon"/>
-                  <label class="global-warning-text" flex="1" crop="end"
-                         value="&warning.safemode.label;"/>
+            <!-- list view -->
+            <vbox id="list-view" flex="1" class="view-pane" align="stretch" tabindex="0">
+              <!-- 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">
+                  &disabledUnsigned.devInfo.start;<label class="text-link plain" id="signing-dev-manual-link">&disabledUnsigned.devInfo.linkToManual;</label>&disabledUnsigned.devInfo.end;
+                </description>
+              </vbox>
+              <hbox class="view-header global-warning-container">
+                <!-- global warnings -->
+                <hbox class="global-warning" flex="1">
+                  <hbox class="global-warning-safemode" flex="1" align="center"
+                        tooltiptext="&warning.safemode.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.safemode.label;"/>
+                  </hbox>
+                  <hbox class="global-warning-checkcompatibility" flex="1" align="center"
+                        tooltiptext="&warning.checkcompatibility.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.checkcompatibility.label;"/>
+                  </hbox>
+                  <button class="button-link global-warning-checkcompatibility"
+                          label="&warning.checkcompatibility.enable.label;"
+                          tooltiptext="&warning.checkcompatibility.enable.tooltip;"
+                          command="cmd_enableCheckCompatibility"/>
+                  <hbox class="global-warning-updatesecurity" flex="1" align="center"
+                        tooltiptext="&warning.updatesecurity.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.updatesecurity.label;"/>
+                  </hbox>
+                  <button class="button-link global-warning-updatesecurity"
+                          label="&warning.updatesecurity.enable.label;"
+                          tooltiptext="&warning.updatesecurity.enable.tooltip;"
+                          command="cmd_enableUpdateSecurity"/>
+                  <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
                 </hbox>
-                <hbox class="global-warning-checkcompatibility" flex="1" align="center"
-                      tooltiptext="&warning.checkcompatibility.label;">
-                  <image class="warning-icon"/>
-                  <label class="global-warning-text" flex="1" crop="end"
-                         value="&warning.checkcompatibility.label;"/>
+              </hbox>
+              <hbox class="view-header global-info-container plugin-info-container">
+                <hbox class="global-info" flex="1" align="center">
+                  <button class="button-link global-info-plugincheck"
+                          label="&info.plugincheck.label;"
+                          tooltiptext="&info.plugincheck.tooltip;"
+                          command="cmd_pluginCheck"/>
+                  <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
                 </hbox>
-                <button class="button-link global-warning-checkcompatibility"
-                        label="&warning.checkcompatibility.enable.label;"
-                        tooltiptext="&warning.checkcompatibility.enable.tooltip;"
-                        command="cmd_enableCheckCompatibility"/>
-                <hbox class="global-warning-updatesecurity" flex="1" align="center"
-                      tooltiptext="&warning.updatesecurity.label;">
-                  <image class="warning-icon"/>
-                  <label class="global-warning-text" flex="1" crop="end"
-                         value="&warning.updatesecurity.label;"/>
+              </hbox>
+              <hbox class="view-header global-info-container experiment-info-container">
+                <hbox class="global-info" flex="1" align="center">
+                  <label value="&experiment.info.label;"/>
+                  <button id="experiments-learn-more"
+                          label="&experiment.info.learnmore;"
+                          tooltiptext="&experiment.info.learnmore;"
+                          accesskey="&experiment.info.learnmore.accesskey;"
+                          command="cmd_experimentsLearnMore"/>
+                  <button id="experiments-change-telemetry"
+                          label="&experiment.info.changetelemetry;"
+                          tooltiptext="&experiment.info.changetelemetry;"
+                          accesskey="&experiment.info.changetelemetry.accesskey;"
+                          command="cmd_experimentsOpenTelemetryPreferences"/>
+                  <spacer flex="5000"/> <!-- Necessary to allow the message to wrap. -->
                 </hbox>
-                <button class="button-link global-warning-updatesecurity"
-                        label="&warning.updatesecurity.enable.label;"
-                        tooltiptext="&warning.updatesecurity.enable.tooltip;"
-                        command="cmd_enableUpdateSecurity"/>
-                <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
               </hbox>
-              <spacer flex="1"/>
-              <hbox id="search-sorters" class="sort-controls"
-                    showrelevance="true" sortby="relevancescore" ascending="false"/>
-            </hbox>
-            <hbox id="search-filter" align="center">
-              <label id="search-filter-label" value="&search.filter2.label;"/>
-              <radiogroup id="search-filter-radiogroup" orient="horizontal"
-                          align="center" persist="value" value="remote">
-                <radio id="search-filter-local" class="search-filter-radio"
-                       label="&search.filter2.installed.label;" value="local"
-                       tooltiptext="&search.filter2.installed.tooltip;"/>
-                <radio id="search-filter-remote" class="search-filter-radio"
-                       label="&search.filter2.available.label;" value="remote"
-                       tooltiptext="&search.filter2.available.tooltip;"/>
-              </radiogroup>
-            </hbox>
-            <vbox id="search-loading" class="alert-container"
-                  flex="1" hidden="true">
-              <spacer class="alert-spacer-before"/>
-              <hbox class="alert loading" align="center">
-                <image/>
-                <label value="&loading.label;"/>
-              </hbox>
-              <spacer class="alert-spacer-after"/>
+              <vbox id="addon-list-empty" class="alert-container"
+                    flex="1" hidden="true">
+                <spacer class="alert-spacer-before"/>
+                <vbox class="alert">
+                  <label value="&listEmpty.installed.label;"/>
+                  <button class="discover-button"
+                          id="discover-button-install"
+                          label="&listEmpty.button.label;"
+                          command="cmd_goToDiscoverPane"/>
+                </vbox>
+                <spacer class="alert-spacer-after"/>
+              </vbox>
+              <richlistbox id="addon-list" class="list" flex="1"/>
             </vbox>
-            <vbox id="search-list-empty" class="alert-container"
-                  flex="1" hidden="true">
-              <spacer class="alert-spacer-before"/>
-              <vbox class="alert">
-                <label value="&listEmpty.search.label;"/>
-                <button class="discover-button"
-                        id="discover-button-search"
-                        label="&listEmpty.button.label;"
-                        command="cmd_goToDiscoverPane"/>
-              </vbox>
-              <spacer class="alert-spacer-after"/>
-            </vbox>
-            <richlistbox id="search-list" class="list" flex="1">
-              <hbox pack="center">
-                <label id="search-allresults-link" class="text-link"/>
+            <!-- updates view -->
+            <vbox id="updates-view" flex="1" class="view-pane" tabindex="0">
+              <hbox class="view-header global-warning-container" align="center">
+                <!-- global warnings -->
+                <hbox class="global-warning" flex="1">
+                  <hbox class="global-warning-safemode" flex="1" align="center"
+                        tooltiptext="&warning.safemode.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.safemode.label;"/>
+                  </hbox>
+                  <hbox class="global-warning-checkcompatibility" flex="1" align="center"
+                        tooltiptext="&warning.checkcompatibility.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.checkcompatibility.label;"/>
+                  </hbox>
+                  <button class="button-link global-warning-checkcompatibility"
+                          label="&warning.checkcompatibility.enable.label;"
+                          tooltiptext="&warning.checkcompatibility.enable.tooltip;"
+                          command="cmd_enableCheckCompatibility"/>
+                  <hbox class="global-warning-updatesecurity" flex="1" align="center"
+                        tooltiptext="&warning.updatesecurity.label;">
+                    <image class="warning-icon"/>
+                    <label class="global-warning-text" flex="1" crop="end"
+                           value="&warning.updatesecurity.label;"/>
+                  </hbox>
+                  <button class="button-link global-warning-updatesecurity"
+                          label="&warning.updatesecurity.enable.label;"
+                          tooltiptext="&warning.updatesecurity.enable.tooltip;"
+                          command="cmd_enableUpdateSecurity"/>
+                  <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
+                </hbox>
+                <spacer flex="1"/>
+                <hbox id="updates-sorters" class="sort-controls" sortby="updateDate"
+                      ascending="false"/>
               </hbox>
-            </richlistbox>
-          </vbox>
+              <vbox id="updates-list-empty" class="alert-container"
+                    flex="1" hidden="true">
+                <spacer class="alert-spacer-before"/>
+                <vbox class="alert">
+                  <label id="empty-availableUpdates-msg" value="&listEmpty.availableUpdates.label;"/>
+                  <label id="empty-recentUpdates-msg" value="&listEmpty.recentUpdates.label;"/>
+                  <button label="&listEmpty.findUpdates.label;"
+                          command="cmd_findAllUpdates"/>
+                </vbox>
+                <spacer class="alert-spacer-after"/>
+              </vbox>
+              <hbox id="update-actions" pack="center">
+                <button id="update-selected-btn" hidden="true"
+                        label="&updates.updateSelected.label;"
+                        tooltiptext="&updates.updateSelected.tooltip;"/>
+              </hbox>
+              <richlistbox id="updates-list" class="list" flex="1"/>
+            </vbox>
 
-          <!-- list view -->
-          <vbox id="list-view" flex="1" class="view-pane" align="stretch" tabindex="0">
-            <!-- 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">
-                &disabledUnsigned.devInfo.start;<label class="text-link plain" id="signing-dev-manual-link">&disabledUnsigned.devInfo.linkToManual;</label>&disabledUnsigned.devInfo.end;
-              </description>
-            </vbox>
-            <hbox class="view-header global-warning-container">
+            <!-- detail view -->
+            <scrollbox id="detail-view" flex="1" class="view-pane addon-view" orient="vertical" tabindex="0"
+                       role="document">
               <!-- global warnings -->
-              <hbox class="global-warning" flex="1">
+              <hbox class="global-warning-container global-warning">
                 <hbox class="global-warning-safemode" flex="1" align="center"
                       tooltiptext="&warning.safemode.label;">
                   <image class="warning-icon"/>
                   <label class="global-warning-text" flex="1" crop="end"
                          value="&warning.safemode.label;"/>
                 </hbox>
                 <hbox class="global-warning-checkcompatibility" flex="1" align="center"
                       tooltiptext="&warning.checkcompatibility.label;">
@@ -377,337 +509,210 @@
                          value="&warning.updatesecurity.label;"/>
                 </hbox>
                 <button class="button-link global-warning-updatesecurity"
                         label="&warning.updatesecurity.enable.label;"
                         tooltiptext="&warning.updatesecurity.enable.tooltip;"
                         command="cmd_enableUpdateSecurity"/>
                 <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
               </hbox>
-            </hbox>
-            <hbox class="view-header global-info-container plugin-info-container">
-              <hbox class="global-info" flex="1" align="center">
-                <button class="button-link global-info-plugincheck"
-                        label="&info.plugincheck.label;"
-                        tooltiptext="&info.plugincheck.tooltip;"
-                        command="cmd_pluginCheck"/>
-                <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
-              </hbox>
-            </hbox>
-            <hbox class="view-header global-info-container experiment-info-container">
-              <hbox class="global-info" flex="1" align="center">
-                <label value="&experiment.info.label;"/>
-                <button id="experiments-learn-more"
-                        label="&experiment.info.learnmore;"
-                        tooltiptext="&experiment.info.learnmore;"
-                        accesskey="&experiment.info.learnmore.accesskey;"
-                        command="cmd_experimentsLearnMore"/>
-                <button id="experiments-change-telemetry"
-                        label="&experiment.info.changetelemetry;"
-                        tooltiptext="&experiment.info.changetelemetry;"
-                        accesskey="&experiment.info.changetelemetry.accesskey;"
-                        command="cmd_experimentsOpenTelemetryPreferences"/>
-                <spacer flex="5000"/> <!-- Necessary to allow the message to wrap. -->
-              </hbox>
-            </hbox>
-            <vbox id="addon-list-empty" class="alert-container"
-                  flex="1" hidden="true">
-              <spacer class="alert-spacer-before"/>
-              <vbox class="alert">
-                <label value="&listEmpty.installed.label;"/>
-                <button class="discover-button"
-                        id="discover-button-install"
-                        label="&listEmpty.button.label;"
-                        command="cmd_goToDiscoverPane"/>
-              </vbox>
-              <spacer class="alert-spacer-after"/>
-            </vbox>
-            <richlistbox id="addon-list" class="list" flex="1"/>
-          </vbox>
-          <!-- updates view -->
-          <vbox id="updates-view" flex="1" class="view-pane" tabindex="0">
-            <hbox class="view-header global-warning-container" align="center">
-              <!-- global warnings -->
-              <hbox class="global-warning" flex="1">
-                <hbox class="global-warning-safemode" flex="1" align="center"
-                      tooltiptext="&warning.safemode.label;">
-                  <image class="warning-icon"/>
-                  <label class="global-warning-text" flex="1" crop="end"
-                         value="&warning.safemode.label;"/>
-                </hbox>
-                <hbox class="global-warning-checkcompatibility" flex="1" align="center"
-                      tooltiptext="&warning.checkcompatibility.label;">
-                  <image class="warning-icon"/>
-                  <label class="global-warning-text" flex="1" crop="end"
-                         value="&warning.checkcompatibility.label;"/>
-                </hbox>
-                <button class="button-link global-warning-checkcompatibility"
-                        label="&warning.checkcompatibility.enable.label;"
-                        tooltiptext="&warning.checkcompatibility.enable.tooltip;"
-                        command="cmd_enableCheckCompatibility"/>
-                <hbox class="global-warning-updatesecurity" flex="1" align="center"
-                      tooltiptext="&warning.updatesecurity.label;">
-                  <image class="warning-icon"/>
-                  <label class="global-warning-text" flex="1" crop="end"
-                         value="&warning.updatesecurity.label;"/>
-                </hbox>
-                <button class="button-link global-warning-updatesecurity"
-                        label="&warning.updatesecurity.enable.label;"
-                        tooltiptext="&warning.updatesecurity.enable.tooltip;"
-                        command="cmd_enableUpdateSecurity"/>
-                <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
-              </hbox>
-              <spacer flex="1"/>
-              <hbox id="updates-sorters" class="sort-controls" sortby="updateDate"
-                    ascending="false"/>
-            </hbox>
-            <vbox id="updates-list-empty" class="alert-container"
-                  flex="1" hidden="true">
-              <spacer class="alert-spacer-before"/>
-              <vbox class="alert">
-                <label id="empty-availableUpdates-msg" value="&listEmpty.availableUpdates.label;"/>
-                <label id="empty-recentUpdates-msg" value="&listEmpty.recentUpdates.label;"/>
-                <button label="&listEmpty.findUpdates.label;"
-                        command="cmd_findAllUpdates"/>
-              </vbox>
-              <spacer class="alert-spacer-after"/>
-            </vbox>
-            <hbox id="update-actions" pack="center">
-              <button id="update-selected-btn" hidden="true"
-                      label="&updates.updateSelected.label;"
-                      tooltiptext="&updates.updateSelected.tooltip;"/>
-            </hbox>
-            <richlistbox id="updates-list" class="list" flex="1"/>
-          </vbox>
-
-          <!-- detail view -->
-          <scrollbox id="detail-view" flex="1" class="view-pane addon-view" orient="vertical" tabindex="0"
-                     role="document">
-            <!-- global warnings -->
-            <hbox class="global-warning-container global-warning">
-              <hbox class="global-warning-safemode" flex="1" align="center"
-                    tooltiptext="&warning.safemode.label;">
-                <image class="warning-icon"/>
-                <label class="global-warning-text" flex="1" crop="end"
-                       value="&warning.safemode.label;"/>
-              </hbox>
-              <hbox class="global-warning-checkcompatibility" flex="1" align="center"
-                    tooltiptext="&warning.checkcompatibility.label;">
-                <image class="warning-icon"/>
-                <label class="global-warning-text" flex="1" crop="end"
-                       value="&warning.checkcompatibility.label;"/>
-              </hbox>
-              <button class="button-link global-warning-checkcompatibility"
-                      label="&warning.checkcompatibility.enable.label;"
-                      tooltiptext="&warning.checkcompatibility.enable.tooltip;"
-                      command="cmd_enableCheckCompatibility"/>
-              <hbox class="global-warning-updatesecurity" flex="1" align="center"
-                    tooltiptext="&warning.updatesecurity.label;">
-                <image class="warning-icon"/>
-                <label class="global-warning-text" flex="1" crop="end"
-                       value="&warning.updatesecurity.label;"/>
-              </hbox>
-              <button class="button-link global-warning-updatesecurity"
-                      label="&warning.updatesecurity.enable.label;"
-                      tooltiptext="&warning.updatesecurity.enable.tooltip;"
-                      command="cmd_enableUpdateSecurity"/>
-              <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
-            </hbox>
-            <hbox flex="1">
-              <spacer flex="1"/>
-              <!-- "loading" splash screen -->
-              <vbox class="alert-container">
-                <spacer class="alert-spacer-before"/>
-                <hbox class="alert loading">
-                  <image/>
-                  <label value="&loading.label;"/>
-                </hbox>
-                <spacer class="alert-spacer-after"/>
-              </vbox>
-              <!-- actual detail view -->
-              <vbox class="detail-view-container" flex="3" contextmenu="addonitem-popup">
-                <vbox id="detail-notifications">
-                  <hbox id="warning-container" align="center" class="warning">
-                    <image class="warning-icon"/>
-                    <label id="detail-warning" flex="1"/>
-                    <label id="detail-warning-link" class="text-link"/>
-                    <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
+              <hbox flex="1">
+                <spacer flex="1"/>
+                <!-- "loading" splash screen -->
+                <vbox class="alert-container">
+                  <spacer class="alert-spacer-before"/>
+                  <hbox class="alert loading">
+                    <image/>
+                    <label value="&loading.label;"/>
                   </hbox>
-                  <hbox id="error-container" align="center" class="error">
-                    <image class="error-icon"/>
-                    <label id="detail-error" flex="1"/>
-                    <label id="detail-error-link" class="text-link"/>
-                    <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
-                  </hbox>
-                  <hbox id="pending-container" align="center" class="pending">
-                    <image class="pending-icon"/>
-                    <label id="detail-pending" flex="1"/>
-                    <button id="detail-restart-btn" class="button-link"
-                            label="&addon.restartNow.label;"
-                            command="cmd_restartApp"/>
-                    <button id="detail-undo-btn" class="button-link"
-                            label="&addon.undoAction.label;"
-                            tooltipText="&addon.undoAction.tooltip;"
-                            command="cmd_cancelOperation"/>
-                    <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
+                  <spacer class="alert-spacer-after"/>
+                </vbox>
+                <!-- actual detail view -->
+                <vbox class="detail-view-container" flex="3" contextmenu="addonitem-popup">
+                  <vbox id="detail-notifications">
+                    <hbox id="warning-container" align="center" class="warning">
+                      <image class="warning-icon"/>
+                      <label id="detail-warning" flex="1"/>
+                      <label id="detail-warning-link" class="text-link"/>
+                      <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
+                    </hbox>
+                    <hbox id="error-container" align="center" class="error">
+                      <image class="error-icon"/>
+                      <label id="detail-error" flex="1"/>
+                      <label id="detail-error-link" class="text-link"/>
+                      <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
+                    </hbox>
+                    <hbox id="pending-container" align="center" class="pending">
+                      <image class="pending-icon"/>
+                      <label id="detail-pending" flex="1"/>
+                      <button id="detail-restart-btn" class="button-link"
+                              label="&addon.restartNow.label;"
+                              command="cmd_restartApp"/>
+                      <button id="detail-undo-btn" class="button-link"
+                              label="&addon.undoAction.label;"
+                              tooltipText="&addon.undoAction.tooltip;"
+                              command="cmd_cancelOperation"/>
+                      <spacer flex="5000"/> <!-- Necessary to allow the message to wrap -->
+                    </hbox>
+                  </vbox>
+                  <hbox align="start">
+                    <vbox id="detail-icon-container" align="end">
+                      <image id="detail-icon" class="icon"/>
+                    </vbox>
+                    <vbox flex="1">
+                      <vbox id="detail-summary">
+                        <hbox id="detail-name-container" class="name-container"
+                              align="start">
+                          <label id="detail-name" flex="1"/>
+                          <label id="detail-version"/>
+                          <label class="disabled-postfix" value="&addon.disabled.postfix;"/>
+                          <label class="update-postfix" value="&addon.update.postfix;"/>
+                          <spacer flex="5000"/> <!-- Necessary to allow the name to wrap -->
+                        </hbox>
+                        <label id="detail-creator" class="creator"/>
+                      </vbox>
+                      <hbox id="detail-experiment-container">
+                        <svg width="8" height="8" viewBox="0 0 8 8" version="1.1"
+                             xmlns="http://www.w3.org/2000/svg"
+                             id="detail-experiment-bullet-container">
+                          <circle cx="4" cy="4" r="4" id="detail-experiment-bullet"/>
+                        </svg>
+                        <label id="detail-experiment-state"/>
+                        <label id="detail-experiment-time"/>
+                      </hbox>
+                      <hbox id="detail-desc-container" align="start">
+                        <vbox id="detail-screenshot-box" pack="center" hidden="true"> <!-- Necessary to work around bug 394738 -->
+                          <image id="detail-screenshot"/>
+                        </vbox>
+                        <vbox flex="1">
+                          <description id="detail-desc"/>
+                          <description id="detail-fulldesc"/>
+                        </vbox>
+                      </hbox>
+                      <vbox id="detail-contributions">
+                        <description id="detail-contrib-description">
+                          &detail.contributions.description;
+                        </description>
+                        <hbox align="center">
+                          <label id="detail-contrib-suggested"/>
+                          <spacer flex="1"/>
+                          <button id="detail-contrib-btn"
+                                  label="&cmd.contribute.label;"
+                                  accesskey="&cmd.contribute.accesskey;"
+                                  tooltiptext="&cmd.contribute.tooltip;"
+                                  command="cmd_contribute"/>
+                        </hbox>
+                      </vbox>
+                      <grid id="detail-grid">
+                        <columns>
+                           <column flex="1"/>
+                           <column flex="2"/>
+                        </columns>
+                        <rows id="detail-rows">
+                          <row class="detail-row-complex" id="detail-updates-row">
+                            <label class="detail-row-label" value="&detail.updateType;"/>
+                            <hbox align="center">
+                              <radiogroup id="detail-autoUpdate" orient="horizontal">
+                                <!-- The values here need to match the values of
+                                     AddonManager.AUTOUPDATE_* -->
+                                <radio label="&detail.updateDefault.label;"
+                                       tooltiptext="&detail.updateDefault.tooltip;"
+                                       value="1"/>
+                                <radio label="&detail.updateAutomatic.label;"
+                                       tooltiptext="&detail.updateAutomatic.tooltip;"
+                                       value="2"/>
+                                <radio label="&detail.updateManual.label;"
+                                       tooltiptext="&detail.updateManual.tooltip;"
+                                       value="0"/>
+                              </radiogroup>
+                              <button id="detail-findUpdates-btn" class="button-link"
+                                      label="&detail.checkForUpdates.label;"
+                                      accesskey="&detail.checkForUpdates.accesskey;"
+                                      tooltiptext="&detail.checkForUpdates.tooltip;"
+                                      command="cmd_findItemUpdates"/>
+                            </hbox>
+                          </row>
+                          <row class="detail-row" id="detail-dateUpdated" label="&detail.lastupdated.label;"/>
+                          <row class="detail-row-complex" id="detail-homepage-row" label="&detail.home;">
+                            <label class="detail-row-label" value="&detail.home;"/>
+                            <label id="detail-homepage" class="detail-row-value text-link" crop="end"/>
+                          </row>
+                          <row class="detail-row-complex" id="detail-repository-row" label="&detail.repository;">
+                            <label class="detail-row-label" value="&detail.repository;"/>
+                            <label id="detail-repository" class="detail-row-value text-link"/>
+                          </row>
+                          <row class="detail-row" id="detail-size" label="&detail.size;"/>
+                          <row class="detail-row-complex" id="detail-rating-row">
+                            <label class="detail-row-label" value="&rating2.label;"/>
+                            <hbox>
+                              <label id="detail-rating" class="meta-value meta-rating"
+                                     showrating="average"/>
+                              <label id="detail-reviews" class="text-link"/>
+                            </hbox>
+                          </row>
+                          <row class="detail-row" id="detail-downloads" label="&detail.numberOfDownloads.label;"/>
+                        </rows>
+                      </grid>
+                      <hbox id="detail-controls">
+                        <button id="detail-prefs-btn" class="addon-control preferences"
+#ifdef XP_WIN
+                                label="&detail.showPreferencesWin.label;"
+                                accesskey="&detail.showPreferencesWin.accesskey;"
+                                tooltiptext="&detail.showPreferencesWin.tooltip;"
+#else
+                                label="&detail.showPreferencesUnix.label;"
+                                accesskey="&detail.showPreferencesUnix.accesskey;"
+                                tooltiptext="&detail.showPreferencesUnix.tooltip;"
+#endif
+                                command="cmd_showItemPreferences"/>
+                        <spacer flex="1"/>
+                        <button id="detail-enable-btn" class="addon-control enable"
+                                label="&cmd.enableAddon.label;"
+                                accesskey="&cmd.enableAddon.accesskey;"
+                                command="cmd_enableItem"/>
+                        <button id="detail-disable-btn" class="addon-control disable"
+                                label="&cmd.disableAddon.label;"
+                                accesskey="&cmd.disableAddon.accesskey;"
+                                command="cmd_disableItem"/>
+                        <button id="detail-uninstall-btn" class="addon-control remove"
+                                label="&cmd.uninstallAddon.label;"
+                                accesskey="&cmd.uninstallAddon.accesskey;"
+                                command="cmd_uninstallItem"/>
+                        <button id="detail-purchase-btn" class="addon-control purchase"
+                                command="cmd_purchaseItem"/>
+                        <button id="detail-install-btn" class="addon-control install"
+                                label="&cmd.installAddon.label;"
+                                accesskey="&cmd.installAddon.accesskey;"
+                                command="cmd_installItem"/>
+                        <menulist id="detail-state-menulist"
+                                  crop="none" sizetopopup="always"
+                                  tooltiptext="&cmd.stateMenu.tooltip;">
+                          <menupopup>
+                            <menuitem id="detail-ask-to-activate-menuitem"
+                                      class="addon-control"
+                                      label="&cmd.askToActivate.label;"
+                                      tooltiptext="&cmd.askToActivate.tooltip;"
+                                      command="cmd_askToActivateItem"/>
+                            <menuitem id="detail-always-activate-menuitem"
+                                      class="addon-control"
+                                      label="&cmd.alwaysActivate.label;"
+                                      tooltiptext="&cmd.alwaysActivate.tooltip;"
+                                      command="cmd_alwaysActivateItem"/>
+                            <menuitem id="detail-never-activate-menuitem"
+                                      class="addon-control"
+                                      label="&cmd.neverActivate.label;"
+                                      tooltiptext="&cmd.neverActivate.tooltip;"
+                                      command="cmd_neverActivateItem"/>
+                          </menupopup>
+                        </menulist>
+                      </hbox>
+                    </vbox>
                   </hbox>
                 </vbox>
-                <hbox align="start">
-                  <vbox id="detail-icon-container" align="end">
-                    <image id="detail-icon" class="icon"/>
-                  </vbox>
-                  <vbox flex="1">
-                    <vbox id="detail-summary">
-                      <hbox id="detail-name-container" class="name-container"
-                            align="start">
-                        <label id="detail-name" flex="1"/>
-                        <label id="detail-version"/>
-                        <label class="disabled-postfix" value="&addon.disabled.postfix;"/>
-                        <label class="update-postfix" value="&addon.update.postfix;"/>
-                        <spacer flex="5000"/> <!-- Necessary to allow the name to wrap -->
-                      </hbox>
-                      <label id="detail-creator" class="creator"/>
-                    </vbox>
-                    <hbox id="detail-experiment-container">
-                      <svg width="8" height="8" viewBox="0 0 8 8" version="1.1"
-                           xmlns="http://www.w3.org/2000/svg"
-                           id="detail-experiment-bullet-container">
-                        <circle cx="4" cy="4" r="4" id="detail-experiment-bullet"/>
-                      </svg>
-                      <label id="detail-experiment-state"/>
-                      <label id="detail-experiment-time"/>
-                    </hbox>
-                    <hbox id="detail-desc-container" align="start">
-                      <vbox id="detail-screenshot-box" pack="center" hidden="true"> <!-- Necessary to work around bug 394738 -->
-                        <image id="detail-screenshot"/>
-                      </vbox>
-                      <vbox flex="1">
-                        <description id="detail-desc"/>
-                        <description id="detail-fulldesc"/>
-                      </vbox>
-                    </hbox>
-                    <vbox id="detail-contributions">
-                      <description id="detail-contrib-description">
-                        &detail.contributions.description;
-                      </description>
-                      <hbox align="center">
-                        <label id="detail-contrib-suggested"/>
-                        <spacer flex="1"/>
-                        <button id="detail-contrib-btn"
-                                label="&cmd.contribute.label;"
-                                accesskey="&cmd.contribute.accesskey;"
-                                tooltiptext="&cmd.contribute.tooltip;"
-                                command="cmd_contribute"/>
-                      </hbox>
-                    </vbox>
-                    <grid id="detail-grid">
-                      <columns>
-                         <column flex="1"/>
-                         <column flex="2"/>
-                      </columns>
-                      <rows id="detail-rows">
-                        <row class="detail-row-complex" id="detail-updates-row">
-                          <label class="detail-row-label" value="&detail.updateType;"/>
-                          <hbox align="center">
-                            <radiogroup id="detail-autoUpdate" orient="horizontal">
-                              <!-- The values here need to match the values of
-                                   AddonManager.AUTOUPDATE_* -->
-                              <radio label="&detail.updateDefault.label;"
-                                     tooltiptext="&detail.updateDefault.tooltip;"
-                                     value="1"/>
-                              <radio label="&detail.updateAutomatic.label;"
-                                     tooltiptext="&detail.updateAutomatic.tooltip;"
-                                     value="2"/>
-                              <radio label="&detail.updateManual.label;"
-                                     tooltiptext="&detail.updateManual.tooltip;"
-                                     value="0"/>
-                            </radiogroup>
-                            <button id="detail-findUpdates-btn" class="button-link"
-                                    label="&detail.checkForUpdates.label;"
-                                    accesskey="&detail.checkForUpdates.accesskey;"
-                                    tooltiptext="&detail.checkForUpdates.tooltip;"
-                                    command="cmd_findItemUpdates"/>
-                          </hbox>
-                        </row>
-                        <row class="detail-row" id="detail-dateUpdated" label="&detail.lastupdated.label;"/>
-                        <row class="detail-row-complex" id="detail-homepage-row" label="&detail.home;">
-                          <label class="detail-row-label" value="&detail.home;"/>
-                          <label id="detail-homepage" class="detail-row-value text-link" crop="end"/>
-                        </row>
-                        <row class="detail-row-complex" id="detail-repository-row" label="&detail.repository;">
-                          <label class="detail-row-label" value="&detail.repository;"/>
-                          <label id="detail-repository" class="detail-row-value text-link"/>
-                        </row>
-                        <row class="detail-row" id="detail-size" label="&detail.size;"/>
-                        <row class="detail-row-complex" id="detail-rating-row">
-                          <label class="detail-row-label" value="&rating2.label;"/>
-                          <hbox>
-                            <label id="detail-rating" class="meta-value meta-rating"
-                                   showrating="average"/>
-                            <label id="detail-reviews" class="text-link"/>
-                          </hbox>
-                        </row>
-                        <row class="detail-row" id="detail-downloads" label="&detail.numberOfDownloads.label;"/>
-                      </rows>
-                    </grid>
-                    <hbox id="detail-controls">
-                      <button id="detail-prefs-btn" class="addon-control preferences"
-#ifdef XP_WIN
-                              label="&detail.showPreferencesWin.label;"
-                              accesskey="&detail.showPreferencesWin.accesskey;"
-                              tooltiptext="&detail.showPreferencesWin.tooltip;"
-#else
-                              label="&detail.showPreferencesUnix.label;"
-                              accesskey="&detail.showPreferencesUnix.accesskey;"
-                              tooltiptext="&detail.showPreferencesUnix.tooltip;"
-#endif
-                              command="cmd_showItemPreferences"/>
-                      <spacer flex="1"/>
-                      <button id="detail-enable-btn" class="addon-control enable"
-                              label="&cmd.enableAddon.label;"
-                              accesskey="&cmd.enableAddon.accesskey;"
-                              command="cmd_enableItem"/>
-                      <button id="detail-disable-btn" class="addon-control disable"
-                              label="&cmd.disableAddon.label;"
-                              accesskey="&cmd.disableAddon.accesskey;"
-                              command="cmd_disableItem"/>
-                      <button id="detail-uninstall-btn" class="addon-control remove"
-                              label="&cmd.uninstallAddon.label;"
-                              accesskey="&cmd.uninstallAddon.accesskey;"
-                              command="cmd_uninstallItem"/>
-                      <button id="detail-purchase-btn" class="addon-control purchase"
-                              command="cmd_purchaseItem"/>
-                      <button id="detail-install-btn" class="addon-control install"
-                              label="&cmd.installAddon.label;"
-                              accesskey="&cmd.installAddon.accesskey;"
-                              command="cmd_installItem"/>
-                      <menulist id="detail-state-menulist"
-                                crop="none" sizetopopup="always"
-                                tooltiptext="&cmd.stateMenu.tooltip;">
-                        <menupopup>
-                          <menuitem id="detail-ask-to-activate-menuitem"
-                                    class="addon-control"
-                                    label="&cmd.askToActivate.label;"
-                                    tooltiptext="&cmd.askToActivate.tooltip;"
-                                    command="cmd_askToActivateItem"/>
-                          <menuitem id="detail-always-activate-menuitem"
-                                    class="addon-control"
-                                    label="&cmd.alwaysActivate.label;"
-                                    tooltiptext="&cmd.alwaysActivate.tooltip;"
-                                    command="cmd_alwaysActivateItem"/>
-                          <menuitem id="detail-never-activate-menuitem"
-                                    class="addon-control"
-                                    label="&cmd.neverActivate.label;"
-                                    tooltiptext="&cmd.neverActivate.tooltip;"
-                                    command="cmd_neverActivateItem"/>
-                        </menupopup>
-                      </menulist>
-                    </hbox>
-                  </vbox>
-                </hbox>
-              </vbox>
-              <spacer flex="1"/>
-            </hbox>
-          </scrollbox>
-        </deck>
+                <spacer flex="1"/>
+              </hbox>
+            </scrollbox>
+          </deck>
+        </vbox>
+      </deck>
     </vbox>
   </hbox>
 </page>
--- a/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug562797.js
@@ -122,36 +122,36 @@ function check_state(aManager, canGoBack
     is(!doc.getElementById("forward-btn").disabled, canGoForward, "Forward button should have the right state");
   }
 }
 
 function is_in_list(aManager, view, canGoBack, canGoForward) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
-  is(doc.getElementById("view-port").selectedPanel.id, "list-view", "Should be on the right view");
+  is(get_current_view(aManager).id, "list-view", "Should be on the right view");
 
   check_state(aManager, canGoBack, canGoForward);
 }
 
 function is_in_search(aManager, query, canGoBack, canGoForward) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, "addons://search/", "Should be on the right category");
-  is(doc.getElementById("view-port").selectedPanel.id, "search-view", "Should be on the right view");
+  is(get_current_view(aManager).id, "search-view", "Should be on the right view");
   is(doc.getElementById("header-search").value, query, "Should have used the right query");
 
   check_state(aManager, canGoBack, canGoForward);
 }
 
 function is_in_detail(aManager, view, canGoBack, canGoForward) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
-  is(doc.getElementById("view-port").selectedPanel.id, "detail-view", "Should be on the right view");
+  is(get_current_view(aManager).id, "detail-view", "Should be on the right view");
 
   check_state(aManager, canGoBack, canGoForward);
 }
 
 function is_in_discovery(aManager, url, canGoBack, canGoForward) {
   var browser = aManager.document.getElementById("discover-browser");
 
   is(aManager.document.getElementById("discover-view").selectedPanel, browser,
--- a/toolkit/mozapps/extensions/test/browser/browser_bug562854.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug562854.js
@@ -25,24 +25,24 @@ function test() {
 function end_test() {
   finish();
 }
 
 function is_in_list(aManager, view) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
-  is(doc.getElementById("view-port").selectedPanel.id, "list-view", "Should be on the right view");
+  is(get_current_view(aManager).id, "list-view", "Should be on the right view");
 }
 
 function is_in_detail(aManager, view) {
   var doc = aManager.document;
 
   is(doc.getElementById("categories").selectedItem.value, view, "Should be on the right category");
-  is(doc.getElementById("view-port").selectedPanel.id, "detail-view", "Should be on the right view");
+  is(get_current_view(aManager).id, "detail-view", "Should be on the right view");
 }
 
 // Check that double-click does something.
 add_test(function() {
   open_manager("addons://list/extension", function(aManager) {
     info("Part 1");
     is_in_list(aManager, "addons://list/extension");
 
--- a/toolkit/mozapps/extensions/test/browser/browser_bug581076.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_bug581076.js
@@ -6,26 +6,28 @@
 
 const PREF_GETADDONS_BROWSESEARCHRESULTS = "extensions.getAddons.search.browseURL";
 const PREF_GETADDONS_GETSEARCHRESULTS = "extensions.getAddons.search.url";
 const PREF_GETADDONS_MAXRESULTS = "extensions.getAddons.maxResults";
 const SEARCH_URL = TESTROOT + "browser_searching.xml";
 const SEARCH_EXPECTED_TOTAL = 100;
 const SEARCH_QUERY = "search";
 
+const SEARCHABLE_PAGE = "addons://list/extension";
+
 var gManagerWindow;
 
 
 function test() {
   Services.prefs.setCharPref(PREF_GETADDONS_GETSEARCHRESULTS, SEARCH_URL);
   Services.prefs.setIntPref(PREF_SEARCH_MAXRESULTS, 15);
 
   waitForExplicitFinish();
 
-  open_manager("addons://list/extension", function(aWindow) {
+  open_manager(SEARCHABLE_PAGE, function(aWindow) {
     gManagerWindow = aWindow;
     run_next_test();
   });
 }
 
 function end_test() {
   // Test generates a lot of available installs so just cancel them all
   AddonManager.getAllInstalls(function(aInstalls) {
@@ -71,41 +73,42 @@ function check_allresultslink(aShouldSho
     is_element_hidden(link, "All Results link should be hidden");
   }
 }
 
 add_test(function() {
   info("Searching locally");
   search(false, function() {
     check_allresultslink(false);
-    restart_manager(gManagerWindow, null, function(aManager) {
+    restart_manager(gManagerWindow, SEARCHABLE_PAGE, function(aManager) {
       gManagerWindow = aManager;
       run_next_test();
     });
   });
 });
 
 add_test(function() {
+    debugger;
   info("Searching remotely - more results than cap");
   Services.prefs.setIntPref(PREF_GETADDONS_MAXRESULTS, 3);
   search(true, function() {
     check_allresultslink(true);
-    restart_manager(gManagerWindow, null, function(aManager) {
+    restart_manager(gManagerWindow, SEARCHABLE_PAGE, function(aManager) {
       gManagerWindow = aManager;
       run_next_test();
     });
   });
 });
 
 add_test(function() {
   info("Searching remotely - less results than cap");
   Services.prefs.setIntPref(PREF_GETADDONS_MAXRESULTS, 200);
   search(true, function() {
     check_allresultslink(false);
-    restart_manager(gManagerWindow, null, function(aManager) {
+    restart_manager(gManagerWindow, SEARCHABLE_PAGE, function(aManager) {
       gManagerWindow = aManager;
       run_next_test();
     });
   });
 });
 
 add_test(function() {
   info("Searching remotely - more results than cap");
--- a/toolkit/mozapps/extensions/test/browser/browser_experiments.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_experiments.js
@@ -23,17 +23,17 @@ function getExperimentAddons() {
   AddonManager.getAddonsByTypes(["experiment"], (addons) => {
     deferred.resolve(addons);
   });
   return deferred.promise;
 }
 
 function getInstallItem() {
   let doc = gManagerWindow.document;
-  let view = doc.getElementById("view-port").selectedPanel;
+  let view = get_current_view(gManagerWindow);
   let list = doc.getElementById("addon-list");
 
   let node = list.firstChild;
   while (node) {
     if (node.getAttribute("status") == "installing") {
       return node;
     }
     node = node.nextSibling;
--- a/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_gmpProvider.js
@@ -66,17 +66,17 @@ function getInstallItem() {
     }
     node = node.nextSibling;
   }
 
   return null;
 }
 
 function openDetailsView(aId) {
-  let view = gManagerWindow.document.getElementById("view-port").selectedPanel
+  let view = get_current_view(gManagerWindow);
   Assert.equal(view.id, "list-view", "Should be in the list view to use this function");
 
   let item = get_addon_element(gManagerWindow, aId);
   Assert.ok(item, "Should have got add-on element.");
   is_element_visible(item, "Add-on element should be visible.");
 
   item.scrollIntoView();
   EventUtils.synthesizeMouseAtCenter(item, { clickCount: 1 }, gManagerWindow);
--- a/toolkit/mozapps/extensions/test/browser/browser_searching.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_searching.js
@@ -612,17 +612,17 @@ add_test(function() {
 
     AddonManager.checkCompatibility = true;
     run_next_test();
   });
 });
 
 // Tests that compatible-by-default addons are shown if strict compatibility checking is disabled
 add_test(function() {
-  restart_manager(gManagerWindow, null, function(aWindow) {
+  restart_manager(gManagerWindow, "addons://list/extension", function(aWindow) {
     gManagerWindow = aWindow;
     gCategoryUtilities = new CategoryUtilities(gManagerWindow);
 
     Services.prefs.setBoolPref(PREF_STRICT_COMPAT, false);
     search("incompatible", false, function() {
       var item = get_addon_item("remote5");
       is_element_visible(item, "Incompatible addon should be visible");
       isnot(item.getAttribute("notification"), "warning", "Compatibility warning should not be shown");
@@ -644,23 +644,26 @@ add_test(function() {
     gCategoryUtilities = new CategoryUtilities(gManagerWindow);
 
     // We never restore to the search pane
     is(gCategoryUtilities.selectedCategory, "discover", "View should have changed to discover");
 
     // Installed add-on is considered local on new search
     gAddonInstalled = true;
 
-    search(QUERY, false, function() {
-      check_filtered_results(QUERY, "relevancescore", false);
+    // Switch over to extensions list so we can do a new search
+    gCategoryUtilities.openType("extension", function() {
+      search(QUERY, false, function() {
+        check_filtered_results(QUERY, "relevancescore", false);
 
-      var installBtn = get_install_button(get_addon_item(REMOTE_TO_INSTALL));
-      is(installBtn.hidden, true, "Install button should be hidden for installed item");
+        var installBtn = get_install_button(get_addon_item(REMOTE_TO_INSTALL));
+        is(installBtn.hidden, true, "Install button should be hidden for installed item");
 
-      run_next_test();
+        run_next_test();
+      });
     });
   });
 });
 
 function bug_815120_test_search(aLocalOnly) {
   restart_manager(gManagerWindow, "addons://list/extension", function(aWindow) {
     gManagerWindow = aWindow;
     gCategoryUtilities = new CategoryUtilities(gManagerWindow);
--- a/toolkit/mozapps/extensions/test/browser/browser_uninstalling.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_uninstalling.js
@@ -447,17 +447,17 @@ add_test(function() {
       ok(aAddon.operationsRequiringRestart & AddonManager.OP_NEEDS_RESTART_UNINSTALL, "Add-on should require a restart to uninstall");
 
       var item = get_item_in_list(ID, list);
       isnot(item, null, "Should have found the add-on in the list");
 
       EventUtils.synthesizeMouseAtCenter(item, { clickCount: 1 }, gManagerWindow);
       EventUtils.synthesizeMouseAtCenter(item, { clickCount: 2 }, gManagerWindow);
       wait_for_view_load(gManagerWindow, function() {
-        is(gDocument.getElementById("view-port").selectedPanel.id, "detail-view", "Should be in the detail view");
+        is(get_current_view(gManagerWindow).id, "detail-view", "Should be in the detail view");
 
         var button = gDocument.getElementById("detail-uninstall-btn");
         isnot(button, null, "Should have a remove button");
         ok(!button.disabled, "Button should not be disabled");
 
         EventUtils.synthesizeMouseAtCenter(button, { }, gManagerWindow);
 
         wait_for_view_load(gManagerWindow, function() {
@@ -511,17 +511,17 @@ add_test(function() {
       ok(!(aAddon.pendingOperations & AddonManager.PENDING_UNINSTALL), "Add-on should not be pending uninstall");
 
       var item = get_item_in_list(ID, list);
       isnot(item, null, "Should have found the add-on in the list");
 
       EventUtils.synthesizeMouseAtCenter(item, { clickCount: 1 }, gManagerWindow);
       EventUtils.synthesizeMouseAtCenter(item, { clickCount: 2 }, gManagerWindow);
       wait_for_view_load(gManagerWindow, function() {
-        is(gDocument.getElementById("view-port").selectedPanel.id, "detail-view", "Should be in the detail view");
+        is(get_current_view(gManagerWindow).id, "detail-view", "Should be in the detail view");
 
         var button = gDocument.getElementById("detail-uninstall-btn");
         isnot(button, null, "Should have a remove button");
         ok(!button.disabled, "Button should not be disabled");
 
         EventUtils.synthesizeMouseAtCenter(button, { }, gManagerWindow);
 
         wait_for_view_load(gManagerWindow, function() {
@@ -578,17 +578,17 @@ add_test(function() {
       ok(!(aAddon.pendingOperations & AddonManager.PENDING_UNINSTALL), "Add-on should not be pending uninstall");
 
       var item = get_item_in_list(ID, list);
       isnot(item, null, "Should have found the add-on in the list");
 
       EventUtils.synthesizeMouseAtCenter(item, { clickCount: 1 }, gManagerWindow);
       EventUtils.synthesizeMouseAtCenter(item, { clickCount: 2 }, gManagerWindow);
       wait_for_view_load(gManagerWindow, function() {
-        is(gDocument.getElementById("view-port").selectedPanel.id, "detail-view", "Should be in the detail view");
+        is(get_current_view(gManagerWindow).id, "detail-view", "Should be in the detail view");
 
         var button = gDocument.getElementById("detail-uninstall-btn");
         isnot(button, null, "Should have a remove button");
         ok(!button.disabled, "Button should not be disabled");
 
         EventUtils.synthesizeMouseAtCenter(button, { }, gManagerWindow);
 
         wait_for_view_load(gManagerWindow, function() {
@@ -1063,17 +1063,17 @@ add_test(function() {
 
       EventUtils.synthesizeMouseAtCenter(button, { }, gManagerWindow);
 
       close_manager(gManagerWindow, function() {
         AddonManager.getAddonsByIDs([ID, ID2], function([aAddon, aAddon2]) {
           is(aAddon, null, "Add-on should no longer be installed");
           is(aAddon2, null, "Second add-on should no longer be installed");
 
-          open_manager(null, function(aWindow) {
+          open_manager("addons://list/extension", function(aWindow) {
             gManagerWindow = aWindow;
             gDocument = gManagerWindow.document;
             gCategoryUtilities = new CategoryUtilities(gManagerWindow);
             var list = gDocument.getElementById("search-list");
             var searchBox = gManagerWindow.document.getElementById("header-search");
 
             searchBox.value = "Uninstall";
 
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -279,20 +279,29 @@ function get_addon_file_url(aFilename) {
     var jar = getJar(CHROMEROOT + "addons/" + aFilename);
     var tmpDir = extractJarToTmp(jar);
     tmpDir.append(aFilename);
 
     return Services.io.newFileURI(tmpDir).QueryInterface(Ci.nsIFileURL);
   }
 }
 
+function get_current_view(aManager) {
+  let view = aManager.document.getElementById("view-port").selectedPanel;
+  if (view.id == "headered-views") {
+    view = aManager.document.getElementById("headered-views-content").selectedPanel;
+  }
+  is(view, aManager.gViewController.displayedView, "view controller is tracking the displayed view correctly");
+  return view;
+}
+
 function get_test_items_in_list(aManager) {
   var tests = "@tests.mozilla.org";
 
-  let view = aManager.document.getElementById("view-port").selectedPanel;
+  let view = get_current_view(aManager);
   let listid = view.id == "search-view" ? "search-list" : "addon-list";
   let item = aManager.document.getElementById(listid).firstChild;
   let items = [];
 
   while (item) {
     if (item.localName != "richlistitem") {
       item = item.nextSibling;
       continue;
@@ -303,17 +312,17 @@ function get_test_items_in_list(aManager
     item = item.nextSibling;
   }
 
   return items;
 }
 
 function check_all_in_list(aManager, aIds, aIgnoreExtras) {
   var doc = aManager.document;
-  var view = doc.getElementById("view-port").selectedPanel;
+  var view = get_current_view(aManager);
   var listid = view.id == "search-view" ? "search-list" : "addon-list";
   var list = doc.getElementById(listid);
 
   var inlist = [];
   var node = list.firstChild;
   while (node) {
     if (node.value)
       inlist.push(node.value);
@@ -331,17 +340,17 @@ function check_all_in_list(aManager, aId
   for (let inlistItem of inlist) {
     if (aIds.indexOf(inlistItem) == -1)
       ok(false, "Shouldn't have seen " + inlistItem + " in the list");
   }
 }
 
 function get_addon_element(aManager, aId) {
   var doc = aManager.document;
-  var view = doc.getElementById("view-port").selectedPanel;
+  var view = get_current_view(aManager);
   var listid = "addon-list";
   if (view.id == "search-view")
     listid = "search-list";
   else if (view.id == "updates-view")
     listid = "updates-list";
   var list = doc.getElementById(listid);
 
   var node = list.firstChild;