mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[Discover] Replace DiscoverInternalStateContainer
with Redux based InternalStateStore
(#208784)
## Summary This PR replaces Discover's current `DiscoverInternalStateContainer` (based on Kibana's custom `ReduxLikeStateContainer`) with an actual Redux store using Redux Toolkit. It's the first step toward migrating all of Discover's state management to Redux as part of the Discover tabs project. Part of #210160. Resolves #213304. ### 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/src/platform/packages/shared/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 - [ ] 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 was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
989cf1ec34
commit
ccae358d37
68 changed files with 1209 additions and 876 deletions
|
@ -241,9 +241,9 @@ export class DiscoverCustomizationExamplesPlugin implements Plugin {
|
|||
>();
|
||||
const stateStorage = stateContainer.stateStorage;
|
||||
const dataView = useObservable(
|
||||
stateContainer.internalState.state$,
|
||||
stateContainer.internalState.getState()
|
||||
).dataView;
|
||||
stateContainer.runtimeStateManager.currentDataView$,
|
||||
stateContainer.runtimeStateManager.currentDataView$.getValue()
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
if (!controlGroupAPI) {
|
||||
|
@ -262,7 +262,6 @@ export class DiscoverCustomizationExamplesPlugin implements Plugin {
|
|||
});
|
||||
|
||||
const filterSubscription = controlGroupAPI.filters$.subscribe((newFilters = []) => {
|
||||
stateContainer.internalState.transitions.setCustomFilters(newFilters);
|
||||
stateContainer.actions.fetchData();
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue