Split visualization's uiState into two states #21644
Labels
chore
Feature:Visualizations
Generic visualization features (in case no more specific feature label is available)
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
We currently have one state (called
uiState
) for visualizations to store some state in there. This will be saved with the visualization and the dashboard panel if it changes after embedding it on a dashboard (via the container state of the dashboard). Any change in it will also trigger the visualization infrastructure to cause a new render, since the request might depend on data in that state.We want to split this up into two states: one that is temporary (i.e. never saved) and one that is permanent (i.e. saved with the visualization, and can be saved as container state on dashboard). Also when writing values to the state, it should be possible for this new state to either cause a refetch of data or not, depending on the property, i.e. the setter of the property decided if that change needs a refetch (and no longer the visualization infrastructure).
This new state must be able to serialize its data for storing it in the saved object. Since we have some special requirements here, I would try to not reuse (the already super complex)
PersistedState
, but rather introduce a newVisState
(written in TS) for that.The text was updated successfully, but these errors were encountered: