Skip to content

Conversation

@nreese
Copy link
Contributor

@nreese nreese commented Aug 24, 2020

fixes #75681

@nreese nreese added chore Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.10.0 labels Aug 24, 2020
@nreese nreese requested a review from thomasneirynck August 24, 2020 22:38
@nreese nreese requested a review from a team as a code owner August 24, 2020 22:38
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

Copy link
Contributor

@thomasneirynck thomasneirynck left a comment

Choose a reason for hiding this comment

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

thanks for the fix.

It seems the main issue is that HeatmapLayer inherits from VectorLayer so it can re-use some implementation, but it isn't really necessary wrt. how style-types and layer-types relate. In hindsight, the union-type seems like a band-aid to that decision.

As discussed offline, another approach to consider is to avoid the need for a union-type and the required type-checking in the dynamic_style_property altogether by removing the IVectorStyle.getStyle-override. The implementation VectorLayer.getStyle():IVectorStyle remains, and HeatmapLayer.getStyle():HeatmapStyle is implied (since that is still .js).

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

✅ unchanged

History

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

@nreese nreese merged commit 947a939 into elastic:master Aug 25, 2020
nreese added a commit to nreese/kibana that referenced this pull request Aug 25, 2020
* [Maps] fix IVectorLayer.getStyle typing

* update typing in VectorLayer type definition

* fix unit tests

* review feedback
nreese added a commit that referenced this pull request Aug 26, 2020
* [Maps] fix IVectorLayer.getStyle typing

* update typing in VectorLayer type definition

* fix unit tests

* review feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore release_note:skip Skip the PR/issue when compiling release notes Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Maps] update IVectorLayer.getStyle to return IVectorStyle | HeatmapStyle

4 participants