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

[Visualizations] Remove jQuery from owned plugins + remove flot-charts from shared bundle #181543

Merged
merged 15 commits into from
Apr 29, 2024

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Apr 24, 2024

Summary

This PR aims to reduce the amount of dependencies used in the visualizations plugins.

Dependencies removed:

  • jquery usage in graph
  • jquery usage in Vega plugin.

As a bonus point it makes the @kbn/flot-charts dependency a Canvas and Monitoring only (the only 2 consumers) rather than load it for all Kibana plugins.

Checklist

@dej611
Copy link
Contributor Author

dej611 commented Apr 24, 2024

/ci

@dej611
Copy link
Contributor Author

dej611 commented Apr 24, 2024

/ci

@dej611 dej611 changed the title Some attempts to reduce the shared bundle size + remove jQuery [Visualizations] Remove jQuery from owned plugins + make flot-charts a direct Canvas dep Apr 24, 2024
@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes v8.15.0 labels Apr 24, 2024
@dej611
Copy link
Contributor Author

dej611 commented Apr 24, 2024

/ci

@dej611
Copy link
Contributor Author

dej611 commented Apr 24, 2024

/ci

@dej611
Copy link
Contributor Author

dej611 commented Apr 24, 2024

/ci

@dej611
Copy link
Contributor Author

dej611 commented Apr 26, 2024

/ci

@dej611
Copy link
Contributor Author

dej611 commented Apr 26, 2024

/ci

@dej611 dej611 changed the title [Visualizations] Remove jQuery from owned plugins + make flot-charts a direct Canvas dep [Visualizations] Remove jQuery from owned plugins + remove flot-charts from shared bundle Apr 26, 2024
@dej611 dej611 marked this pull request as ready for review April 26, 2024 09:21
@dej611 dej611 requested review from a team as code owners April 26, 2024 09:21
@dej611 dej611 requested review from a team as code owners April 26, 2024 09:21
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

Copy link
Contributor

@nickofthyme nickofthyme left a comment

Choose a reason for hiding this comment

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

So beautiful 🥹

Copy link
Contributor

@Heenawter Heenawter left a comment

Choose a reason for hiding this comment

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

Moving flot-charts dependency into Canvas makes sense to me 👍

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
canvas 1211 1224 +13
monitoring 480 493 +13
total +26

Async chunks

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

id before after diff
canvas 1013.8KB 1.1MB +68.7KB
graph 387.5KB 387.4KB -49.0B
monitoring 463.8KB 532.5KB +68.6KB
visTypeVega 1.8MB 1.8MB +328.0B
total +137.6KB

Page load bundle

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

id before after diff
graph 7.9KB 7.8KB -50.0B
kbnUiSharedDeps-srcJs 3.2MB 3.1MB -68.7KB
visTypeVega 35.3KB 35.2KB -50.0B
total -68.8KB

History

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

Copy link
Contributor

@cauemarcondes cauemarcondes left a comment

Choose a reason for hiding this comment

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

LGTM

@dej611 dej611 merged commit ac5ace0 into elastic:main Apr 29, 2024
18 checks passed
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Apr 29, 2024
yuliacech pushed a commit to yuliacech/kibana that referenced this pull request May 3, 2024
…s from shared bundle (elastic#181543)

## Summary

This PR aims to reduce the amount of dependencies used in the
visualizations plugins.

Dependencies removed:
* `jquery` usage in `graph`
* `jquery` usage in `Vega` plugin.

As a bonus point it makes the `@kbn/flot-charts` dependency a Canvas and
Monitoring only (the only 2 consumers) rather than load it for all
Kibana plugins.

### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:review backport:skip This commit does not require backporting ci:build-webpack-bundle-analyzer release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.15.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants