[Canvas] Use original input when updating existing embeddable#116026
Merged
cqliu1 merged 1 commit intoelastic:canvas/by-value-embeddablesfrom Oct 26, 2021
Merged
Conversation
Contributor
|
Pinging @elastic/kibana-presentation (Team:Presentation) |
c637735 to
780f71c
Compare
c9eb937 to
931e68a
Compare
Contributor
|
removing core team since I don't see any changes related to our domains |
1834014 to
151ceac
Compare
931e68a to
eecc31c
Compare
11 tasks
Contributor
💛 Build succeeded, but was flaky
Test FailuresMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
cqliu1
added a commit
that referenced
this pull request
Oct 26, 2021
cqliu1
added a commit
that referenced
this pull request
Oct 27, 2021
* [Canvas] Generic embeddable function (#104499) * Created generic embeddable function Fixed telemetry Updates expression on input change Fixed ts errors Store embeddable input to expression Added lib functions Added comments Fixed type errors Fixed ts errors Clean up Removed extraneous import Added context type to embeddable function def Fix import Update encode/decode fns Moved embeddable data url lib file Added embeddable test Updated comment * Fix reference extract/inject in embeddable fn * Simplify embeddable toExpression * Moved labsService to flyout.tsx * Added comment * [Canvas] Adds Save and Return Workflow (#111411) * [Canvas] Adds editor menu to Canvas (#113194) * Merge existing embeddable input with incoming embeddable input (#116026) * [Canvas] Extract and inject references for by-value embeddables (#115124) * Extract/inject references for by-value embeddables in embeddable function Fixed server interpreter setup Register external functions in canvas_plugin_src plugin def * Fixed ref name in embeddable.inject * Fixed ts errors * Fix missing type error Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
cqliu1
added a commit
that referenced
this pull request
Oct 28, 2021
cqliu1
added a commit
that referenced
this pull request
Oct 28, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This fixes a bug where the time range set on an embeddable in Canvas would get reset after editing the embeddable in it's respective editor and returning to Canvas.
Now if there is an incoming embeddable with the same id as an existing element, this extracts the original embeddable input from the expression and uses it as the base input object for the incoming embeddable input.
To test:
The time range on the embeddable should still show
Last 2 weeksinstead of resetting toLast 15 minutes.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
Fixed server interpreter setup
Register external functions in canvas_plugin_src plugin def