-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Unified Histogram] [Discover] Unified Histogram solutions cleanup (#…
…146352) ## Summary This PR includes a number of updates to Unified Histogram to prepare for sharing with solutions, as well as updating its usage in Discover: Unified Histogram: - Adds a `disableAutoFetching` prop, similar to Unified Field List, to disable automatic Unified Histogram refetching based on prop changes. - Accepts an `input$` observable prop that can be used to control manual refetches. - Removes `refetchId` used internally and replaces it with an observables based approach to simplify refetch logic. - Introduces a `use_stable_callback` utility hook to create callback functions with stable identities which simplifies `useCallback` logic — should be replaced with `useEvent` or whatever the React team comes up with to solve this specific issue when available: reactjs/rfcs#220. - Eliminates debouncing logic in Unified Histogram since it was hacky — manual refetching should be used instead if debouncing is needed. - Accepts `query`, `filters`, and `timeRange` props to remove dependencies on specific services. - Updates `use_request_params` to export `getTimeRange` and `updateTimeRange` functions for easier absolute time range handling. - Exposes some Lens embeddable props to allow further customizing Unified Histogram behaviour. Discover: - Exports a `fetch$` observable from `use_saved_search` to allow listening for when data fetches should be triggered. - Uses new manual refetching support in Unified Histogram to simplify refetching logic. - Passes `query`, `filters`, and `timeRange` props to Unified Histogram. ### Checklist - [ ] ~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 - [ ] ~Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/))~ - [ ] ~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)~ - [ ] ~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))~ - [ ] ~This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers)~ ### For maintainers - [ ] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
- Loading branch information
1 parent
74ba605
commit 96d6b89
Showing
34 changed files
with
903 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.