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

[Dashboard][Vega] Panel wrongly reporting unsaved changes #207781

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Jan 22, 2025

Summary

Fixes #196954

Apparently the root issue here is the wrong dashboard SO, so here's the SO has been fixed and the bug is no longer present.

@dej611 dej611 added Feature:Add Data Add Data and sample data feature on Home Feature:Dashboard Dashboard related features Feature:Vega Vega visualizations Feature:Saved Objects Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Jan 22, 2025
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #20 / useGetCaseMetrics shows an error toast when getSingleCaseMetrics throws

Metrics [docs]

✅ unchanged

@dej611 dej611 marked this pull request as ready for review January 22, 2025 15:13
@dej611 dej611 requested a review from a team as a code owner January 22, 2025 15:13
@kibanamachine kibanamachine added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label Jan 22, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@ThomThomson
Copy link
Contributor

@dej611 can you explain more about how the saved object was wrong? Was it modified outside of the Dashboard app perhaps? Was the Vega misconfigured?

@dej611
Copy link
Contributor Author

dej611 commented Jan 22, 2025

@ThomThomson the Vega panel was configured as by reference but at the same time stored as a by value.
Due to this dual state, the by value check was triggering unsaved changes due to the savedObjectId property be present.
Storing the original dashboard SO as only by reference solved the issue at the root.

@ThomThomson
Copy link
Contributor

Great explanation, and good fix! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Add Data Add Data and sample data feature on Home Feature:Dashboard Dashboard related features Feature:Saved Objects Feature:Vega Vega visualizations release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboards] Vega visualization is reporting unsaved changes
4 participants