-
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
Use embeddable v2 #39126
Use embeddable v2 #39126
Conversation
c9aac2c
to
ea2ee21
Compare
ea2ee21
to
6a2d63a
Compare
4f15202
to
2f7a378
Compare
995e141
to
5c2b3ef
Compare
9122dd6
to
bb66683
Compare
💔 Build Failed |
9a378a7
to
7d8a782
Compare
if (!_.isEqual(this._embeddableConfig.openTOCDetails, openTOCDetails)) { | ||
embeddableConfigChanged = true; | ||
this._embeddableConfig.openTOCDetails = openTOCDetails; | ||
if (!this.input.isLayerTOCOpen |
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.
!this.input.isLayerTOCOpen
is not needed in this check and will fire updateInput every time input.isLayerTOCOpen is false even if the value did not change.
Should just be
if (this.input.isLayerTOCOpen !== isLayerTOCOpen)
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
code review, tested in chrome
💔 Build Failed |
💚 Build Succeeded |
I think the dashboard filtering before all hook is flaky.
not sure if this PR exacerbates the issue, but given the screenshot and output above I don't see why it would. I don't know why it's failing either, the screenshot looks like the |
Actually I think I see why that test is flaky.
the page probably didn't finish loading so |
retest |
💔 Build Failed |
💚 Build Succeeded |
* Final Embeddable API V2 PR * fix: import discover embeddable scss file * address code review comments * Add a functional test that would have caught the bug... will look to add a unit version once I discover the error. * Fix bug cause by async loading calls and changes to parent input while child is being created. added jest test * remove outdated readme in dashboard folder * need to always refresh dashboard container, not just when "dirty" * add a wait, this issue started appearing right when I added this to the test * Remove test that kills kibana ci so it's not a blocker. jest test was added for this scenario * fix issues when panel is added then removed before it completes loading * fix logic error with maps embeddable and isLayerTOCOpen
* Final Embeddable API V2 PR * fix: import discover embeddable scss file * address code review comments * Add a functional test that would have caught the bug... will look to add a unit version once I discover the error. * Fix bug cause by async loading calls and changes to parent input while child is being created. added jest test * remove outdated readme in dashboard folder * need to always refresh dashboard container, not just when "dirty" * add a wait, this issue started appearing right when I added this to the test * Remove test that kills kibana ci so it's not a blocker. jest test was added for this scenario * fix issues when panel is added then removed before it completes loading * fix logic error with maps embeddable and isLayerTOCOpen
* Final Embeddable API V2 PR * fix: import discover embeddable scss file * address code review comments * Add a functional test that would have caught the bug... will look to add a unit version once I discover the error. * Fix bug cause by async loading calls and changes to parent input while child is being created. added jest test * remove outdated readme in dashboard folder * need to always refresh dashboard container, not just when "dirty" * add a wait, this issue started appearing right when I added this to the test * Remove test that kills kibana ci so it's not a blocker. jest test was added for this scenario * fix issues when panel is added then removed before it completes loading * fix logic error with maps embeddable and isLayerTOCOpen
* Use embeddable v2 - fix regression of elastic#39126 * fix PR comment
For reviewers
dashboard_state_manager
used to be the primary way the redux store was synced with app state. Redux was essentially replaced with the dashboard embeddable container. However rather than put this in dashboard state manager, the logic is split up between dashboard state manager and dashboard_app_controller. It's pretty illogical atm, but given that this entire flow needs some serious clean up, and that app state is going away, as is angular, I simply took the path of least resistance.Moving forward I could see some next steps being:
SavedDashboardPanel
toDashboardPanelState
. The former is what is stored in thePanelsJSON
, the latter is what theDashboardEmbeddableContainer
expects. Any previous ad hoc migration logic that used to exist inside the dashboard grid has been moved into the dashboard app (so the newDashboardEmbeddableContainer
expects data in a certain format, users of the system are required to make sure they send it over in that particular format).Dev Docs
Any plugins written on the old embeddable infrastructure will need to be updated to use the new embeddable infrastructure. The Embeddables API allows you to add your own custom UI components to a dashboard, without having to go through the visualization plugin system. This infrastructure is highly unstable at the moment. Expect this API to change frequently over the ensuing months.