-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens][Embeddable] Make Embeddable resilient when toggling actions #126558
Conversation
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
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 and works, LGTM
@@ -10,7 +10,10 @@ import type { CoreStart, ThemeServiceStart } from 'kibana/public'; | |||
import type { Action, UiActionsStart } from 'src/plugins/ui_actions/public'; | |||
import type { Start as InspectorStartContract } from 'src/plugins/inspector/public'; | |||
import { EuiLoadingChart } from '@elastic/eui'; | |||
// import useUnmount from 'react-use/lib/useUnmount'; |
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.
nit unused import
💛 Build succeeded, but was flakyTest Failures
Metrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
Summary
Fix #125262
This PR changes the way the
useEmbeddableFactory
hook was called when creating the Lens embeddable: the transition betweenEmbeddableRoot
toEmbeddablePanel
(and viceversa) was triggering an unmount event which was destroying the innerembeddable
object, with no clear way to detect whether it was a transition or a real destroying event because the page was unmounted.Pushing down the
embeddable
creation code automatically handles the transition phase as the inner component lifecycle events make it work correctly in case of transition.Checklist
Delete any items that are not applicable to this PR.
Risk Matrix
Delete this section if it is not applicable to this PR.
Before closing this PR, invite QA, stakeholders, and other developers to identify risks that should be tested prior to the change/feature release.
When forming the risk matrix, consider some of the following examples and how they may potentially impact the change:
For maintainers