Skip to content

[Maps] Isolate mapbox-gl types and align downstream package versions.#100610

Merged
thomasneirynck merged 4 commits intoelastic:masterfrom
thomasneirynck:maps/export_mapboxgl_types
May 27, 2021
Merged

[Maps] Isolate mapbox-gl types and align downstream package versions.#100610
thomasneirynck merged 4 commits intoelastic:masterfrom
thomasneirynck:maps/export_mapboxgl_types

Conversation

@thomasneirynck
Copy link
Copy Markdown
Contributor

@thomasneirynck thomasneirynck commented May 25, 2021

Isolates mapbox-gl types into bazel.

This PR makes following changes:

  • exports the typings from the bazel kbn/mapbox-gl package
  • bumps and locks-in downstream mapbox-gl dependencies to latest
    • this required a typing change, Layer -> AnyLayer.
  • consistently import types with type. This makes a small dent in bundle size.

This should be the last PR before #85566. The MapLibre switch should then be isolated to:

  • replacing the mapbox-gl and types/mapbox-gl dependecies of the package
  • changing the imports in the bazel file

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

thomasneirynck commented May 25, 2021

apparently, upgrading the packages (69509a1) causes a failed build.

without the upgrade (9bdb959), it succeeds OK https://kibana-ci.elastic.co/job/elastic+kibana+pipeline-pull-request/127255/

[EDIT] This is due to introduction of top-level AnyLayer type in types/mapbox-gl.

@thomasneirynck thomasneirynck marked this pull request as ready for review May 26, 2021 14:08
@thomasneirynck thomasneirynck requested a review from a team May 26, 2021 14:08
@thomasneirynck thomasneirynck added the Team:Geo Former Team Label for Geo Team. Now use Team:Presentation label May 26, 2021
@elasticmachine
Copy link
Copy Markdown
Contributor

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

@thomasneirynck thomasneirynck added chore release_note:skip Skip the PR/issue when compiling release notes v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels May 26, 2021
@thomasneirynck thomasneirynck changed the title [Maps] isolate mapbox-gl typings [Maps] Isolate mapbox-gl types and align downstream package versions. May 26, 2021
@thomasneirynck thomasneirynck marked this pull request as draft May 26, 2021 14:21
@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 782 721 -61

Async chunks

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

id before after diff
maps 2.7MB 2.6MB -56.1KB
Unknown metric groups

References to deprecated APIs

id before after diff
canvas 29 25 -4
crossClusterReplication 8 6 -2
fleet 22 20 -2
globalSearch 4 2 -2
indexManagement 12 7 -5
infra 261 149 -112
lens 67 45 -22
licensing 18 15 -3
lists 239 236 -3
maps 286 208 -78
ml 121 115 -6
monitoring 109 56 -53
securitySolution 386 342 -44
stackAlerts 101 95 -6
total -342

History

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

@thomasneirynck thomasneirynck marked this pull request as ready for review May 26, 2021 16:34
Copy link
Copy Markdown
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 on the vega plugin 🙂
Are we going to add an owner to the new package?

@thomasneirynck
Copy link
Copy Markdown
Contributor Author

@stratoula yes, good idea- maps should own that package. I'll add it to codeowners.

Copy link
Copy Markdown
Contributor

@nreese nreese 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

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request May 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed 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.14.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants