kibana/docs/developer
Davis McPhee 02af928026
[Unified Histogram] Create layout container to manage Unified Histogram state (#148773)
## Summary

This PR introduces a layout container component to Unified Histogram
which removes the responsibility of state management from the consumer.
The full list of changes includes the following:
- Create a `UnifiedHistogramContainer` component which is responsible
for managing the Unified Histogram state.
- Create a `UnifiedHistogramStateService` to move state management from
React to a dedicated service consumed by the container component.
- Move the state management logic from `use_discover_histogram` to
Unified Histogram so it doesn't need to be reimplemented by each
consumer.
- Create utility functions to access and update Unified Histogram local
storage state.
- Move the edit visualization logic to Unified Histogram so it doesn't
need to be reimplemented by each consumer.
- Add documentation and example usage to the Unified Histogram readme.
- Reorganize the Unified Histogram folder structure.
- Update `useQuerySubscriber` to return the relative time range.

### 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)~
- [x]
[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))~
- [x] 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>
Co-authored-by: Julia Rechkunova <julia.rechkunova@elastic.co>
Co-authored-by: Julia Rechkunova <julia.rechkunova@gmail.com>
2023-02-07 15:14:06 -04:00
..
advanced [docs] Document considerations around major Node.js upgrades (#150155) 2023-02-02 19:59:48 +01:00
architecture [DOCS] Removes legacy plugins (#149545) 2023-01-27 14:47:01 -06:00
best-practices [Documentation] Fix links to repository files on Best Practices page (#96152) 2022-12-21 14:16:11 -07:00
contributing [docs] remove outdated note on how to run x-pack functional tests (#143093) 2022-10-11 17:23:47 +02:00
getting-started [DOCS] Removes legacy plugins (#149545) 2023-01-27 14:47:01 -06:00
images add images and content for functional UI test debugging tutorial (#96790) 2021-04-14 18:05:13 -05:00
plugin [DOCS] Removes legacy plugins (#149545) 2023-01-27 14:47:01 -06:00
index.asciidoc Add more details on developer documentation (#126674) 2022-03-03 11:44:05 -07:00
plugin-list.asciidoc [Unified Histogram] Create layout container to manage Unified Histogram state (#148773) 2023-02-07 15:14:06 -04:00
telemetry.asciidoc [dev/cli/timings] report on time to dev server listening (#95120) 2021-03-24 18:45:24 -04:00