mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Small fixes to Kibana search bar (#85079)
* Small fixes to Kibana search bar * Animate width * tweak for ipad breakpoint Co-authored-by: Ryan Keairns <contactryank@gmail.com>
This commit is contained in:
parent
28ea225bef
commit
1f75d0b79f
3 changed files with 42 additions and 17 deletions
|
@ -35,7 +35,7 @@ exports[`SearchBar supports keyboard shortcuts 1`] = `
|
|||
aria-haspopup="listbox"
|
||||
aria-label="Filter options"
|
||||
autocomplete="off"
|
||||
class="euiFieldSearch euiFieldSearch--fullWidth euiFieldSearch--compressed euiSelectableSearch euiSelectableTemplateSitewide__search"
|
||||
class="euiFieldSearch euiFieldSearch--fullWidth euiFieldSearch--compressed euiSelectableSearch euiSelectableTemplateSitewide__search kbnSearchBar"
|
||||
data-test-subj="nav-search-input"
|
||||
placeholder="Search Elastic"
|
||||
type="search"
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
//TODO add these overrides to EUI so that search behaves the same globally
|
||||
.kbnSearchBar {
|
||||
width: 400px;
|
||||
max-width: 100%;
|
||||
will-change: width;
|
||||
}
|
||||
|
||||
@include euiBreakpoint('l', 'xl') {
|
||||
.kbnSearchBar:focus {
|
||||
animation: kbnAnimateSearchBar $euiAnimSpeedFast forwards;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes kbnAnimateSearchBar {
|
||||
from {
|
||||
width: 400px;
|
||||
}
|
||||
to {
|
||||
width: 600px;
|
||||
}
|
||||
}
|
|
@ -32,6 +32,7 @@ import {
|
|||
} from '../../../global_search/public';
|
||||
import { SavedObjectTaggingPluginStart } from '../../../saved_objects_tagging/public';
|
||||
import { parseSearchParams } from '../search_syntax';
|
||||
import './search_bar.scss';
|
||||
|
||||
interface Props {
|
||||
globalSearch: GlobalSearchPluginStart['find'];
|
||||
|
@ -273,6 +274,7 @@ export function SearchBar({
|
|||
'data-test-subj': 'nav-search-input',
|
||||
inputRef: setSearchRef,
|
||||
compressed: true,
|
||||
className: 'kbnSearchBar',
|
||||
placeholder: i18n.translate('xpack.globalSearchBar.searchBar.placeholder', {
|
||||
defaultMessage: 'Search Elastic',
|
||||
}),
|
||||
|
@ -289,16 +291,16 @@ export function SearchBar({
|
|||
emptyMessage={emptyMessage}
|
||||
noMatchesMessage={emptyMessage}
|
||||
popoverFooter={
|
||||
<EuiText color="subdued" size="xs">
|
||||
<EuiFlexGroup
|
||||
alignItems="center"
|
||||
justifyContent="spaceBetween"
|
||||
gutterSize="s"
|
||||
responsive={false}
|
||||
wrap
|
||||
>
|
||||
<EuiFlexItem>
|
||||
<p style={{ marginBottom: 0 }}>
|
||||
<EuiFlexGroup
|
||||
alignItems="center"
|
||||
justifyContent="spaceBetween"
|
||||
gutterSize="s"
|
||||
responsive={false}
|
||||
wrap
|
||||
>
|
||||
<EuiFlexItem>
|
||||
<EuiText color="subdued" size="xs">
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.globalSearchBar.searchBar.helpText.helpTextPrefix"
|
||||
defaultMessage="Filter by"
|
||||
|
@ -312,9 +314,11 @@ export function SearchBar({
|
|||
|
||||
<EuiCode>tag:</EuiCode>
|
||||
</p>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<p style={{ marginBottom: 0 }}>
|
||||
</EuiText>
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiText color="subdued" size="xs">
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id="xpack.globalSearchBar.searchBar.shortcutDescription.shortcutDetail"
|
||||
defaultMessage="{shortcutDescription} {commandDescription}"
|
||||
|
@ -343,9 +347,9 @@ export function SearchBar({
|
|||
}}
|
||||
/>
|
||||
</p>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
</EuiText>
|
||||
</EuiText>
|
||||
</EuiFlexItem>
|
||||
</EuiFlexGroup>
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue