Skip to content

Commit

Permalink
[Global Search Bar] Updated placeholder text to be more directive
Browse files Browse the repository at this point in the history
And fixed search bar’s width on smaller screens
  • Loading branch information
cchaos committed Mar 16, 2022
1 parent 89c103d commit a8ee0ce
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

//TODO add these overrides to EUI so that search behaves the same globally (eui/issues/4363)
.kbnSearchBar {
width: 400px;
max-width: 100%;
will-change: width;
}
Expand All @@ -27,6 +26,12 @@
}
}

@include euiBreakpoint('m', 'l', 'xl') {
.kbnSearchBar {
width: 400px;
}
}

@include euiBreakpoint('l', 'xl') {
.kbnSearchBar:focus {
animation: kbnAnimateSearchBar $euiAnimSpeedFast forwards;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export const SearchBar: FC<SearchBarProps> = ({

const emptyMessage = <PopoverPlaceholder darkMode={darkMode} basePath={basePathUrl} />;
const placeholderText = i18n.translate('xpack.globalSearchBar.searchBar.placeholder', {
defaultMessage: 'Search Elastic',
defaultMessage: 'Find any page in Kibana',
});

useEvent('keydown', onKeyDown);
Expand All @@ -287,6 +287,7 @@ export const SearchBar: FC<SearchBarProps> = ({
trackUiMetric(METRIC_TYPE.COUNT, 'search_focus');
setInitialLoad(true);
},
fullWidth: true,
}}
emptyMessage={emptyMessage}
noMatchesMessage={emptyMessage}
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -10464,7 +10464,6 @@
"xpack.globalSearchBar.searchBar.noResultsImageAlt": "Illustration d'un trou noir",
"xpack.globalSearchBar.searchBar.optionTagListAriaLabel": "Balises",
"xpack.globalSearchBar.searchbar.overflowTagsAriaLabel": "{n} {n, plural, one {balise} other {balises}} de plus : {tags}",
"xpack.globalSearchBar.searchBar.placeholder": "Rechercher dans Elastic",
"xpack.globalSearchBar.searchBar.shortcutDescription.macCommandDescription": "Commande + /",
"xpack.globalSearchBar.searchBar.shortcutDescription.shortcutDetail": "{shortcutDescription} {commandDescription}",
"xpack.globalSearchBar.searchBar.shortcutDescription.shortcutInstructionDescription": "Raccourci",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -12496,7 +12496,6 @@
"xpack.globalSearchBar.searchBar.noResultsImageAlt": "ブラックホールの図",
"xpack.globalSearchBar.searchBar.optionTagListAriaLabel": "タグ",
"xpack.globalSearchBar.searchbar.overflowTagsAriaLabel": "{n} その他の {n, plural, other {個のタグ}}:{tags}",
"xpack.globalSearchBar.searchBar.placeholder": "Elastic を検索",
"xpack.globalSearchBar.searchBar.shortcutDescription.macCommandDescription": "コマンド+ /",
"xpack.globalSearchBar.searchBar.shortcutDescription.shortcutDetail": "{shortcutDescription} {commandDescription}",
"xpack.globalSearchBar.searchBar.shortcutDescription.shortcutInstructionDescription": "ショートカット",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -12519,7 +12519,6 @@
"xpack.globalSearchBar.searchBar.noResultsImageAlt": "黑洞的图示",
"xpack.globalSearchBar.searchBar.optionTagListAriaLabel": "标签",
"xpack.globalSearchBar.searchbar.overflowTagsAriaLabel": "另外 {n} 个{n, plural, other {标签}}:{tags}",
"xpack.globalSearchBar.searchBar.placeholder": "搜索 Elastic",
"xpack.globalSearchBar.searchBar.shortcutDescription.macCommandDescription": "Command + /",
"xpack.globalSearchBar.searchBar.shortcutDescription.shortcutDetail": "{shortcutDescription} {commandDescription}",
"xpack.globalSearchBar.searchBar.shortcutDescription.shortcutInstructionDescription": "快捷方式",
Expand Down

0 comments on commit a8ee0ce

Please sign in to comment.