Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Discover session] State management #210160

Open
kertal opened this issue Feb 7, 2025 · 1 comment
Open

[Discover session] State management #210160

kertal opened this issue Feb 7, 2025 · 1 comment
Assignees
Labels
Feature:Discover Discover Application Project:OneDiscover Enrich Discover with contextual awareness Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. technical debt Improvement of the software architecture and operational architecture

Comments

@kertal
Copy link
Member

kertal commented Feb 7, 2025

📓 Summary

It's been a while since we've took care of Discover state management. And it's about time to simplify it.

The last fundamental change was done in #153528, completing a series of PRs to extract state relevant functionality that was distributed among the UI into a central state container with several subcontainers.

To summarize how it looks like today:

Image

The multiple sources of truth in Discover's state container are the source for confusion and frustration when dealing and expanding Discover's central state. We now have new requirements, we need a simple way to serialize and deserialize state in Discover.

Instead of several sources of truth, currently we have the following state containers under one umbrella

What's more, our UI additional subscribes to various state among the data plugin, like

And there might be more, our poor UI has to listen to lots of different state, even duplicate ones. time to clean this up

✔️ Acceptance criteria

Though shall not have many different State management container, there shall be one state container to rule em all. The next state container should be

  • a central source of truth for the UI
  • that should be it easy to extend
  • simple to mock,
  • simple to explain
  • simple to serialize and to deserialize (as a whole, as parts) for various targets (URL, localStorage, SavedObject)
  • Future proof
  • Can be migrated to step by step (if it makes sense and if it's possible)
  • URL initialized state initialization should still be functional and backwards compatible
@botelastic botelastic bot added the needs-team Issues missing a team label label Feb 7, 2025
@kertal kertal added Feature:Discover Discover Application technical debt Improvement of the software architecture and operational architecture Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. Project:OneDiscover Enrich Discover with contextual awareness labels Feb 7, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Discover Discover Application Project:OneDiscover Enrich Discover with contextual awareness Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

No branches or pull requests

3 participants