Skip to content

Commit

Permalink
[Global Search Bar] Ensure the search controls are visible in low DPI…
Browse files Browse the repository at this point in the history
… screens (#161398)

## Summary

Closes #154415 by applying the
fix suggested by Cee Chen.

<img width="859" alt="image"
src="https://github.com/elastic/kibana/assets/908371/6d57effd-f4c8-43ec-a6ab-beb89218a885">

<img width="1715" alt="image"
src="https://github.com/elastic/kibana/assets/908371/8b750af7-cb4a-49cb-b1ba-c9621f88ccbb">


### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [x] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [x] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [x] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [x] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)
  • Loading branch information
tsullivan authored Jul 7, 2023
1 parent 75bd6dd commit bc09b1e
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
euiSelectableTemplateSitewideRenderOptions,
useEuiTheme,
} from '@elastic/eui';
import { css } from '@emotion/react';
import type { GlobalSearchFindParams, GlobalSearchResult } from '@kbn/global-search-plugin/public';
import React, { FC, useCallback, useEffect, useRef, useState } from 'react';
import useDebounce from 'react-use/lib/useDebounce';
Expand Down Expand Up @@ -317,6 +318,12 @@ export const SearchBar: FC<SearchBarProps> = (opts) => {
popoverButtonBreakpoints={['xs', 's']}
singleSelection={true}
renderOption={(option) => euiSelectableTemplateSitewideRenderOptions(option, searchTerm)}
listProps={{
className: 'eui-yScroll',
css: css`
max-block-size: 75vh;
`,
}}
searchProps={{
autoFocus: chromeStyle === 'project',
value: searchValue,
Expand Down

0 comments on commit bc09b1e

Please sign in to comment.