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

[ML] Fix missing overflowY in Anomaly charts embeddable #101404

Merged

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Jun 4, 2021

Summary

This PR fixes missing overflowY setting in Anomaly charts embeddable. The overflowY property was previously set to hidden in #99382 because there was a problem causing CI failures.

Before
Screen Shot 2021-06-04 at 10 59 10

After
2021-06-04 at 11 16

Started flaky test suite runner...Successful in 42 runs ✅

@qn895
Copy link
Member Author

qn895 commented Jun 7, 2021

@elasticmachine merge upstream

@qn895 qn895 requested review from peteharverson and darnautov June 7, 2021 14:00
@qn895 qn895 self-assigned this Jun 7, 2021
@qn895 qn895 added :ml Feature:Anomaly Detection ML anomaly detection release_note:skip Skip the PR/issue when compiling release notes v7.14.0 v8.0.0 labels Jun 7, 2021
@qn895 qn895 marked this pull request as ready for review June 7, 2021 14:01
@qn895 qn895 requested a review from a team as a code owner June 7, 2021 14:01
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

@@ -99,7 +99,7 @@ export const EmbeddableAnomalyChartsContainer: FC<EmbeddableAnomalyChartsContain
const resizeHandler = useCallback(
throttle((e: { width: number; height: number }) => {
if (Math.abs(chartWidth - e.width) > 20) {
setChartWidth(e.width);
requestAnimationFrame(() => setChartWidth(e.width));
Copy link
Contributor

Choose a reason for hiding this comment

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

what are the benefits of using requestAnimationFrame here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for catching that - this is redundant. I have removed it here 080c631

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

Tested and LGTM.

While testing this PR I noticed an unrelated issue where the 'too many buckets' warning is being displayed unnecessarily depending on the time range of the dashboard - created #101495.

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Async chunks

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

id before after diff
ml 5.9MB 5.9MB -2.0B

History

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

cc @qn895

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.

LGTM

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Jun 8, 2021
@qn895 qn895 merged commit c2fe941 into elastic:master Jun 8, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Jun 8, 2021
* [ML] Add requestAnimationFrame and dd back overflowY auto

* [ML] Remove request

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@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 Jun 8, 2021
…01608)

* [ML] Add requestAnimationFrame and dd back overflowY auto

* [ML] Remove request

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
@qn895 qn895 deleted the ml-fix-anomaly-embeddable-missing-overflow branch June 8, 2021 22:00
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 Feature:Anomaly Detection ML anomaly detection :ml 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.

5 participants