-
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
[Canvas] Force embeddables to refresh when renderable reevaluated #67133
Conversation
Pinging @elastic/kibana-canvas (Team:Canvas) |
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
* Timestamp. Needed to get a different result after each time the expression is evaluated | ||
* to force a reload of the embeddables internal data | ||
*/ | ||
generated: number; |
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: generatedAt
might be a better name here to denote that it's a timestamp
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…ine-editor * 'master' of github.com:elastic/kibana: (129 commits) [Canvas] Force embeddables to refresh when renderable reevaluated (#67133) [Canvas] Better handling navigating to/from canvas (#66407) [Ingest pipelines] Fix schema validation for simulate and update routes (#67199) do not use es from setup (#67277) Auto expand replicas for event log (#67286) Observability & APM do not use elasticsearch client provided via setup contract (#67263) Fix privileges check when security is not enabled (#67308) add IIS home (#66918) [ML] Adding additional job service endpoint tests (#66892) [Ingest Manager] Update fleet internal doc with latest flags (#67193) [Discover] Deangularize the loading spinner (#67165) Add `application.navigateToUrl` core API (#67110) Improve indexpattern without timefield functional test (#67031) KibanaContext in index pattern managment ui (#66985) Fix Azure metrics tutorial inside the App Home/ Add data area (#66901) add azure logs home (#66910) fix: rum agent should work correctly on new platform (#67037) [test_utils/Testbed] Move to src/test_utils folder (OSS) (#66898) only block registration when appRoute contains the exact basePath (#67125) Changed actions API endpoints urls to follow Kibana STYLEGUIDE (#65936) ... # Conflicts: # x-pack/plugins/ingest_pipelines/public/application/components/pipeline_form/pipeline_form_fields.tsx
…astic#67133) * Force embeddables to refresh when renderable reevaluated * prettier * Rename generated property Co-authored-by: Elastic Machine <[email protected]>
…astic#67133) * Force embeddables to refresh when renderable reevaluated * prettier * Rename generated property Co-authored-by: Elastic Machine <[email protected]>
…7133) (#67351) * Force embeddables to refresh when renderable reevaluated * prettier * Rename generated property Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
…7133) (#67353) * Force embeddables to refresh when renderable reevaluated * prettier * Rename generated property Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
Summary
We render an element with the result of evaluating it's expression.
If the result is unchanged, then we skip rendering. An embeddables expression result will almost always be the same, even on a workpad refresh. To get around this, we add what is essentially a timestamp on the result of the embeddable expression evaluation. This will ensure a rerender happens, and that re-render will cause a reload of the embeddable data.