Bug 1616700 - Part 2 - Apply a disabled appearance to the handed-off input rather than hiding it. r=Standard8
authorHarry Twyford <htwyford@mozilla.com>
Tue, 23 Mar 2021 22:56:54 +0000
changeset 572782 69900b283aa4250bc867cfb0ea03633244f56880
parent 572781 7415db8cd0fb0088de1916d7ab2d8a3a9b9e5576
child 572783 3aba8daf43c29f33ccdd380f6c9a9f3bf60df8b1
push id38314
push userabutkovits@mozilla.com
push dateWed, 24 Mar 2021 04:07:32 +0000
treeherdermozilla-central@768e04aaea52 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersStandard8
bugs1616700
milestone89.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 1616700 - Part 2 - Apply a disabled appearance to the handed-off input rather than hiding it. r=Standard8 Differential Revision: https://phabricator.services.mozilla.com/D108826
browser/actors/AboutPrivateBrowsingParent.jsm
browser/components/newtab/common/Actions.jsm
browser/components/newtab/common/Reducers.jsm
browser/components/newtab/content-src/components/Search/Search.jsx
browser/components/newtab/content-src/components/Search/_Search.scss
browser/components/newtab/css/activity-stream-linux.css
browser/components/newtab/css/activity-stream-mac.css
browser/components/newtab/css/activity-stream-windows.css
browser/components/newtab/data/content/activity-stream.bundle.js
browser/components/newtab/lib/PlacesFeed.jsm
browser/components/newtab/test/unit/common/Reducers.test.js
browser/components/newtab/test/unit/content-src/components/Search.test.jsx
browser/components/newtab/test/unit/lib/PlacesFeed.test.js
browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css
--- a/browser/actors/AboutPrivateBrowsingParent.jsm
+++ b/browser/actors/AboutPrivateBrowsingParent.jsm
@@ -71,17 +71,17 @@ class AboutPrivateBrowsingParent extends
         let checkFirstChange = () => {
           // Check if this is the first change since we hidden focused. If it is,
           // remove hidden focus styles, prepend the search alias and hide the
           // in-content search.
           if (isFirstChange) {
             isFirstChange = false;
             urlBar.removeHiddenFocus();
             urlBar.search("");
-            this.sendAsyncMessage("HideSearch");
+            this.sendAsyncMessage("DisableSearch");
             urlBar.removeEventListener("compositionstart", checkFirstChange);
             urlBar.removeEventListener("paste", checkFirstChange);
           }
         };
 
         let onKeydown = ev => {
           // Check if the keydown will cause a value change.
           if (ev.key.length === 1 && !ev.altKey && !ev.ctrlKey && !ev.metaKey) {
--- a/browser/components/newtab/common/Actions.jsm
+++ b/browser/components/newtab/common/Actions.jsm
@@ -38,16 +38,17 @@ for (const type of [
   "BOOKMARK_URL",
   "CLEAR_PREF",
   "COPY_DOWNLOAD_LINK",
   "DELETE_BOOKMARK_BY_ID",
   "DELETE_FROM_POCKET",
   "DELETE_HISTORY_URL",
   "DIALOG_CANCEL",
   "DIALOG_OPEN",
+  "DISABLE_SEARCH",
   "DISCOVERY_STREAM_COLLECTION_DISMISSIBLE_TOGGLE",
   "DISCOVERY_STREAM_CONFIG_CHANGE",
   "DISCOVERY_STREAM_CONFIG_RESET",
   "DISCOVERY_STREAM_CONFIG_RESET_DEFAULTS",
   "DISCOVERY_STREAM_CONFIG_SETUP",
   "DISCOVERY_STREAM_CONFIG_SET_VALUE",
   "DISCOVERY_STREAM_DEV_EXPIRE_CACHE",
   "DISCOVERY_STREAM_DEV_IDLE_DAILY",
@@ -71,17 +72,16 @@ for (const type of [
   "DISCOVERY_STREAM_SPOCS_UPDATE",
   "DISCOVERY_STREAM_SPOC_BLOCKED",
   "DISCOVERY_STREAM_SPOC_IMPRESSION",
   "DOWNLOAD_CHANGED",
   "FAKE_FOCUS_SEARCH",
   "FILL_SEARCH_TERM",
   "HANDOFF_SEARCH_TO_AWESOMEBAR",
   "HIDE_PRIVACY_INFO",
-  "HIDE_SEARCH",
   "INIT",
   "NEW_TAB_INIT",
   "NEW_TAB_INITIAL_STATE",
   "NEW_TAB_LOAD",
   "NEW_TAB_REHYDRATED",
   "NEW_TAB_STATE_REQUEST",
   "NEW_TAB_UNLOAD",
   "OPEN_DOWNLOAD_FILE",
--- a/browser/components/newtab/common/Reducers.jsm
+++ b/browser/components/newtab/common/Reducers.jsm
@@ -803,22 +803,22 @@ function DiscoveryStream(prevState = INI
       return prevState;
     default:
       return prevState;
   }
 }
 
 function Search(prevState = INITIAL_STATE.Search, action) {
   switch (action.type) {
-    case at.HIDE_SEARCH:
-      return Object.assign({ ...prevState, hide: true });
+    case at.DISABLE_SEARCH:
+      return Object.assign({ ...prevState, disable: true });
     case at.FAKE_FOCUS_SEARCH:
       return Object.assign({ ...prevState, fakeFocus: true });
     case at.SHOW_SEARCH:
-      return Object.assign({ ...prevState, hide: false, fakeFocus: false });
+      return Object.assign({ ...prevState, disable: false, fakeFocus: false });
     default:
       return prevState;
   }
 }
 
 this.INITIAL_STATE = INITIAL_STATE;
 this.TOP_SITES_DEFAULT_ROWS = TOP_SITES_DEFAULT_ROWS;
 this.TOP_SITES_MAX_SITES_PER_ROW = TOP_SITES_MAX_SITES_PER_ROW;
--- a/browser/components/newtab/content-src/components/Search/Search.jsx
+++ b/browser/components/newtab/content-src/components/Search/Search.jsx
@@ -37,17 +37,17 @@ export class _Search extends React.PureC
 
   doSearchHandoff(text) {
     this.props.dispatch(
       ac.OnlyToMain({ type: at.HANDOFF_SEARCH_TO_AWESOMEBAR, data: { text } })
     );
     this.props.dispatch({ type: at.FAKE_FOCUS_SEARCH });
     this.props.dispatch(ac.UserEvent({ event: "SEARCH_HANDOFF" }));
     if (text) {
-      this.props.dispatch({ type: at.HIDE_SEARCH });
+      this.props.dispatch({ type: at.DISABLE_SEARCH });
     }
   }
 
   onSearchHandoffClick(event) {
     // When search hand-off is enabled, we render a big button that is styled to
     // look like a search textbox. If the button is clicked, we style
     // the button as if it was a focused search box and show a fake cursor but
     // really focus the awesomebar without the focus styles ("hidden focus").
@@ -120,17 +120,17 @@ export class _Search extends React.PureC
   /*
    * Do not change the ID on the input field, as legacy newtab code
    * specifically looks for the id 'newtab-search-text' on input fields
    * in order to execute searches in various tests
    */
   render() {
     const wrapperClassName = [
       "search-wrapper",
-      this.props.hide && "search-hidden",
+      this.props.disable && "search-disabled",
       this.props.fakeFocus && "fake-focus",
     ]
       .filter(v => v)
       .join(" ");
 
     const isNewNewtabExperienceEnabled = this.props.Prefs.values.featureConfig
       .newNewtabExperienceEnabled;
 
--- a/browser/components/newtab/content-src/components/Search/_Search.scss
+++ b/browser/components/newtab/content-src/components/Search/_Search.scss
@@ -48,17 +48,17 @@
     }
 
     input:focus {
       outline: 0;
       border: 1px solid var(--newtab-focus-border);
       box-shadow: 0 0 0 2px var(--newtab-focus-outline);
     }
 
-    &.fake-focus {
+    &.fake-focus:not(.search.disabled) {
       .search-handoff-button {
         border: 1px solid var(--newtab-focus-border);
         box-shadow: 0 0 0 2px var(--newtab-focus-outline);
       }
     }
 
     .search-handoff-button,
     input {
@@ -262,39 +262,38 @@
   border-radius: 3px;
   box-shadow: $shadow-secondary, 0 0 0 1px $black-15;
   cursor: text;
   font-size: 15px;
   padding: 0;
   padding-inline-end: 48px;
   padding-inline-start: 46px;
   opacity: 1;
-  transition: opacity 500ms;
   width: 100%;
 
   &:dir(rtl) {
     background-position-x: right $search-icon-padding;
   }
 
   &:hover {
     box-shadow: $shadow-secondary, 0 0 0 1px $black-25;
   }
 
-  .fake-focus & {
+  .fake-focus:not(.search-disabled) & {
     border: $input-border-active;
     box-shadow: var(--newtab-textbox-focus-boxshadow);
 
     .fake-caret {
       display: block;
     }
   }
 
-  .search-hidden & {
-    opacity: 0;
-    visibility: hidden;
+  .search-disabled & {
+    opacity: 0.5;
+    box-shadow: none;
   }
 
   .fake-editable:focus {
     outline: none;
     caret-color: transparent;
   }
 
   .fake-editable {
--- a/browser/components/newtab/css/activity-stream-linux.css
+++ b/browser/components/newtab/css/activity-stream-linux.css
@@ -1295,17 +1295,17 @@ main {
     outline: 0;
     box-shadow: 0 0 0 2px var(--newtab-focus-outline);
     border: 1px solid var(--newtab-focus-border);
     border-radius: 0 8px 8px 0; }
   .outer-wrapper.newtab-experience .search-wrapper input:focus {
     outline: 0;
     border: 1px solid var(--newtab-focus-border);
     box-shadow: 0 0 0 2px var(--newtab-focus-outline); }
-  .outer-wrapper.newtab-experience .search-wrapper.fake-focus .search-handoff-button {
+  .outer-wrapper.newtab-experience .search-wrapper.fake-focus:not(.search.disabled) .search-handoff-button {
     border: 1px solid var(--newtab-focus-border);
     box-shadow: 0 0 0 2px var(--newtab-focus-outline); }
   .outer-wrapper.newtab-experience .search-wrapper .search-handoff-button,
   .outer-wrapper.newtab-experience .search-wrapper input {
     background: var(--newtab-textbox-background-color) var(--newtab-search-icon) 16px center no-repeat;
     background-size: 24px;
     padding-inline-start: 52px;
     padding-inline-end: 10px;
@@ -1439,30 +1439,29 @@ main {
   border-radius: 3px;
   box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.15);
   cursor: text;
   font-size: 15px;
   padding: 0;
   padding-inline-end: 48px;
   padding-inline-start: 46px;
   opacity: 1;
-  transition: opacity 500ms;
   width: 100%; }
   .search-handoff-button:dir(rtl) {
     background-position-x: right 12px; }
   .search-handoff-button:hover {
     box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.25); }
-  .fake-focus .search-handoff-button {
+  .fake-focus:not(.search-disabled) .search-handoff-button {
     border: 1px solid var(--newtab-textbox-focus-color);
     box-shadow: var(--newtab-textbox-focus-boxshadow); }
-    .fake-focus .search-handoff-button .fake-caret {
+    .fake-focus:not(.search-disabled) .search-handoff-button .fake-caret {
       display: block; }
-  .search-hidden .search-handoff-button {
-    opacity: 0;
-    visibility: hidden; }
+  .search-disabled .search-handoff-button {
+    opacity: 0.5;
+    box-shadow: none; }
   .search-handoff-button .fake-editable:focus {
     outline: none;
     caret-color: transparent; }
   .search-handoff-button .fake-editable {
     color: transparent;
     height: 100%;
     opacity: 0;
     position: absolute;
--- a/browser/components/newtab/css/activity-stream-mac.css
+++ b/browser/components/newtab/css/activity-stream-mac.css
@@ -1298,17 +1298,17 @@ main {
     outline: 0;
     box-shadow: 0 0 0 2px var(--newtab-focus-outline);
     border: 1px solid var(--newtab-focus-border);
     border-radius: 0 8px 8px 0; }
   .outer-wrapper.newtab-experience .search-wrapper input:focus {
     outline: 0;
     border: 1px solid var(--newtab-focus-border);
     box-shadow: 0 0 0 2px var(--newtab-focus-outline); }
-  .outer-wrapper.newtab-experience .search-wrapper.fake-focus .search-handoff-button {
+  .outer-wrapper.newtab-experience .search-wrapper.fake-focus:not(.search.disabled) .search-handoff-button {
     border: 1px solid var(--newtab-focus-border);
     box-shadow: 0 0 0 2px var(--newtab-focus-outline); }
   .outer-wrapper.newtab-experience .search-wrapper .search-handoff-button,
   .outer-wrapper.newtab-experience .search-wrapper input {
     background: var(--newtab-textbox-background-color) var(--newtab-search-icon) 16px center no-repeat;
     background-size: 24px;
     padding-inline-start: 52px;
     padding-inline-end: 10px;
@@ -1442,30 +1442,29 @@ main {
   border-radius: 3px;
   box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.15);
   cursor: text;
   font-size: 15px;
   padding: 0;
   padding-inline-end: 48px;
   padding-inline-start: 46px;
   opacity: 1;
-  transition: opacity 500ms;
   width: 100%; }
   .search-handoff-button:dir(rtl) {
     background-position-x: right 12px; }
   .search-handoff-button:hover {
     box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.25); }
-  .fake-focus .search-handoff-button {
+  .fake-focus:not(.search-disabled) .search-handoff-button {
     border: 1px solid var(--newtab-textbox-focus-color);
     box-shadow: var(--newtab-textbox-focus-boxshadow); }
-    .fake-focus .search-handoff-button .fake-caret {
+    .fake-focus:not(.search-disabled) .search-handoff-button .fake-caret {
       display: block; }
-  .search-hidden .search-handoff-button {
-    opacity: 0;
-    visibility: hidden; }
+  .search-disabled .search-handoff-button {
+    opacity: 0.5;
+    box-shadow: none; }
   .search-handoff-button .fake-editable:focus {
     outline: none;
     caret-color: transparent; }
   .search-handoff-button .fake-editable {
     color: transparent;
     height: 100%;
     opacity: 0;
     position: absolute;
--- a/browser/components/newtab/css/activity-stream-windows.css
+++ b/browser/components/newtab/css/activity-stream-windows.css
@@ -1295,17 +1295,17 @@ main {
     outline: 0;
     box-shadow: 0 0 0 2px var(--newtab-focus-outline);
     border: 1px solid var(--newtab-focus-border);
     border-radius: 0 8px 8px 0; }
   .outer-wrapper.newtab-experience .search-wrapper input:focus {
     outline: 0;
     border: 1px solid var(--newtab-focus-border);
     box-shadow: 0 0 0 2px var(--newtab-focus-outline); }
-  .outer-wrapper.newtab-experience .search-wrapper.fake-focus .search-handoff-button {
+  .outer-wrapper.newtab-experience .search-wrapper.fake-focus:not(.search.disabled) .search-handoff-button {
     border: 1px solid var(--newtab-focus-border);
     box-shadow: 0 0 0 2px var(--newtab-focus-outline); }
   .outer-wrapper.newtab-experience .search-wrapper .search-handoff-button,
   .outer-wrapper.newtab-experience .search-wrapper input {
     background: var(--newtab-textbox-background-color) var(--newtab-search-icon) 16px center no-repeat;
     background-size: 24px;
     padding-inline-start: 52px;
     padding-inline-end: 10px;
@@ -1439,30 +1439,29 @@ main {
   border-radius: 3px;
   box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.15);
   cursor: text;
   font-size: 15px;
   padding: 0;
   padding-inline-end: 48px;
   padding-inline-start: 46px;
   opacity: 1;
-  transition: opacity 500ms;
   width: 100%; }
   .search-handoff-button:dir(rtl) {
     background-position-x: right 12px; }
   .search-handoff-button:hover {
     box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.25); }
-  .fake-focus .search-handoff-button {
+  .fake-focus:not(.search-disabled) .search-handoff-button {
     border: 1px solid var(--newtab-textbox-focus-color);
     box-shadow: var(--newtab-textbox-focus-boxshadow); }
-    .fake-focus .search-handoff-button .fake-caret {
+    .fake-focus:not(.search-disabled) .search-handoff-button .fake-caret {
       display: block; }
-  .search-hidden .search-handoff-button {
-    opacity: 0;
-    visibility: hidden; }
+  .search-disabled .search-handoff-button {
+    opacity: 0.5;
+    box-shadow: none; }
   .search-handoff-button .fake-editable:focus {
     outline: none;
     caret-color: transparent; }
   .search-handoff-button .fake-editable {
     color: transparent;
     height: 100%;
     opacity: 0;
     position: absolute;
--- a/browser/components/newtab/data/content/activity-stream.bundle.js
+++ b/browser/components/newtab/data/content/activity-stream.bundle.js
@@ -200,17 +200,17 @@ const globalImportContext = typeof Windo
 
 // Create an object that avoids accidental differing key/value pairs:
 // {
 //   INIT: "INIT",
 //   UNINIT: "UNINIT"
 // }
 const actionTypes = {};
 
-for (const type of ["ABOUT_SPONSORED_TOP_SITES", "ADDONS_INFO_REQUEST", "ADDONS_INFO_RESPONSE", "ARCHIVE_FROM_POCKET", "AS_ROUTER_INITIALIZED", "AS_ROUTER_PREF_CHANGED", "AS_ROUTER_TARGETING_UPDATE", "AS_ROUTER_TELEMETRY_USER_EVENT", "BLOCK_URL", "BOOKMARK_URL", "CLEAR_PREF", "COPY_DOWNLOAD_LINK", "DELETE_BOOKMARK_BY_ID", "DELETE_FROM_POCKET", "DELETE_HISTORY_URL", "DIALOG_CANCEL", "DIALOG_OPEN", "DISCOVERY_STREAM_COLLECTION_DISMISSIBLE_TOGGLE", "DISCOVERY_STREAM_CONFIG_CHANGE", "DISCOVERY_STREAM_CONFIG_RESET", "DISCOVERY_STREAM_CONFIG_RESET_DEFAULTS", "DISCOVERY_STREAM_CONFIG_SETUP", "DISCOVERY_STREAM_CONFIG_SET_VALUE", "DISCOVERY_STREAM_DEV_EXPIRE_CACHE", "DISCOVERY_STREAM_DEV_IDLE_DAILY", "DISCOVERY_STREAM_DEV_SYNC_RS", "DISCOVERY_STREAM_DEV_SYSTEM_TICK", "DISCOVERY_STREAM_FEEDS_UPDATE", "DISCOVERY_STREAM_FEED_UPDATE", "DISCOVERY_STREAM_IMPRESSION_STATS", "DISCOVERY_STREAM_LAYOUT_RESET", "DISCOVERY_STREAM_LAYOUT_UPDATE", "DISCOVERY_STREAM_LINK_BLOCKED", "DISCOVERY_STREAM_LOADED_CONTENT", "DISCOVERY_STREAM_PERSONALIZATION_INIT", "DISCOVERY_STREAM_PERSONALIZATION_LAST_UPDATED", "DISCOVERY_STREAM_PERSONALIZATION_VERSION", "DISCOVERY_STREAM_PERSONALIZATION_VERSION_TOGGLE", "DISCOVERY_STREAM_RETRY_FEED", "DISCOVERY_STREAM_SPOCS_CAPS", "DISCOVERY_STREAM_SPOCS_ENDPOINT", "DISCOVERY_STREAM_SPOCS_PLACEMENTS", "DISCOVERY_STREAM_SPOCS_UPDATE", "DISCOVERY_STREAM_SPOC_BLOCKED", "DISCOVERY_STREAM_SPOC_IMPRESSION", "DOWNLOAD_CHANGED", "FAKE_FOCUS_SEARCH", "FILL_SEARCH_TERM", "HANDOFF_SEARCH_TO_AWESOMEBAR", "HIDE_PRIVACY_INFO", "HIDE_SEARCH", "INIT", "NEW_TAB_INIT", "NEW_TAB_INITIAL_STATE", "NEW_TAB_LOAD", "NEW_TAB_REHYDRATED", "NEW_TAB_STATE_REQUEST", "NEW_TAB_UNLOAD", "OPEN_DOWNLOAD_FILE", "OPEN_LINK", "OPEN_NEW_WINDOW", "OPEN_PRIVATE_WINDOW", "OPEN_WEBEXT_SETTINGS", "PARTNER_LINK_ATTRIBUTION", "PLACES_BOOKMARKS_REMOVED", "PLACES_BOOKMARK_ADDED", "PLACES_HISTORY_CLEARED", "PLACES_LINKS_CHANGED", "PLACES_LINKS_DELETED", "PLACES_LINK_BLOCKED", "PLACES_SAVED_TO_POCKET", "POCKET_CTA", "POCKET_LINK_DELETED_OR_ARCHIVED", "POCKET_LOGGED_IN", "POCKET_WAITING_FOR_SPOC", "PREFS_INITIAL_VALUES", "PREF_CHANGED", "PREVIEW_REQUEST", "PREVIEW_REQUEST_CANCEL", "PREVIEW_RESPONSE", "REMOVE_DOWNLOAD_FILE", "RICH_ICON_MISSING", "SAVE_SESSION_PERF_DATA", "SAVE_TO_POCKET", "SCREENSHOT_UPDATED", "SECTION_DEREGISTER", "SECTION_DISABLE", "SECTION_ENABLE", "SECTION_MOVE", "SECTION_OPTIONS_CHANGED", "SECTION_REGISTER", "SECTION_UPDATE", "SECTION_UPDATE_CARD", "SETTINGS_CLOSE", "SETTINGS_OPEN", "SET_PREF", "SHOW_DOWNLOAD_FILE", "SHOW_FIREFOX_ACCOUNTS", "SHOW_PRIVACY_INFO", "SHOW_SEARCH", "SKIPPED_SIGNIN", "SNIPPETS_BLOCKLIST_CLEARED", "SNIPPETS_BLOCKLIST_UPDATED", "SNIPPETS_DATA", "SNIPPETS_PREVIEW_MODE", "SNIPPETS_RESET", "SNIPPET_BLOCKED", "SUBMIT_EMAIL", "SUBMIT_SIGNIN", "SYSTEM_TICK", "TELEMETRY_IMPRESSION_STATS", "TELEMETRY_USER_EVENT", "TOP_SITES_CANCEL_EDIT", "TOP_SITES_CLOSE_SEARCH_SHORTCUTS_MODAL", "TOP_SITES_EDIT", "TOP_SITES_IMPRESSION_STATS", "TOP_SITES_INSERT", "TOP_SITES_OPEN_SEARCH_SHORTCUTS_MODAL", "TOP_SITES_PIN", "TOP_SITES_PREFS_UPDATED", "TOP_SITES_UNPIN", "TOP_SITES_UPDATED", "TOTAL_BOOKMARKS_REQUEST", "TOTAL_BOOKMARKS_RESPONSE", "UNINIT", "UPDATE_PINNED_SEARCH_SHORTCUTS", "UPDATE_SEARCH_SHORTCUTS", "UPDATE_SECTION_PREFS", "WEBEXT_CLICK", "WEBEXT_DISMISS"]) {
+for (const type of ["ABOUT_SPONSORED_TOP_SITES", "ADDONS_INFO_REQUEST", "ADDONS_INFO_RESPONSE", "ARCHIVE_FROM_POCKET", "AS_ROUTER_INITIALIZED", "AS_ROUTER_PREF_CHANGED", "AS_ROUTER_TARGETING_UPDATE", "AS_ROUTER_TELEMETRY_USER_EVENT", "BLOCK_URL", "BOOKMARK_URL", "CLEAR_PREF", "COPY_DOWNLOAD_LINK", "DELETE_BOOKMARK_BY_ID", "DELETE_FROM_POCKET", "DELETE_HISTORY_URL", "DIALOG_CANCEL", "DIALOG_OPEN", "DISABLE_SEARCH", "DISCOVERY_STREAM_COLLECTION_DISMISSIBLE_TOGGLE", "DISCOVERY_STREAM_CONFIG_CHANGE", "DISCOVERY_STREAM_CONFIG_RESET", "DISCOVERY_STREAM_CONFIG_RESET_DEFAULTS", "DISCOVERY_STREAM_CONFIG_SETUP", "DISCOVERY_STREAM_CONFIG_SET_VALUE", "DISCOVERY_STREAM_DEV_EXPIRE_CACHE", "DISCOVERY_STREAM_DEV_IDLE_DAILY", "DISCOVERY_STREAM_DEV_SYNC_RS", "DISCOVERY_STREAM_DEV_SYSTEM_TICK", "DISCOVERY_STREAM_FEEDS_UPDATE", "DISCOVERY_STREAM_FEED_UPDATE", "DISCOVERY_STREAM_IMPRESSION_STATS", "DISCOVERY_STREAM_LAYOUT_RESET", "DISCOVERY_STREAM_LAYOUT_UPDATE", "DISCOVERY_STREAM_LINK_BLOCKED", "DISCOVERY_STREAM_LOADED_CONTENT", "DISCOVERY_STREAM_PERSONALIZATION_INIT", "DISCOVERY_STREAM_PERSONALIZATION_LAST_UPDATED", "DISCOVERY_STREAM_PERSONALIZATION_VERSION", "DISCOVERY_STREAM_PERSONALIZATION_VERSION_TOGGLE", "DISCOVERY_STREAM_RETRY_FEED", "DISCOVERY_STREAM_SPOCS_CAPS", "DISCOVERY_STREAM_SPOCS_ENDPOINT", "DISCOVERY_STREAM_SPOCS_PLACEMENTS", "DISCOVERY_STREAM_SPOCS_UPDATE", "DISCOVERY_STREAM_SPOC_BLOCKED", "DISCOVERY_STREAM_SPOC_IMPRESSION", "DOWNLOAD_CHANGED", "FAKE_FOCUS_SEARCH", "FILL_SEARCH_TERM", "HANDOFF_SEARCH_TO_AWESOMEBAR", "HIDE_PRIVACY_INFO", "INIT", "NEW_TAB_INIT", "NEW_TAB_INITIAL_STATE", "NEW_TAB_LOAD", "NEW_TAB_REHYDRATED", "NEW_TAB_STATE_REQUEST", "NEW_TAB_UNLOAD", "OPEN_DOWNLOAD_FILE", "OPEN_LINK", "OPEN_NEW_WINDOW", "OPEN_PRIVATE_WINDOW", "OPEN_WEBEXT_SETTINGS", "PARTNER_LINK_ATTRIBUTION", "PLACES_BOOKMARKS_REMOVED", "PLACES_BOOKMARK_ADDED", "PLACES_HISTORY_CLEARED", "PLACES_LINKS_CHANGED", "PLACES_LINKS_DELETED", "PLACES_LINK_BLOCKED", "PLACES_SAVED_TO_POCKET", "POCKET_CTA", "POCKET_LINK_DELETED_OR_ARCHIVED", "POCKET_LOGGED_IN", "POCKET_WAITING_FOR_SPOC", "PREFS_INITIAL_VALUES", "PREF_CHANGED", "PREVIEW_REQUEST", "PREVIEW_REQUEST_CANCEL", "PREVIEW_RESPONSE", "REMOVE_DOWNLOAD_FILE", "RICH_ICON_MISSING", "SAVE_SESSION_PERF_DATA", "SAVE_TO_POCKET", "SCREENSHOT_UPDATED", "SECTION_DEREGISTER", "SECTION_DISABLE", "SECTION_ENABLE", "SECTION_MOVE", "SECTION_OPTIONS_CHANGED", "SECTION_REGISTER", "SECTION_UPDATE", "SECTION_UPDATE_CARD", "SETTINGS_CLOSE", "SETTINGS_OPEN", "SET_PREF", "SHOW_DOWNLOAD_FILE", "SHOW_FIREFOX_ACCOUNTS", "SHOW_PRIVACY_INFO", "SHOW_SEARCH", "SKIPPED_SIGNIN", "SNIPPETS_BLOCKLIST_CLEARED", "SNIPPETS_BLOCKLIST_UPDATED", "SNIPPETS_DATA", "SNIPPETS_PREVIEW_MODE", "SNIPPETS_RESET", "SNIPPET_BLOCKED", "SUBMIT_EMAIL", "SUBMIT_SIGNIN", "SYSTEM_TICK", "TELEMETRY_IMPRESSION_STATS", "TELEMETRY_USER_EVENT", "TOP_SITES_CANCEL_EDIT", "TOP_SITES_CLOSE_SEARCH_SHORTCUTS_MODAL", "TOP_SITES_EDIT", "TOP_SITES_IMPRESSION_STATS", "TOP_SITES_INSERT", "TOP_SITES_OPEN_SEARCH_SHORTCUTS_MODAL", "TOP_SITES_PIN", "TOP_SITES_PREFS_UPDATED", "TOP_SITES_UNPIN", "TOP_SITES_UPDATED", "TOTAL_BOOKMARKS_REQUEST", "TOTAL_BOOKMARKS_RESPONSE", "UNINIT", "UPDATE_PINNED_SEARCH_SHORTCUTS", "UPDATE_SEARCH_SHORTCUTS", "UPDATE_SECTION_PREFS", "WEBEXT_CLICK", "WEBEXT_DISMISS"]) {
   actionTypes[type] = type;
 } // Helper function for creating routed actions between content and main
 // Not intended to be used by consumers
 
 
 function _RouteMessage(action, options) {
   const meta = action.meta ? { ...action.meta
   } : {};
@@ -10471,17 +10471,17 @@ class _Search extends react__WEBPACK_IMP
       type: common_Actions_jsm__WEBPACK_IMPORTED_MODULE_0__["actionTypes"].FAKE_FOCUS_SEARCH
     });
     this.props.dispatch(common_Actions_jsm__WEBPACK_IMPORTED_MODULE_0__["actionCreators"].UserEvent({
       event: "SEARCH_HANDOFF"
     }));
 
     if (text) {
       this.props.dispatch({
-        type: common_Actions_jsm__WEBPACK_IMPORTED_MODULE_0__["actionTypes"].HIDE_SEARCH
+        type: common_Actions_jsm__WEBPACK_IMPORTED_MODULE_0__["actionTypes"].DISABLE_SEARCH
       });
     }
   }
 
   onSearchHandoffClick(event) {
     // When search hand-off is enabled, we render a big button that is styled to
     // look like a search textbox. If the button is clicked, we style
     // the button as if it was a focused search box and show a fake cursor but
@@ -10548,17 +10548,17 @@ class _Search extends react__WEBPACK_IMP
   /*
    * Do not change the ID on the input field, as legacy newtab code
    * specifically looks for the id 'newtab-search-text' on input fields
    * in order to execute searches in various tests
    */
 
 
   render() {
-    const wrapperClassName = ["search-wrapper", this.props.hide && "search-hidden", this.props.fakeFocus && "fake-focus"].filter(v => v).join(" ");
+    const wrapperClassName = ["search-wrapper", this.props.disable && "search-disabled", this.props.fakeFocus && "fake-focus"].filter(v => v).join(" ");
     const isNewNewtabExperienceEnabled = this.props.Prefs.values.featureConfig.newNewtabExperienceEnabled;
     return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("div", {
       className: wrapperClassName
     }, this.props.showLogo && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("div", {
       className: "logo-and-wordmark"
     }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("div", {
       className: "logo"
     }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("div", {
@@ -15675,29 +15675,29 @@ function DiscoveryStream(prevState = INI
 
     default:
       return prevState;
   }
 }
 
 function Search(prevState = INITIAL_STATE.Search, action) {
   switch (action.type) {
-    case Actions["actionTypes"].HIDE_SEARCH:
+    case Actions["actionTypes"].DISABLE_SEARCH:
       return Object.assign({ ...prevState,
-        hide: true
+        disable: true
       });
 
     case Actions["actionTypes"].FAKE_FOCUS_SEARCH:
       return Object.assign({ ...prevState,
         fakeFocus: true
       });
 
     case Actions["actionTypes"].SHOW_SEARCH:
       return Object.assign({ ...prevState,
-        hide: false,
+        disable: false,
         fakeFocus: false
       });
 
     default:
       return prevState;
   }
 }
 
--- a/browser/components/newtab/lib/PlacesFeed.jsm
+++ b/browser/components/newtab/lib/PlacesFeed.jsm
@@ -394,17 +394,17 @@ class PlacesFeed {
       // Check if this is the first change since we hidden focused. If it is,
       // remove hidden focus styles, prepend the search alias and hide the
       // in-content search.
       if (isFirstChange) {
         isFirstChange = false;
         urlBar.removeHiddenFocus();
         urlBar.search("");
         this.store.dispatch(
-          ac.OnlyToOneContent({ type: at.HIDE_SEARCH }, meta.fromTarget)
+          ac.OnlyToOneContent({ type: at.DISABLE_SEARCH }, meta.fromTarget)
         );
         urlBar.removeEventListener("compositionstart", checkFirstChange);
         urlBar.removeEventListener("paste", checkFirstChange);
       }
     };
 
     const onKeydown = ev => {
       // Check if the keydown will cause a value change.
--- a/browser/components/newtab/test/unit/common/Reducers.test.js
+++ b/browser/components/newtab/test/unit/common/Reducers.test.js
@@ -1538,27 +1538,27 @@ describe("Reducers", () => {
   });
   describe("Search", () => {
     it("should return INITIAL_STATE by default", () => {
       assert.equal(
         Search(undefined, { type: "some_action" }),
         INITIAL_STATE.Search
       );
     });
-    it("should set hide to true on HIDE_SEARCH", () => {
-      const nextState = Search(undefined, { type: "HIDE_SEARCH" });
-      assert.propertyVal(nextState, "hide", true);
+    it("should set disable to true on DISABLE_SEARCH", () => {
+      const nextState = Search(undefined, { type: "DISABLE_SEARCH" });
+      assert.propertyVal(nextState, "disable", true);
     });
     it("should set focus to true on FAKE_FOCUS_SEARCH", () => {
       const nextState = Search(undefined, { type: "FAKE_FOCUS_SEARCH" });
       assert.propertyVal(nextState, "fakeFocus", true);
     });
-    it("should set focus and hide to false on SHOW_SEARCH", () => {
+    it("should set focus and disable to false on SHOW_SEARCH", () => {
       const nextState = Search(undefined, { type: "SHOW_SEARCH" });
       assert.propertyVal(nextState, "fakeFocus", false);
-      assert.propertyVal(nextState, "hide", false);
+      assert.propertyVal(nextState, "disable", false);
     });
   });
   it("should set initialized to true on AS_ROUTER_INITIALIZED", () => {
     const nextState = ASRouter(undefined, { type: "AS_ROUTER_INITIALIZED" });
     assert.propertyVal(nextState, "initialized", true);
   });
 });
--- a/browser/components/newtab/test/unit/content-src/components/Search.test.jsx
+++ b/browser/components/newtab/test/unit/content-src/components/Search.test.jsx
@@ -140,17 +140,17 @@ describe("<Search>", () => {
         data: { text: "some copied text" },
         meta: {
           from: "ActivityStream:Content",
           skipLocal: true,
           to: "ActivityStream:Main",
         },
         type: "HANDOFF_SEARCH_TO_AWESOMEBAR",
       });
-      assert.calledWith(dispatch, { type: "HIDE_SEARCH" });
+      assert.calledWith(dispatch, { type: "DISABLE_SEARCH" });
       const [action] = dispatch.thirdCall.args;
       assert.isUserEventAction(action);
       assert.propertyVal(action.data, "event", "SEARCH_HANDOFF");
     });
     it("should properly handle drop events", () => {
       const dispatch = sinon.spy();
       const wrapper = mount(
         <Search {...DEFAULT_PROPS} handoffEnabled={true} dispatch={dispatch} />
@@ -165,15 +165,15 @@ describe("<Search>", () => {
         data: { text: "dropped text" },
         meta: {
           from: "ActivityStream:Content",
           skipLocal: true,
           to: "ActivityStream:Main",
         },
         type: "HANDOFF_SEARCH_TO_AWESOMEBAR",
       });
-      assert.calledWith(dispatch, { type: "HIDE_SEARCH" });
+      assert.calledWith(dispatch, { type: "DISABLE_SEARCH" });
       const [action] = dispatch.thirdCall.args;
       assert.isUserEventAction(action);
       assert.propertyVal(action.data, "event", "SEARCH_HANDOFF");
     });
   });
 });
--- a/browser/components/newtab/test/unit/lib/PlacesFeed.test.js
+++ b/browser/components/newtab/test/unit/lib/PlacesFeed.test.js
@@ -611,17 +611,17 @@ describe("PlacesFeed", () => {
       assert.calledOnce(feed.store.dispatch);
       assert.calledWith(feed.store.dispatch, {
         meta: {
           from: "ActivityStream:Main",
           skipMain: true,
           to: "ActivityStream:Content",
           toTarget: {},
         },
-        type: "HIDE_SEARCH",
+        type: "DISABLE_SEARCH",
       });
     });
     it("should properly handle handoff with text data passed in", () => {
       feed.handoffSearchToAwesomebar({
         _target: { browser: { ownerGlobal: { gURLBar: fakeUrlBar } } },
         data: { text: "foo" },
         meta: { fromTarget: {} },
       });
--- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
+++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.js
@@ -87,38 +87,38 @@ document.addEventListener("DOMContentLoa
     }
   };
   openSearchOptions.addEventListener("click", openSearchOptionsEvtHandler);
   openSearchOptions.addEventListener("keypress", openSearchOptionsEvtHandler);
 
   // Setup the search hand-off box.
   let btn = document.getElementById("search-handoff-button");
   let editable = document.getElementById("fake-editable");
-  let HIDE_SEARCH_TOPIC = "HideSearch";
+  let DISABLE_SEARCH_TOPIC = "DisableSearch";
   let SHOW_SEARCH_TOPIC = "ShowSearch";
   let SEARCH_HANDOFF_TOPIC = "SearchHandoff";
 
   function showSearch() {
     btn.classList.remove("focused");
-    btn.classList.remove("hidden");
+    btn.classList.remove("disabled");
     RPMRemoveMessageListener(SHOW_SEARCH_TOPIC, showSearch);
   }
 
-  function hideSearch() {
-    btn.classList.add("hidden");
+  function disableSearch() {
+    btn.classList.add("disabled");
   }
 
   function handoffSearch(text) {
     RPMSendAsyncMessage(SEARCH_HANDOFF_TOPIC, { text });
     RPMAddMessageListener(SHOW_SEARCH_TOPIC, showSearch);
     if (text) {
-      hideSearch();
+      disableSearch();
     } else {
       btn.classList.add("focused");
-      RPMAddMessageListener(HIDE_SEARCH_TOPIC, hideSearch);
+      RPMAddMessageListener(DISABLE_SEARCH_TOPIC, disableSearch);
     }
   }
   btn.addEventListener("focus", function() {
     handoffSearch();
   });
   btn.addEventListener("click", function() {
     handoffSearch();
   });
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_about.js
@@ -115,35 +115,35 @@ add_task(async function test_search_hand
   // mode.
   let searchPromise = UrlbarTestUtils.promiseSearchComplete(win);
 
   await new Promise(r => EventUtils.synthesizeKey("f", {}, win, r));
   await SpecialPowers.spawn(tab, [], async function() {
     ok(
       content.document
         .getElementById("search-handoff-button")
-        .classList.contains("hidden"),
-      "in-content search is hidden"
+        .classList.contains("disabled"),
+      "in-content search is disabled"
     );
   });
   await searchPromise;
   ok(urlBarHasNormalFocus(win), "Urlbar has normal focus");
   is(win.gURLBar.value, "f", "url bar has search text");
 
   // Close the popup.
   await UrlbarTestUtils.promisePopupClose(win);
 
   // Hitting ESC should reshow the in-content search
   await new Promise(r => EventUtils.synthesizeKey("KEY_Escape", {}, win, r));
   await SpecialPowers.spawn(tab, [], async function() {
     ok(
       !content.document
         .getElementById("search-handoff-button")
-        .classList.contains("hidden"),
-      "in-content search is not hidden"
+        .classList.contains("disabled"),
+      "in-content search is not disabled"
     );
   });
 
   await BrowserTestUtils.closeWindow(win);
 });
 
 /**
  * Tests the search hand-off on composition start in "about:privatebrowsing".
--- a/browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css
+++ b/browser/themes/shared/privatebrowsing/aboutPrivateBrowsing.css
@@ -96,43 +96,42 @@ p {
   box-shadow: 0 1px 4px 0 rgba(12, 12, 13, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.15);
   cursor: text;
   font-size: 15px;
   margin: 0;
   padding-block: 0;
   padding-inline: 46px 48px;
   position: relative;
   opacity: 1;
-  transition: opacity 500ms;
   width: 100%;
   -moz-context-properties: fill;
   fill: rgba(12, 12, 13, 0.4);
 }
 
-.search-handoff-button.focused {
+.search-handoff-button.focused:not(.disabled) {
   border: solid 1px #0060df;
   box-shadow: 0 0 0 1px #0060df, 0 0 0 4px rgba(0, 96, 223, 0.3);
 }
 
-.search-handoff-button.hidden {
-  opacity: 0;
-  visibility: hidden;
+.search-handoff-button.disabled {
+  opacity: 0.5;
+  box-shadow: none;
 }
 
 .search-handoff-button:dir(rtl),
 .search-handoff-button:active:dir(rtl),
 .search-handoff-button:enabled:hover:active:dir(rtl) {
   background-position-x: right 12px;
 }
 
 .search-inner-wrapper .search-handoff-button:hover {
   background-color: #fff;
 }
 
-.search-handoff-button.focused .fake-caret {
+.search-handoff-button.focused:not(.disabled) .fake-caret {
   display: block;
 }
 
 .fake-editable:focus {
   outline: none;
   caret-color: transparent;
 }