Skip to content

Commit faf2372

Browse files
nagpalm7darkwing
authored andcommitted
Fix searchInput UI when there are no search results (firefox-devtools#7608)
1 parent c77998c commit faf2372

7 files changed

Lines changed: 23 additions & 22 deletions

File tree

assets/panel/debugger.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,9 @@ editor.searchResults=%d of %d results
450450
# LOCALIZATION NOTE (editor.singleResult): Copy shown when there is one result.
451451
editor.singleResult=1 result
452452

453-
# LOCALIZATION NOTE (editor.noResults): Editor Search bar message
453+
# LOCALIZATION NOTE (editor.noResultsFound): Editor Search bar message
454454
# for when no results found.
455-
editor.noResults=No results
455+
editor.noResultsFound=No results found
456456

457457
# LOCALIZATION NOTE (editor.searchResults.nextResult): Editor Search bar
458458
# tooltip for traversing to the Next Result

src/components/Editor/SearchBar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ class SearchBar extends Component<Props, State> {
231231
}
232232

233233
if (count == 0) {
234-
return L10N.getStr("editor.noResults");
234+
return L10N.getStr("editor.noResultsFound");
235235
}
236236

237237
if (index == -1) {

src/components/Editor/tests/__snapshots__/SearchBar.spec.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ exports[`showErrorEmoji true if query + no results 1`] = `
237237
showClose={false}
238238
showErrorEmoji={true}
239239
size=""
240-
summaryMsg="No results"
240+
summaryMsg="No results found"
241241
/>
242242
<div
243243
className="search-bottom-bar"

src/components/shared/SearchInput.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
}
102102

103103
.search-field input.empty {
104-
color: var(--theme-highlight-orange);
104+
color: var(--theme-body-color-inactive);
105105
}
106106

107107
.search-field .summary {
@@ -113,6 +113,7 @@
113113
align-self: center;
114114
padding-top: 1px;
115115
white-space: nowrap;
116+
user-select: none;
116117
}
117118

118119
.search-field .search-nav-buttons {

src/components/shared/SearchInput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ class SearchInput extends Component<Props, State> {
104104
}
105105

106106
renderSvg() {
107-
const svgName = this.props.showErrorEmoji ? "sad-face" : "magnifying-glass";
107+
const svgName = "magnifying-glass";
108108
return <Svg name={svgName} />;
109109
}
110110

src/components/shared/tests/__snapshots__/SearchInput.spec.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ exports[`SearchInput shows svg error emoji 1`] = `
114114
role="combobox"
115115
>
116116
<Svg
117-
name="sad-face"
117+
name="magnifying-glass"
118118
/>
119119
<input
120120
aria-activedescendant=""

src/components/test/__snapshots__/QuickOpenModal.spec.js.snap

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ exports[`QuickOpenModal Basic render with mount & searchType = functions 1`] = `
7777
role="combobox"
7878
>
7979
<Svg
80-
name="sad-face"
80+
name="magnifying-glass"
8181
>
8282
<InlineSVG
83-
className="sad-face "
83+
className="magnifying-glass "
8484
element="i"
8585
raw={false}
8686
src="<svg></svg>"
8787
>
8888
<i
89-
className="sad-face "
89+
className="magnifying-glass "
9090
dangerouslySetInnerHTML={
9191
Object {
9292
"__html": "<svg></svg>",
@@ -213,16 +213,16 @@ exports[`QuickOpenModal Basic render with mount & searchType = variables 1`] = `
213213
role="combobox"
214214
>
215215
<Svg
216-
name="sad-face"
216+
name="magnifying-glass"
217217
>
218218
<InlineSVG
219-
className="sad-face "
219+
className="magnifying-glass "
220220
element="i"
221221
raw={false}
222222
src="<svg></svg>"
223223
>
224224
<i
225-
className="sad-face "
225+
className="magnifying-glass "
226226
dangerouslySetInnerHTML={
227227
Object {
228228
"__html": "<svg></svg>",
@@ -498,16 +498,16 @@ exports[`QuickOpenModal Simple goto search query = :abc & searchType = goto 1`]
498498
role="combobox"
499499
>
500500
<Svg
501-
name="sad-face"
501+
name="magnifying-glass"
502502
>
503503
<InlineSVG
504-
className="sad-face "
504+
className="magnifying-glass "
505505
element="i"
506506
raw={false}
507507
src="<svg></svg>"
508508
>
509509
<i
510-
className="sad-face "
510+
className="magnifying-glass "
511511
dangerouslySetInnerHTML={
512512
Object {
513513
"__html": "<svg></svg>",
@@ -1028,16 +1028,16 @@ exports[`QuickOpenModal showErrorEmoji true when goto not numeric ':22k22' 1`] =
10281028
role="combobox"
10291029
>
10301030
<Svg
1031-
name="sad-face"
1031+
name="magnifying-glass"
10321032
>
10331033
<InlineSVG
1034-
className="sad-face "
1034+
className="magnifying-glass "
10351035
element="i"
10361036
raw={false}
10371037
src="<svg></svg>"
10381038
>
10391039
<i
1040-
className="sad-face "
1040+
className="magnifying-glass "
10411041
dangerouslySetInnerHTML={
10421042
Object {
10431043
"__html": "<svg></svg>",
@@ -1147,16 +1147,16 @@ exports[`QuickOpenModal showErrorEmoji true when no count + query 1`] = `
11471147
role="combobox"
11481148
>
11491149
<Svg
1150-
name="sad-face"
1150+
name="magnifying-glass"
11511151
>
11521152
<InlineSVG
1153-
className="sad-face "
1153+
className="magnifying-glass "
11541154
element="i"
11551155
raw={false}
11561156
src="<svg></svg>"
11571157
>
11581158
<i
1159-
className="sad-face "
1159+
className="magnifying-glass "
11601160
dangerouslySetInnerHTML={
11611161
Object {
11621162
"__html": "<svg></svg>",

0 commit comments

Comments
 (0)