-
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] Lazy DashboardRenderer #192754
Conversation
/ci |
/ci |
/ci |
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.
Removing this example because it uses getInput to get panel state. Instead, example will have to use dashboardApi.serializeState, but that method is not exposed yet. Since its just an example, removing now is the simplest fix.
/ci |
@elasticmachine merge upstream |
/ci |
/ci |
Pinging @elastic/kibana-presentation (Team:Presentation) |
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
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
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.
Left a few questions + comments, but everything else LGTM 👍 Code review + tested locally (Dashboard app, security solution, example plugin).
examples/portable_dashboards_example/public/dashboard_with_controls_example.tsx
Outdated
Show resolved
Hide resolved
examples/portable_dashboards_example/public/dual_dashboards_example.tsx
Outdated
Show resolved
Hide resolved
src/plugins/dashboard/public/dashboard_app/url/sync_dashboard_url_state.ts
Outdated
Show resolved
Hide resolved
src/plugins/dashboard/public/dashboard_top_nav/internal_dashboard_top_nav.tsx
Outdated
Show resolved
Hide resolved
fullScreenMode$: PublishingSubject<boolean | undefined>; | ||
focusedPanelId$: PublishingSubject<string | undefined>; | ||
forceRefresh: () => void; | ||
getPanelsState: () => DashboardPanelMap; |
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.
If we end up with a bunch of getters, we might a single getRuntimeState
that returns the entire state (currently just explicitInput
) rather than having individual getters for every piece of state. That being said, since there is currently only one getter for panels, I think this is fine 🤷
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.
ML changes LGTM
@elasticmachine merge upstream |
merge conflict between base and head |
💚 Build Succeeded
Metrics [docs]Module Count
Async chunks
Public APIs missing exports
Page load bundle
Unknown metric groupsAPI count
async chunk count
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
8.x backport #193219 |
# Backport This will backport the following commits from `main` to `8.x`: - [[dashboard] Lazy DashboardRenderer (#192754)](#192754) <!--- Backport version: 8.9.8 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Nathan Reese","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-17T19:15:50Z","message":"[dashboard] Lazy DashboardRenderer (#192754)\n\nChanges\r\n1. expose DashboardRenderer as lazy loaded component to reduce static\r\npage load size\r\n2. Use `onApiAvailable` prop to pass DashboardApi to parent instead of\r\n`forwardRef`\r\n3. Decouple DashboardApi from legacy embeddable system. This changed\r\nfunctions such as `updateInput` and using redux `select` to access\r\nstate.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e2380afd7b72912713c2372084463ced489bedb7","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding","Team:Presentation","release_note:skip","v9.0.0","ci:project-deploy-observability","Team:obs-ux-infra_services","apm:review","project:embeddableRebuild","v8.16.0"],"number":192754,"url":"https://github.com/elastic/kibana/pull/192754","mergeCommit":{"message":"[dashboard] Lazy DashboardRenderer (#192754)\n\nChanges\r\n1. expose DashboardRenderer as lazy loaded component to reduce static\r\npage load size\r\n2. Use `onApiAvailable` prop to pass DashboardApi to parent instead of\r\n`forwardRef`\r\n3. Decouple DashboardApi from legacy embeddable system. This changed\r\nfunctions such as `updateInput` and using redux `select` to access\r\nstate.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e2380afd7b72912713c2372084463ced489bedb7"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","labelRegex":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/192754","number":192754,"mergeCommit":{"message":"[dashboard] Lazy DashboardRenderer (#192754)\n\nChanges\r\n1. expose DashboardRenderer as lazy loaded component to reduce static\r\npage load size\r\n2. Use `onApiAvailable` prop to pass DashboardApi to parent instead of\r\n`forwardRef`\r\n3. Decouple DashboardApi from legacy embeddable system. This changed\r\nfunctions such as `updateInput` and using redux `select` to access\r\nstate.\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine <[email protected]>\r\nCo-authored-by: Elastic Machine <[email protected]>","sha":"e2380afd7b72912713c2372084463ced489bedb7"}},{"branch":"8.x","label":"v8.16.0","labelRegex":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> --------- Co-authored-by: kibanamachine <[email protected]>
Changes
onApiAvailable
prop to pass DashboardApi to parent instead offorwardRef
updateInput
and using reduxselect
to access state.