-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Fix cloning panels reactive issue #74253
[Dashboard] Fix cloning panels reactive issue #74253
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
…ity for by value embeddables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dej611, After taking a look, I think the success we were seeing earlier was a false positive cause by editing a 'by reference' embeddable without knowing. I merged in #72256 in order to test reactivity after editing a by value visualization, and the changes still didn't show up until the page was hard reloaded. Additionally, cloning seems to be broken for 'by value' embeddables.
If you want to take a look at the combined code, here's a PR with them together: #75222
At this point, my suggestion would be to revisit this after #70272 and #72256 are merged, so that it's easier to test. Additionally, we're considering adding a 'by reference' badge to embeddables that are saved in the library. That will also make it easier to test this code.
Yes, agree. It makes sense to check all the scenarios at once and solve them, rather than chasing each one during their development. |
Now may be a good time to revisit this problem, considering that the Lens & Visualize by Value PRs have been merged. It's still important to clean up this behaviour! |
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]page load bundle size
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally in Chrome, everything still works as expected. Code LGTM, tests looking great. Overall, great fix & super exciting change!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I tested using dashboard container by value developer example. Now I can change types of embeddable in embeddable input and get an expected result 👍
There is an existing functional test we can also improve by covering this edge case: https://github.com/elastic/kibana/blob/master/test/examples/embeddables/dashboard.ts
Great. I'll submit a follow up PR with the test |
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This PR aims to fix the panel cloning behaviour in the dashboard context, without creating new ids.
The main change has been implemented in the diff function
maybeUpdateChildren
which now receives the previous and current state and can decide to update based on the content difference (onlytype
as for now).Fixes #70381