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

[XY] Expression chart. #127150

Merged
merged 81 commits into from
Mar 28, 2022
Merged

[XY] Expression chart. #127150

merged 81 commits into from
Mar 28, 2022

Conversation

Kuznietsov
Copy link
Contributor

@Kuznietsov Kuznietsov commented Mar 8, 2022

Summary

Completes part of #127115

  • Moved xyVis function and renderer to the separate plugin (chart_expressions/expression_xy) from Lens.
  • Register expression functions on the server and client sides.

Caution!

Blocked until #126456 will be merged.

@Kuznietsov Kuznietsov added the WIP Work in progress label Mar 8, 2022
@Kuznietsov Kuznietsov requested review from crob611 and alexwizp March 8, 2022 14:11
@Kuznietsov Kuznietsov self-assigned this Mar 8, 2022
@Kuznietsov
Copy link
Contributor Author

@elasticmachine merge upstream

@Kuznietsov
Copy link
Contributor Author

@elasticmachine merge upstream

# Conflicts:
#	src/plugins/chart_expressions/expression_xy/common/expression_functions/end_value.ts
#	src/plugins/chart_expressions/expression_xy/public/helpers/fitting_functions.ts
#	x-pack/plugins/lens/common/expressions/xy_chart/index.ts
#	x-pack/plugins/lens/common/expressions/xy_chart/xy_args.ts
#	x-pack/plugins/lens/common/expressions/xy_chart/xy_chart.ts
#	x-pack/plugins/lens/public/xy_visualization/types.ts
#	x-pack/plugins/lens/public/xy_visualization/xy_config_panel/visual_options_popover/missing_values_option.tsx
# Conflicts:
#	packages/kbn-optimizer/limits.yml
#	src/plugins/chart_expressions/expression_xy/common/expression_functions/layer_config/annotation_layer_config.ts
#	src/plugins/chart_expressions/expression_xy/public/components/__snapshots__/xy_chart.test.tsx.snap
#	src/plugins/chart_expressions/expression_xy/public/components/reference_lines.tsx
#	src/plugins/chart_expressions/expression_xy/public/components/xy_chart.tsx
#	x-pack/plugins/lens/common/expressions/xy_chart/layer_config/index.ts
#	x-pack/plugins/lens/common/expressions/xy_chart/xy_args.ts
#	x-pack/plugins/lens/common/expressions/xy_chart/xy_chart.ts
#	x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx
#	x-pack/plugins/lens/public/expressions.ts
#	x-pack/plugins/lens/public/xy_visualization/color_assignment.ts
#	x-pack/plugins/lens/public/xy_visualization/expression.test.tsx
#	x-pack/plugins/lens/public/xy_visualization/index.ts
#	x-pack/plugins/lens/public/xy_visualization/state_helpers.ts
#	x-pack/plugins/lens/public/xy_visualization/to_expression.ts
#	x-pack/plugins/lens/public/xy_visualization/visualization.test.ts
#	x-pack/plugins/lens/public/xy_visualization/visualization.tsx
#	x-pack/plugins/lens/public/xy_visualization/visualization_helpers.tsx
#	x-pack/plugins/lens/public/xy_visualization/xy_config_panel/color_picker.tsx
#	x-pack/plugins/lens/public/xy_visualization/xy_suggestions.test.ts
#	x-pack/plugins/lens/server/expressions/expressions.ts
#	x-pack/plugins/lens/tsconfig.json
# Conflicts:
#	x-pack/plugins/lens/common/expressions/xy_chart/xy_chart.ts
#	x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/layer_panel.tsx
#	x-pack/plugins/lens/public/xy_visualization/expression.test.tsx
@Kuznietsov Kuznietsov removed WIP Work in progress blocked labels Mar 28, 2022
@Kuznietsov Kuznietsov changed the title [WIP][XY] Expression chart. [XY] Expression chart. Mar 28, 2022
Copy link
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.

Wow, enormous effort, hats off! I like that you not only moved things around but also improved code style and typings in many places 😍 Left a few comments, tested a bit and now I'll test in depth :)
UPDATE: Finished with testing, couldn't find any regression 👌🏼

@Kuznietsov
Copy link
Contributor Author

@elastic/ml-ui, could you, please, leave your review? thanks a lot)

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

Code LGTM! Tested on Chrome and everything works as it was before. Approved!

Copy link
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

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

ML changes LGTM

@kibana-ci
Copy link
Collaborator

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
expressionXY - 72 +72
lens 785 750 -35
total +37

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 288 289 +1
expressionXY - 463 +463
lens 363 466 +103
total +567

Async chunks

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

id before after diff
expressionXY - 28.2KB +28.2KB
lens 1.1MB 1.1MB -25.6KB
total +2.6KB

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
lens 44 29 -15

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 58.3KB +19.0B
expressionXY - 40.1KB +40.1KB
lens 45.4KB 29.4KB -16.1KB
total +24.1KB
Unknown metric groups

API count

id before after diff
charts 321 322 +1
expressionXY - 473 +473
lens 438 541 +103
total +577

async chunk count

id before after diff
expressionXY - 1 +1

ESLint disabled line counts

id before after diff
lens 32 29 -3

Total ESLint disabled count

id before after diff
lens 34 31 -3

History

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

cc @Kunzetsov

@Kuznietsov Kuznietsov merged commit 072fe63 into elastic:main Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:medium Medium Level of Effort release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.