[Embeddables][Serialized State Only] Use serialized state in state transfer service#215424
[Embeddables][Serialized State Only] Use serialized state in state transfer service#215424Heenawter wants to merge 21 commits intoelastic:mainfrom
Conversation
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
5c7e63d to
5d208d3
Compare
5d208d3 to
4c7d4fc
Compare
…ithub.com:heenawter/kibana into serialized-embeddable-transfer-service_2025-03-20
| ...omit(panelToCopy.explicitInput, 'id'), | ||
| serializedState: { | ||
| rawState: { ...omit(panelToCopy.explicitInput, 'id') }, | ||
| references: panelToCopy.references ?? [], |
There was a problem hiding this comment.
Note that getDashboardPanelFromId also conditionally calls snapshotRuntimeState and throws a PanelNotFound error if unable to find any state for a given ID (either via the Dashboard panel state or via the child API) - the only difference in logic here would be that the serialized state is now spread on top of the panel state. But I think that's... okay? And probably safer?
346d95e to
5e017d2
Compare
…ithub.com:heenawter/kibana into serialized-embeddable-transfer-service_2025-03-20
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
History
cc @Heenawter |
|
Closing this PR in favour of #216232, which is this same work but opened against the "Serialized state only" larger feature branch instead of As a summary of what the problem is - currently, anything passed into the Dashboard via the embeddable transfer service will always be considered the last saved state for that panel. This is fine for creating and passing back new panels, but it causes bad behaviour when editing existing panels: Screen.Recording.2025-03-27.at.1.53.31.PM.movUnfortunately, until we remove runtime state completely and change the way Dashboard handles state, we cannot merge this partial fix into |
Fixes #213153
Summary
This PR ensures that the embeddable state transfer service exclusively uses serialized state. Previously, the transfer service accepted either runtime state or serialized state - but we are in the process of removing the concept of "runtime state" for embeddables (at least as far as the Dashboard is concerned), and this is one step towards that goal.
Note that this PR is built off the subset of "embeddable state transfer service related" changes from #215416 - all I did was clean up these changes, finalized some of the cases that were missed in the original draft, and updated tests as necessary.
Checklist
release_note:*label is applied per the guidelines