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

[Serialized state only] Update Library Transforms and Duplicate #206140

Merged

Conversation

ThomThomson
Copy link
Contributor

@ThomThomson ThomThomson commented Jan 9, 2025

Summary

Part of #205531

Fixes #205824

Note

To fix #205824 I had to change the Links Embeddable to have proper comparators for its various states even when it's by reference. This means that editing a by reference links embeddable will cause unsaved changes in this PR, and will continue to do so until the unsaved changes calculation is moved over to serialized state only. This is technically incorrect, but I figure this minor bug is a small price to (temporarily) pay, to fix the much larger bug above.

Fixes #206316

This PR unifies the various LibraryTransforms interfaces, updates all by reference capable embeddables to use them in the same way, and migrates the clone functionality to use only serialized state.

Additionally, Dashboard has been changed to properly track and back up changes in the references of its children.

@ThomThomson ThomThomson marked this pull request as ready for review January 15, 2025 22:51
@ThomThomson ThomThomson requested review from a team as code owners January 15, 2025 22:51
@nreese nreese self-requested a review January 16, 2025 14:13
Copy link
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

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

LGTM, just a few small comments
code review, tested in chrome

@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label Jan 16, 2025
@ThomThomson ThomThomson added release_note:fix and removed Feature:Embedding Embedding content via iFrame labels Jan 16, 2025
@ThomThomson ThomThomson added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Embeddables Relating to the Embeddable system project:embeddableRebuild labels Jan 16, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label Jan 20, 2025
@elasticmachine
Copy link
Contributor

💔 Build Failed

Failed CI Steps

Metrics [docs]

‼️ ERROR: no builds found for mergeBase sha [1dc2aca]

History

@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@lukasolson lukasolson left a comment

Choose a reason for hiding this comment

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

DataDiscovery changes LGTM

@ThomThomson ThomThomson merged commit 3719be0 into elastic:main Jan 21, 2025
8 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.x

https://github.com/elastic/kibana/actions/runs/12893707304

@kibanamachine
Copy link
Contributor

💔 All backports failed

Status Branch Result
8.x Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 206140

Questions ?

Please refer to the Backport tool documentation

ThomThomson added a commit to ThomThomson/kibana that referenced this pull request Jan 21, 2025
…tic#206140)

Unifies the various `LibraryTransforms` interfaces, updates all by reference capable embeddables to use them in the same way, and migrates the clone functionality to use only serialized state.

(cherry picked from commit 3719be0)

# Conflicts:
#	examples/embeddable_examples/public/react_embeddables/saved_book/saved_book_react_embeddable.tsx
@ThomThomson
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

ThomThomson added a commit that referenced this pull request Jan 21, 2025
…#206140) (#207455)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Serialized state only] Update Library Transforms and Duplicate
(#206140)](#206140)

<!--- Backport version: 9.6.4 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Devon
Thomson","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-01-21T18:43:43Z","message":"[Serialized
state only] Update Library Transforms and Duplicate (#206140)\n\nUnifies
the various `LibraryTransforms` interfaces, updates all by reference
capable embeddables to use them in the same way, and migrates the clone
functionality to use only serialized
state.","sha":"3719be0144d0f5b1fc71d1c564a41446c8ef3133","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Feature:Embedding","release_note:fix","Team:Presentation","v9.0.0","backport:prev-minor","Feature:Embeddables","project:embeddableRebuild"],"title":"[Serialized
state only] Update Library Transforms and
Duplicate","number":206140,"url":"https://github.com/elastic/kibana/pull/206140","mergeCommit":{"message":"[Serialized
state only] Update Library Transforms and Duplicate (#206140)\n\nUnifies
the various `LibraryTransforms` interfaces, updates all by reference
capable embeddables to use them in the same way, and migrates the clone
functionality to use only serialized
state.","sha":"3719be0144d0f5b1fc71d1c564a41446c8ef3133"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/206140","number":206140,"mergeCommit":{"message":"[Serialized
state only] Update Library Transforms and Duplicate (#206140)\n\nUnifies
the various `LibraryTransforms` interfaces, updates all by reference
capable embeddables to use them in the same way, and migrates the clone
functionality to use only serialized
state.","sha":"3719be0144d0f5b1fc71d1c564a41446c8ef3133"}}]}]
BACKPORT-->
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
…tic#206140)

Unifies the various `LibraryTransforms` interfaces, updates all by reference capable embeddables to use them in the same way, and migrates the clone functionality to use only serialized state.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Feature:Embeddables Relating to the Embeddable system Feature:Embedding Embedding content via iFrame project:embeddableRebuild release_note:fix Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.18.0 v9.0.0
Projects
None yet
7 participants