-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[ML] Fix missing overflowY in Anomaly charts embeddable #101404
Conversation
@elasticmachine merge upstream |
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)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this 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.
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @qn895 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* [ML] Add requestAnimationFrame and dd back overflowY auto * [ML] Remove request Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…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>
Summary
This PR fixes missing
overflowY
setting in Anomaly charts embeddable. TheoverflowY
property was previously set tohidden
in #99382 because there was a problem causing CI failures.Before

After

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