Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions assets/panel/debugger.properties
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,10 @@ symbolSearch.search.variablesPlaceholder=Search variables…
# searching for a function or variable
symbolSearch.search.key2=CmdOrCtrl+Shift+O

# LOCALIZATION NOTE(symbolSearch.searchModifier.modifiersLabel): A label
# preceding the group of modifiers
symbolSearch.searchModifier.modifiersLabel=Modifiers:

# LOCALIZATION NOTE(symbolSearch.searchModifier.regex): A search option
# when searching text in a file
symbolSearch.searchModifier.regex=Regex
Expand Down
22 changes: 7 additions & 15 deletions src/components/Editor/SearchBar.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,8 @@
width: 16px;
}

.search-bottom-bar .search-modifiers button svg:hover {
cursor: pointer;
}

.search-bottom-bar .search-modifiers button:hover {
cursor: pointer;
background: var(--theme-toolbar-background-hover);
}

Expand All @@ -87,23 +84,18 @@
max-width: 68%;
}

.search-bottom-bar .search-type-toggles .search-toggle-title {
color: var(--theme-body-color-inactive);
font-size: 11px;
font-weight: normal;
margin: 0;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}

.search-bottom-bar .search-type-toggles .search-type-btn {
.search-bottom-bar .search-type-name {
padding: 1px 0 0 0;
margin: 0 0 0 6px;
border: none;
background: transparent;
color: var(--theme-comment-alt);
}

.search-bottom-bar .search-type-toggles .search-type-name:hover {
cursor: pointer;
}

.search-bottom-bar .search-type-toggles .search-type-btn:hover {
cursor: pointer;
}
Expand Down
17 changes: 17 additions & 0 deletions src/components/Editor/SearchBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ class SearchBar extends Component {

return (
<div className="search-modifiers">
<span className="search-type-name">
{L10N.getStr("symbolSearch.searchModifier.modifiersLabel")}
</span>
<SearchModBtn
modVal="regexMatch"
className="regex-match-btn"
Expand All @@ -380,6 +383,19 @@ class SearchBar extends Component {
);
}

renderSearchType() {
return (
<div className="search-type-toggles">
<span
className="search-type-name"
onClick={() => this.props.setActiveSearch("symbol")}
>
{L10N.getStr("symbolSearch.search.functionsPlaceholder")}
</span>
</div>
);
}

render() {
const { searchResults: { count }, query, searchOn } = this.props;

Expand All @@ -401,6 +417,7 @@ class SearchBar extends Component {
handleClose={this.closeSearch}
/>
<div className="search-bottom-bar">
{this.renderSearchType()}
{this.renderSearchModifiers()}
</div>
</div>
Expand Down
60 changes: 60 additions & 0 deletions src/components/Editor/tests/__snapshots__/SearchBar.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,24 @@ ShallowWrapper {
<div
className="search-bottom-bar"
>
<div
className="search-type-toggles"
>
<span
className="search-type-name"
onClick={[Function]}
>
Search functions…
</span>
</div>
<div
className="search-modifiers"
>
<span
className="search-type-name"
>
Modifiers:
</span>
<SearchModBtn
className="regex-match-btn"
modVal="regexMatch"
Expand Down Expand Up @@ -71,9 +86,24 @@ ShallowWrapper {
<div
className="search-bottom-bar"
>
<div
className="search-type-toggles"
>
<span
className="search-type-name"
onClick={[Function]}
>
Search functions…
</span>
</div>
<div
className="search-modifiers"
>
<span
className="search-type-name"
>
Modifiers:
</span>
<SearchModBtn
className="regex-match-btn"
modVal="regexMatch"
Expand Down Expand Up @@ -209,9 +239,24 @@ ShallowWrapper {
<div
className="search-bottom-bar"
>
<div
className="search-type-toggles"
>
<span
className="search-type-name"
onClick={[Function]}
>
Search functions…
</span>
</div>
<div
className="search-modifiers"
>
<span
className="search-type-name"
>
Modifiers:
</span>
<SearchModBtn
className="regex-match-btn"
modVal="regexMatch"
Expand Down Expand Up @@ -253,9 +298,24 @@ ShallowWrapper {
<div
className="search-bottom-bar"
>
<div
className="search-type-toggles"
>
<span
className="search-type-name"
onClick={[Function]}
>
Search functions…
</span>
</div>
<div
className="search-modifiers"
>
<span
className="search-type-name"
>
Modifiers:
</span>
<SearchModBtn
className="regex-match-btn"
modVal="regexMatch"
Expand Down