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] convert HeatmapLayer dependencies to TS #66823

Merged
merged 11 commits into from
May 28, 2020

Conversation

nreese
Copy link
Contributor

@nreese nreese commented May 15, 2020

Prepares for conversion of HeatmpLayer and HeatmapStyle to TS by converting HeatmapLayer dependencies to TS

@nreese nreese added chore [Deprecated-Use Team:Presentation]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.9.0 labels May 15, 2020
@nreese nreese requested a review from a team as a code owner May 15, 2020 21:41
@elasticmachine
Copy link
Contributor

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

@nreese
Copy link
Contributor Author

nreese commented May 18, 2020

@elasticmachine merge upstream

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.

OK, apart from the small merge-issue. I'd reconsider the rename.

lgtm when green, thx!

x-pack/plugins/maps/public/classes/styles/color_utils.tsx Outdated Show resolved Hide resolved
const stopNumber = min + (delta * idx) / srcArr.length;
return [...accu, stopNumber, stopColor];
}, []);
return hexColors.reduce(
Copy link
Contributor

Choose a reason for hiding this comment

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

Somewhat unrelated: When seeing these dense signatures, I reminds me of the benefits of using simple loops for simple for simple operations more often, iso these higher order functions.

  const switchStatement: Array<number | string> = [];
  for (let i = 0; i < hexColors.length; i++) {
    const stopNumber = min + (delta * i) / hexColors.length;
    switchStatement.push(stopNumber, stopColor);
  }
  return switchStatement;

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

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

@nreese nreese merged commit 57345e0 into elastic:master May 28, 2020
nreese added a commit to nreese/kibana that referenced this pull request May 28, 2020
* [Maps] convert HeatmapLayer and dependencies to TS

* heatmap_style_editor snapshots

* eslint

* fix merge problems

* eslint cleanup

* revert rename of getOrdinalMbColorRampStops

* eslint

* tslint

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
nreese added a commit that referenced this pull request May 28, 2020
* [Maps] convert HeatmapLayer and dependencies to TS

* heatmap_style_editor snapshots

* eslint

* fix merge problems

* eslint cleanup

* revert rename of getOrdinalMbColorRampStops

* eslint

* tslint

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:skip Skip the PR/issue when compiling release notes v7.9.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants