Skip to content

[Step 3] Cleanup charts plugin#130132

Merged
alexwizp merged 6 commits intoelastic:mainfrom
alexwizp:step-3
Apr 19, 2022
Merged

[Step 3] Cleanup charts plugin#130132
alexwizp merged 6 commits intoelastic:mainfrom
alexwizp:step-3

Conversation

@alexwizp
Copy link
Copy Markdown
Contributor

@alexwizp alexwizp commented Apr 13, 2022

Closes: #123795, Closes: #104697

Summary

Step 3 of

What was done:

  1. replaced sass files to @emotion/css for @kbn/coloring package and charts plugin;
  2. removed src/plugins/charts/public/static/components/common_chart_styles.scss in a favor to useCommonChartStyles hook;
  3. palette expression function became asynchronous;
  4. ColorPicker and LegendToggle components became to be lazy loaded.

Bundle structure:

Before:

image

After:

image

note: this is relevant with #130079

@alexwizp alexwizp force-pushed the step-3 branch 2 times, most recently from 0d68edd to c634670 Compare April 13, 2022 14:57
@alexwizp alexwizp self-assigned this Apr 13, 2022
@alexwizp alexwizp added v8.3.0 Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Apr 13, 2022
@alexwizp alexwizp marked this pull request as ready for review April 14, 2022 09:50
@alexwizp alexwizp requested review from a team as code owners April 14, 2022 09:50
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

# Conflicts:
#	src/plugins/charts/common/expressions/palette/palette.test.ts
#	src/plugins/charts/common/palette.ts
@alexwizp
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

Copy link
Copy Markdown
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

This is wonderful @alexwizp! Thanks for in-depth improvements 👏🏼

@alexwizp
Copy link
Copy Markdown
Contributor Author

@elasticmachine merge upstream

@kibana-ci
Copy link
Copy Markdown

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
charts 114 91 -23
expressionHeatmap 70 65 -5
lens 762 757 -5
total -33

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
charts 260 253 -7

Async chunks

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

id before after diff
charts 68.8KB 78.7KB +9.9KB
expressionHeatmap 81.3KB 80.7KB -597.0B
expressionPartitionVis 44.0KB 44.1KB +107.0B
lens 1.1MB 1.1MB -612.0B
total +8.8KB

Public APIs missing exports

Total count of every type that is part of your API that should be exported but is not. This will cause broken links in the API documentation system. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats exports for more detailed information.

id before after diff
charts 4 9 +5
kibana 332 330 -2
total +3

Page load bundle

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

id before after diff
charts 58.3KB 46.2KB -12.1KB
expressionGauge 14.2KB 14.3KB +59.0B
expressionHeatmap 14.0KB 14.0KB +33.0B
total -12.1KB
Unknown metric groups

API count

id before after diff
charts 313 272 -41

async chunk count

id before after diff
charts 3 6 +3

History

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

cc @alexwizp

@alexwizp
Copy link
Copy Markdown
Contributor Author

@elastic/kibana-design please review

@alexwizp alexwizp merged commit f2af25d into elastic:main Apr 19, 2022
jloleysens added a commit to jloleysens/kibana that referenced this pull request Apr 19, 2022
…disable-server-side

* 'main' of github.com:elastic/kibana: (103 commits)
  [Osquery] Update eslint config (elastic#129637)
  [Uptime] Update monitor saved object mappings (elastic#130433)
  Add links to metricbeat module docs (elastic#130519)
  Add link to troubleshooting guide in confirm data copy (elastic#130420)
  [Step 3] Cleanup charts plugin (elastic#130132)
  [Visualize] Adds a deprecation warning to the pie app (elastic#130447)
  [Maps] fix vector tile load errors not displayed in legend (elastic#130395)
  [CI] Split alerting-api-integration tests into separate cigroups (elastic#130414)
  [CI] Use spot instances for default cigroups in PR CI (elastic#130476)
  [functional-tests] TimePicker optimizations (elastic#130200)
  [kbn/pm] use stable module ids in dist (elastic#130497)
  [8.2.1][Security Solution][Session view] fix full screen session view margin (elastic#130496)
  Fix wrong config in comments (elastic#130378)
  Add deprecated telemetry (elastic#130458)
  Add eslint rule to support breaking up packages (elastic#130483)
  [Security Solution][Endpoint] Fix test stability and un-skip flaky tests (elastic#130176)
  Update object types for SharePoint Online external connector (elastic#130478)
  [Workplace Search] Fix broken feedback link (elastic#130475)
  Rename the term "execution" in config to "run" (elastic#130172)
  [Cloud Posture] use index with keyword mapping (elastic#130456)
  ...

# Conflicts:
#	docs/user/reporting/index.asciidoc
#	x-pack/plugins/reporting/public/types.ts
#	x-pack/plugins/screenshotting/server/screenshots/index.test.ts
#	x-pack/plugins/screenshotting/server/screenshots/index.ts
kertal pushed a commit to kertal/kibana that referenced this pull request May 24, 2022
* [Step 3] Cleanup charts plugin

* update JEST

* [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix'

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move color stop UI into shared_ux plugin Reduce charts bundle size

7 participants