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] Unsaved changes after saving new dashboard with old and new embeddables #184174

Closed
ThomThomson opened this issue May 23, 2024 · 3 comments · Fixed by #184955
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort project:embeddableRebuild Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@ThomThomson
Copy link
Contributor

Issue

If you create a new Dashboard, add a Lens panel, then add an Image panel, the Dashboard will have unsaved changes after the first save.

@ThomThomson ThomThomson added bug Fixes for quality problems that affect the customer experience loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. project:embeddableRebuild labels May 23, 2024
@ThomThomson ThomThomson self-assigned this May 23, 2024
@botelastic botelastic bot added the needs-team Issues missing a team label label May 23, 2024
@ThomThomson
Copy link
Contributor Author

ThomThomson commented May 24, 2024

Looks like this is caused by the enhancements key being absent unexpectedly in the legacy Embeddable: (Lens in this case)

Screenshot 2024-05-24 at 4 25 20 PM

@Heenawter didn't we recently do a change relating to the new embeddables enhancements for drilldowns?

@Heenawter
Copy link
Contributor

Could it be related to #183524?

@ThomThomson ThomThomson removed their assignment May 29, 2024
@ThomThomson ThomThomson added the Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas label May 29, 2024
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 29, 2024
@Heenawter Heenawter self-assigned this Jun 6, 2024
Heenawter added a commit that referenced this issue Jun 6, 2024
)

Closes #184174

## Summary

This PR fixes the bug where, on a new and unsaved dashboard, adding both
a legacy embeddable and an image embeddable would result in a dashboard
getting stuck with unsaved changes on the first save. This was caused by
a race condition - since the `debounce` on the React embeddable unsaved
changes observable was **before** the `switchMap`, the React embeddable
observable fired **immediately** on save which then triggered the
`diffingSubscription` to fire too early.

**Before:**



https://github.com/elastic/kibana/assets/8698078/44be114a-0c6d-4f40-a5c1-c05889d53ace



**After:**


https://github.com/elastic/kibana/assets/8698078/52f50fd4-0e8f-4aff-8fe6-19b9038623ee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort project:embeddableRebuild Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants