-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Conversation
/ci |
Pinging @elastic/kibana-presentation (Team:Presentation) |
There was a problem hiding this 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
@elasticmachine merge upstream |
There was a problem hiding this 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' && |
There was a problem hiding this comment.
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'>
.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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>; |
There was a problem hiding this comment.
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'>
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
History
To update your PR or re-run it, just comment with: |
…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>
…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>
Part of #175138 and prerequisite for #174960
PR decouples SYNCHRONIZE_MOVEMENT_ACTION from Embeddable framework by migrating to sets of composable interfaces.