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][Vega] Isolate mapbox-gl library into bazel package #99931

Merged
merged 15 commits into from
May 25, 2021

Conversation

thomasneirynck
Copy link
Contributor

@thomasneirynck thomasneirynck commented May 12, 2021

Moves mapboxgl library instantiation in separate bazel package.

It is shared by Maps and Vega. Apart from removing duplication, this also avoids duplicate initialization of the workerUrl and RTL-plugin if user both loads Maps and Vega during the same session.

[EDIT]
Discussed offline with @nreese. A follow-on PR will isolate the type-exports in this same package.

@thomasneirynck thomasneirynck added chore [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v7.14.0 v8.0.0 labels May 12, 2021
packages/kbn-mapbox-gl/BUILD.bazel Outdated Show resolved Hide resolved
packages/kbn-mapbox-gl/package.json Show resolved Hide resolved
@mistic
Copy link
Member

mistic commented May 24, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
maps 780 782 +2

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.7MB +230.0B
visTypeVega 2.6MB 2.4MB -103.7KB
total -103.5KB

Page load bundle

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

id before after diff
maps 62.1KB 62.2KB +65.0B

History

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

Copy link
Member

@mistic mistic left a comment

Choose a reason for hiding this comment

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

LGTM

@thomasneirynck thomasneirynck marked this pull request as ready for review May 24, 2021 18:42
@thomasneirynck thomasneirynck requested a review from a team May 24, 2021 18:42
@thomasneirynck thomasneirynck requested a review from a team as a code owner May 24, 2021 18:42
@elasticmachine
Copy link
Contributor

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

@thomasneirynck thomasneirynck added the release_note:skip Skip the PR/issue when compiling release notes label May 24, 2021
@thomasneirynck thomasneirynck changed the title [Maps][Vega] Isolate mapbox-gl library [Maps][Vega] Isolate mapbox-gl library into bazel package May 24, 2021
Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

Windows LGTM

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.

This seems great Thomas and the removal of 103 KB from vega async bundle makes it even better. Vega changes LGTM! I tested it locally and vega maps work fine

Copy link
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

@@ -2678,6 +2678,10 @@
version "0.0.0"
uid ""

"@kbn/mapbox-gl@link:bazel-bin/packages/kbn-mapbox-gl/npm_module":
version "0.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is version 0.0.0 here but 1.0.0 in kbn/mapbox-gl?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know. It seems to be pretty consistent, also for other bazel-ackages in the yarn-lock.

cc @mistic do you know why this version is 0.0.0?

Copy link
Contributor

@miukimiu miukimiu left a comment

Choose a reason for hiding this comment

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

LGTM! 🎉

Just a CSS file was moved around. There were no actual style changes.

@thomasneirynck thomasneirynck added the auto-backport Deprecated - use backport:version if exact versions are needed label May 25, 2021
@thomasneirynck thomasneirynck merged commit 73b6048 into elastic:master May 25, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 25, 2021
@kibanamachine
Copy link
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 25, 2021
ecezalp pushed a commit to ecezalp/kibana that referenced this pull request May 26, 2021
ecezalp pushed a commit to ecezalp/kibana that referenced this pull request May 26, 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 [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.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants