Bug 1517349 - [release 115] Fix searchInput UI when there are no search results (#7608). r=dwalsh
authorJason Laster <jlaster@mozilla.com>
Wed, 02 Jan 2019 17:01:34 -0500
changeset 509440 1491b715fae4feb979a6fb6a3f0b1382d87062ef
parent 509439 2ab1643a3ab7b82bc02e968f3bbec6cf039c8a7a
child 509441 f91c01aa87e83003329deba08352a991173efe14
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1517349
milestone66.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 1517349 - [release 115] Fix searchInput UI when there are no search results (#7608). r=dwalsh
devtools/client/debugger/new/dist/debugger.css
devtools/client/debugger/new/src/components/Editor/SearchBar.js
devtools/client/debugger/new/src/components/shared/SearchInput.js
devtools/client/locales/en-US/debugger.properties
--- a/devtools/client/debugger/new/dist/debugger.css
+++ b/devtools/client/debugger/new/dist/debugger.css
@@ -1497,28 +1497,29 @@ html .toggle-button.end.vertical svg {
   stroke: var(--theme-comment);
 }
 
 .search-field input::placeholder {
   color: var(--theme-toolbar-color);
 }
 
 .search-field input.empty {
-  color: var(--theme-highlight-orange);
+  color: var(--theme-body-color-inactive);
 }
 
 .search-field .summary {
   line-height: 27px;
   text-align: center;
   padding-inline-start: 5px;
   padding-inline-end: 5px;
   color: var(--theme-body-color-inactive);
   align-self: center;
   padding-top: 1px;
   white-space: nowrap;
+  user-select: none;
 }
 
 .search-field .search-nav-buttons {
   display: flex;
   user-select: none;
 }
 
 .search-field .search-nav-buttons .nav-btn {
--- a/devtools/client/debugger/new/src/components/Editor/SearchBar.js
+++ b/devtools/client/debugger/new/src/components/Editor/SearchBar.js
@@ -226,17 +226,17 @@ class SearchBar extends Component<Props,
       query
     } = this.props;
 
     if (query.trim() == "") {
       return "";
     }
 
     if (count == 0) {
-      return L10N.getStr("editor.noResults");
+      return L10N.getStr("editor.noResultsFound");
     }
 
     if (index == -1) {
       return L10N.getFormatStr("sourceSearch.resultsSummary1", count);
     }
 
     return L10N.getFormatStr("editor.searchResults", matchIndex + 1, count);
   }
--- a/devtools/client/debugger/new/src/components/shared/SearchInput.js
+++ b/devtools/client/debugger/new/src/components/shared/SearchInput.js
@@ -99,17 +99,17 @@ class SearchInput extends Component<Prop
 
       // omit prefix @:# from being selected
       const selectStartPos = this.props.hasPrefix ? 1 : 0;
       input.setSelectionRange(selectStartPos, input.value.length + 1);
     }
   }
 
   renderSvg() {
-    const svgName = this.props.showErrorEmoji ? "sad-face" : "magnifying-glass";
+    const svgName = "magnifying-glass";
     return <Svg name={svgName} />;
   }
 
   renderArrowButtons() {
     const { handleNext, handlePrev } = this.props;
 
     return [
       arrowBtn(
--- a/devtools/client/locales/en-US/debugger.properties
+++ b/devtools/client/locales/en-US/debugger.properties
@@ -445,19 +445,19 @@ components.header=Components
 
 # LOCALIZATION NOTE (editor.searchResults): Editor Search bar message
 # for the summarizing the selected search result. e.g. 5 of 10 results.
 editor.searchResults=%d of %d results
 
 # LOCALIZATION NOTE (editor.singleResult): Copy shown when there is one result.
 editor.singleResult=1 result
 
-# LOCALIZATION NOTE (editor.noResults): Editor Search bar message
+# LOCALIZATION NOTE (editor.noResultsFound): Editor Search bar message
 # for when no results found.
-editor.noResults=No results
+editor.noResultsFound=No results found
 
 # LOCALIZATION NOTE (editor.searchResults.nextResult): Editor Search bar
 # tooltip for traversing to the Next Result
 editor.searchResults.nextResult=Next result
 
 # LOCALIZATION NOTE (editor.searchResults.prevResult): Editor Search bar
 # tooltip for traversing to the Previous Result
 editor.searchResults.prevResult=Previous result