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

[Maps] decouple SYNCHRONIZE_MOVEMENT_ACTION from Embeddable framework #175642

Merged
merged 8 commits into from
Jan 29, 2024

Conversation

nreese
Copy link
Contributor

@nreese nreese commented Jan 25, 2024

Part of #175138 and prerequisite for #174960

PR decouples SYNCHRONIZE_MOVEMENT_ACTION from Embeddable framework by migrating to sets of composable interfaces.

@nreese
Copy link
Contributor Author

nreese commented Jan 25, 2024

/ci

@nreese nreese marked this pull request as ready for review January 26, 2024 19:46
@nreese nreese requested review from a team as code owners January 26, 2024 19:46
@nreese nreese added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas release_note:skip Skip the PR/issue when compiling release notes v8.13.0 labels Jan 26, 2024
@elasticmachine
Copy link
Contributor

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

@nreese nreese added Feature:Embedding Embedding content via iFrame Feature:Embeddables Relating to the Embeddable system labels Jan 26, 2024
Copy link
Contributor

@stratoula stratoula 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 only

@nreese
Copy link
Contributor Author

nreese commented Jan 29, 2024

@elasticmachine merge upstream

Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

Changes LGTM! Left a few small suggestions, but they may not be applicable in this case.

embeddable.type === 'lens' &&
typeof (embeddable as LensEmbeddable).getSavedVis === 'function' &&
(embeddable as LensEmbeddable).getSavedVis()?.visualizationType === 'lnsChoropleth'
api.type === 'lens' &&
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure how applicable this is here, but we do have a type guard apiIsOfType which does this check, and also performs some type-narrowing of api to HasType<'lens'>.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would it make sense to move apiIsOfType check into apiHasLensConfig?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah that's a great call. This is a great way to be totally sure the API is actually lens and not some other type with getSavedVis.

export interface SynchronizeMovementActionContext {
embeddable: Embeddable<EmbeddableInput>;
}
export type SynchronizeMovementActionApi = HasType & Partial<HasLensConfig & HasVisualizeConfig>;
Copy link
Contributor

Choose a reason for hiding this comment

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

If you wanted you could be even more specific here by saying this api must have type of HasType<'lens' | 'visualize' | 'map'>

@nreese nreese requested a review from a team as a code owner January 29, 2024 20:38
@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
lens 1242 1243 +1
visualizations 375 395 +20
total +21

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
lens 557 560 +3
visualizations 809 808 -1
total +2

Async chunks

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

id before after diff
lens 1.4MB 1.4MB +90.0B
maps 2.9MB 2.9MB +42.0B
visualizations 270.6KB 270.6KB -9.0B
total +123.0B

Page load bundle

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

id before after diff
lens 41.2KB 41.9KB +692.0B
maps 48.0KB 47.9KB -35.0B
visualizations 57.3KB 57.4KB +58.0B
total +715.0B
Unknown metric groups

API count

id before after diff
lens 658 661 +3
visualizations 840 839 -1
total +2

History

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

@nreese nreese merged commit 5b38614 into elastic:main Jan 29, 2024
17 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Jan 29, 2024
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this pull request Feb 15, 2024
…elastic#175642)

Part of elastic#175138 and prerequisite
for elastic#174960

PR decouples SYNCHRONIZE_MOVEMENT_ACTION from Embeddable framework by
migrating to sets of composable interfaces.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
…elastic#175642)

Part of elastic#175138 and prerequisite
for elastic#174960

PR decouples SYNCHRONIZE_MOVEMENT_ACTION from Embeddable framework by
migrating to sets of composable interfaces.

---------

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Devon Thomson <devon.thomson@elastic.co>
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:Embeddables Relating to the Embeddable system Feature:Embedding Embedding content via iFrame project:embeddableRebuild release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants