Skip to content
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

Prep State Transfer for Embeddables By Value #69991

Merged
merged 2 commits into from
Jun 26, 2020

Conversation

ThomThomson
Copy link
Contributor

Summary

This PR includes some prep work to allow the state transfer service to pass embeddables by value when moving to the editor, and back to the container.

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@ThomThomson ThomThomson added Feature:Dashboard Dashboard related features Feature:Embedding Embedding content via iFrame Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.9.0 labels Jun 25, 2020
@ThomThomson ThomThomson requested a review from a team June 25, 2020 18:00
@ThomThomson ThomThomson requested a review from a team as a code owner June 25, 2020 18:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@ThomThomson ThomThomson requested a review from majagrubic June 25, 2020 18:00
@ThomThomson ThomThomson force-pushed the arch/stateTransferPrep branch from 9719758 to 87e8ebd Compare June 25, 2020 19:49
originatingApp: string;
byValueMode?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed, I'd rather if we didn't have an explicit "byValue" parameter, but totally fine with leaving it for now.

@majagrubic
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@streamich streamich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AppArch code changes LGTM.

Copy link
Contributor

@Dosant Dosant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, code review

container.addNewEmbeddable<SavedObjectEmbeddableInput>(incomingState.type, {
savedObjectId: incomingState.id,
});
if ('id' in incomingState) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I'd put these type guards near EmbeddablePackageState

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you elaborate a bit on this? Typescript complains once we do addNewEmbeddable as it doesn't know if there's id field in that object (similarly for input). I don't know of another way of doing this.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@majagrubic majagrubic merged commit 52223da into elastic:master Jun 26, 2020
gmmorris added a commit to gmmorris/kibana that referenced this pull request Jun 26, 2020
* master: (34 commits)
  Upgrade `elliptic` dependency (`6.5.2` → `6.5.3`). (elastic#70054)
  [License Management] Do not break when `telemetry.enabled:false` (elastic#69711)
  [SECURITY] Redirect app/security to app/security/overview (elastic#70005)
  "Explore underlying data" in-chart action (elastic#69494)
  Api reference docs for state_containers and state_sync (elastic#67354)
  prep state transfer for passing embeddables by value to editor and back (elastic#69991)
  move Metrics API to start (elastic#69787)
  refactor: 💡 fix typo in embeddable (elastic#69417)
  [alerting] migrates the old `alerting` consumer to be `alerts` (elastic#69982)
  [APM]Create API to return data to be used on the Overview page (elastic#69137)
  [Lens] Fix delete button position in dimension panel for long labels (elastic#69495)
  [Lens] Add toolbar api (elastic#69263)
  Fixes bug on color picker defaults on TSVB (elastic#69889)
  [DOCS] Fixes wording in Upload a CSV section (elastic#69969)
  [Discover] Validate timerange before submitting query to ES (elastic#69363)
  [Maps] avoid using MAP_SAVED_OBJECT_TYPE constant when defining URL paths (elastic#69723)
  [Maps] Fix icon palettes are not working (elastic#69937)
  [Ingest Manager] Fix typo in constant name (elastic#69919)
  [test] skip status.allowAnonymous tests on cloud (elastic#69017)
  Fix backport (elastic#70003)
  ...
ThomThomson added a commit to ThomThomson/kibana that referenced this pull request Jun 26, 2020
…ck (elastic#69991)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
ThomThomson added a commit that referenced this pull request Jun 26, 2020
…ck (#69991) (#70073)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Dashboard Dashboard related features Feature:Embedding Embedding content via iFrame release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants