[Discover] Introduce Redux and migrate DiscoverInternalStateContainer
#213304
Labels
Feature:Discover
Discover Application
impact:high
Addressing this issue will have a high level of impact on the quality/strength of our product.
loe:medium
Medium Level of Effort
Project:OneDiscover
Enrich Discover with contextual awareness
refactoring
Team:DataDiscovery
Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
📓 Summary
The first step of the state refactoring to support tabs is introducing a proper state management library to help centralize all Discover state. Tabs require all state to be serializable so it can be persisted to local storage, which is enforced by default in Redux Toolkit. That in addition to precedent elsewhere in Kibana Analytics apps, as well as broad support in the React ecosystem, make Redux a good fit.
To build the foundation, we will migrate
DiscoverInternalStateContainer
to Redux, one of several "state containers" currently used in Discover that will be centralized in a single Redux store for tabs support.Additionally, we will build a lightweight
RuntimeStateManager
to centrally manage non-serializable ephemeral state such as the current data view. This will only be used for state which does not need to be persisted and has no serializable representation.✔️ Acceptance criteria
DiscoverInternalStateContainer
to Redux and remove the existing state container.RuntimeStateManager
for managing non-serializable runtime state.The text was updated successfully, but these errors were encountered: