Skip to content

Conversation

@VladLasitsa
Copy link
Contributor

@VladLasitsa VladLasitsa commented Feb 7, 2022

Part of: #123797

Summary

  • adds autoScale arg to metric expression which enable auto scaling
  • adds AutoScale component to support auto scale functionality for metric unified renderer

How it looks on dashboard:
New Dashboard - Elastic

@VladLasitsa
Copy link
Contributor Author

@flash1293 As new HOC component: withAutoScale does not depend on the metric I have question: Should we move that component in common place for all plugins so that everyone in future can use it if it needed?

@flash1293
Copy link
Contributor

@VladLasitsa Not for now, if a use case comes up we are going to move it into a shared space.

@VladLasitsa
Copy link
Contributor Author

@elasticmachine merge upstream

@VladLasitsa VladLasitsa requested a review from alexwizp February 9, 2022 13:39
Copy link
Contributor

@Kuznietsov Kuznietsov left a comment

Choose a reason for hiding this comment

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

@VladLasitsa, thanks. Code LGTM 👍

Please, address one comment.

@VladLasitsa VladLasitsa marked this pull request as ready for review February 10, 2022 08:43
@VladLasitsa VladLasitsa requested review from a team as code owners February 10, 2022 08:43
@VladLasitsa VladLasitsa self-assigned this Feb 10, 2022
@VladLasitsa VladLasitsa added Feature:MetricVis Metric visualization feature 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.2.0 labels Feb 10, 2022
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Not sure about some stylings, but LGTM otherwise.

// mtrChart__legend-isLoading

.mtrVis {
@include euiScrollBar;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need these changes? I don't notice any difference

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we use VisualizationContainer here with styles which includes styles for scrollbar, but styles of VisualizationContainer loaded only when we open visualization first (because we load styles here src\plugins\visualizations\public\vis_async.ts). If we open metric directly in canvas you will see so that we don't have scroll at all because we don't load styles for VisualizationContainer. So to be sure that we will have correct scroll I added these styles here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks 👍

@flash1293
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis left a comment

Choose a reason for hiding this comment

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

Left one small comment, but otherwise approved. Thanks!

@VladLasitsa VladLasitsa added the backport:skip This PR does not require backporting label Feb 11, 2022
@kibana-ci
Copy link

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
expressionMetricVis 29 31 +2

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
expressionMetricVis 40 42 +2

Async chunks

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

id before after diff
expressionMetricVis 8.3KB 10.0KB +1.6KB

Page load bundle

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

id before after diff
expressionMetricVis 6.8KB 7.1KB +274.0B
Unknown metric groups

API count

id before after diff
expressionMetricVis 40 42 +2

History

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

cc @VladLasitsa

@VladLasitsa VladLasitsa merged commit 8baf9b8 into elastic:main Feb 11, 2022
@VladLasitsa VladLasitsa changed the title Add auto scale functionality to metric unified renderer [MetricVis] Add auto scale functionality to metric unified renderer Feb 14, 2022
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 Feature:MetricVis Metric visualization feature 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.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants