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

[Embeddables Rebuild] Create & copy panels with runtime state #188039

Conversation

ThomThomson
Copy link
Contributor

Summary

Expands the work done in #186052 to make the new Embeddable framework use runtime state for creating new panels, and for passing panel state around in the state transfer service (copy to Dashboard etc).

Now, only loading from a Dashboard saved object should result in State that needs to be deserialized.

@ThomThomson ThomThomson added loe:small Small Level of Effort impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels Jul 10, 2024
@ThomThomson ThomThomson self-assigned this Jul 10, 2024
@ThomThomson ThomThomson added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas project:embeddableRebuild labels Jul 10, 2024
@ThomThomson
Copy link
Contributor Author

/ci

@ThomThomson
Copy link
Contributor Author

/ci

…eateAndCopyWithRuntimeState' into reactEmbeddables/createAndCopyWithRuntimeState
@ThomThomson
Copy link
Contributor Author

/ci

@ThomThomson
Copy link
Contributor Author

@elasticmachine merge upstream

@ThomThomson
Copy link
Contributor Author

/ci

@ThomThomson ThomThomson marked this pull request as ready for review July 15, 2024 16:54
@ThomThomson ThomThomson requested a review from a team as a code owner July 15, 2024 16:54
@elasticmachine
Copy link
Contributor

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

@ThomThomson ThomThomson added the release_note:skip Skip the PR/issue when compiling release notes label Jul 15, 2024
@nickpeihl nickpeihl self-requested a review July 15, 2024 20:01
Copy link
Member

@nickpeihl nickpeihl 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 added one nit.

);
const linksToSave: Link[] | undefined = state.links
?.map(({ title, description, error, ...linkToSave }) => linkToSave)
?.map(
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a comment why we're doing this? Maybe something like this?

Suggested change
?.map(
// Remove any properties with null values that may have been serialized when backing up runtimeState
?.map(

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call, added in b687476

@botelastic botelastic bot added the Feature:Embedding Embedding content via iFrame label Jul 15, 2024
…eateAndCopyWithRuntimeState' into reactEmbeddables/createAndCopyWithRuntimeState
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
links 127 126 -1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
embeddable 461 460 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
dashboard 532.6KB 532.7KB +99.0B
links 43.8KB 48.0KB +4.1KB
total +4.2KB

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
embeddable 71.3KB 71.3KB +27.0B
links 22.1KB 19.8KB -2.3KB
total -2.3KB
Unknown metric groups

API count

id before after diff
embeddable 571 570 -1

History

cc @ThomThomson

@ThomThomson ThomThomson merged commit 1140cae into elastic:main Jul 15, 2024
19 checks passed
@kibanamachine kibanamachine added v8.16.0 backport:skip This commit does not require backporting labels Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Embedding Embedding content via iFrame impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. loe:small Small Level of Effort project:embeddableRebuild release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants