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 Single Metric Viewer annotation tooltip hard to trigger #98233

Merged
merged 9 commits into from
Apr 29, 2021

Conversation

qn895
Copy link
Member

@qn895 qn895 commented Apr 23, 2021

Summary

This PR is part of #69538. Fixes include:

  • Make annotation marker labels on the Single Metric Viewer focus chart hover and clickable. Previously, if the annotation has a small duration, it would be extremely hard for user to be able to hover over the straight line to read the tooltip information.

    Before
    image

    After
    2021-04-23 at 18 09

  • Fix a styling issue with EUI Amsterdam theme which cause the flyout to have a black border when the page is first loaded and an svg marker is the first item used to trigger the Edit annotation flyout. See related EUI issue.

    Before
    2021-04-23 at 16 17

    After
    2021-04-23 at 18 14

@qn895 qn895 self-assigned this Apr 23, 2021
@qn895 qn895 force-pushed the ml-fix-annotation-marker-tooltip branch from 2ffc818 to eba2464 Compare April 23, 2021 23:17
@qn895 qn895 marked this pull request as ready for review April 23, 2021 23:18
@qn895 qn895 requested review from a team as code owners April 23, 2021 23:18
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui (:ml)

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

@qn895
Copy link
Member Author

qn895 commented Apr 27, 2021

@elasticmachine merge upstream

annotationUpdatesService.setValue(d);
});
.on('mouseover', onAnnotationMouseOver)
.on('mouseout', onAnnotationMouseOut)
Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 Apr 27, 2021

Choose a reason for hiding this comment

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

Can't hideFocusChartTooltip be passed here directly since it takes no arguments? Does it need to be wrapped in the onAnnotationMouseOut arrow function?

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. Updated here dc9798b (#98233).

Copy link
Contributor

@alvarezmelissa87 alvarezmelissa87 left a comment

Choose a reason for hiding this comment

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

Left a small comment but otherwise LGTM ⚡

@@ -132,6 +132,19 @@ export function renderAnnotations(
const levelHeight = ANNOTATION_LEVEL_HEIGHT;
const levels = getAnnotationLevels(focusAnnotationData);

const onAnnotationMouseOver = function (this: object, d: Annotation) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any type of 'mouseover' cotext (this) available?

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

If I'm following correctly, I believe there is a fix for the focus ring coming on the EUI side (cc: @cchaos ). See the discussion and related flyout PR.

Presuming this is correct, it might be best to wait on the EUI fix. At minimum, linking to the discussion/PR in a comment and coming back to remove this would be recommended.

Comment on lines 1 to 5
.mlAnnotationFlyout {
&:focus {
outline: none;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

As @ryankeairns said, this will be fixed via EUI before 7.14. So I'd recommend not doing any overrides.

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 @ryankeairns and @cchaos for the context 🙏 Good to know the issue will be fixed in 7.13. I have removed the css overrides here baea0c3 (#98233)

Copy link
Contributor

@ryankeairns ryankeairns left a comment

Choose a reason for hiding this comment

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

Thanks for the change! Also, with the CSS removed, you might be able to remove the className.

@qn895
Copy link
Member Author

qn895 commented Apr 29, 2021

@elasticmachine merge upstream

@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 +481.0B

History

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

cc @qn895

@qn895 qn895 added the auto-backport Deprecated - use backport:version if exact versions are needed label Apr 29, 2021
@qn895 qn895 merged commit d9a80d5 into elastic:master Apr 29, 2021
@qn895 qn895 deleted the ml-fix-annotation-marker-tooltip branch April 29, 2021 17:55
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 29, 2021
…stic#98233)

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

💚 Backport successful

Status Branch Result
7.13

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 29, 2021
) (#98804)

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

Co-authored-by: Quynh Nguyen <43350163+qn895@users.noreply.github.com>
@peteharverson peteharverson mentioned this pull request May 4, 2021
25 tasks
qn895 added a commit to qn895/kibana that referenced this pull request May 5, 2021
…stic#98233)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
qn895 added a commit that referenced this pull request May 5, 2021
) (#99352)

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

Co-authored-by: Kibana Machine <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
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Anomaly Detection ML anomaly detection :ml release_note:fix v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants