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 chart tooltip positioning for new K7 navigation #32563

Merged

Conversation

peteharverson
Copy link
Contributor

@peteharverson peteharverson commented Mar 6, 2019

Summary

Fixes the offsets used to position the chart tooltips to account for the switch from the kui side and top navigation bars in 6.x to the new K7 navigation elements.

Before:
image

After:
image

Checklist

@peteharverson peteharverson added review non-issue Indicates to automation that a pull request should not appear in the release notes v7.0.0 :ml Feature:Anomaly Detection ML anomaly detection Feature:ml-results legacy - do not use v8.0.0 v7.2.0 labels Mar 6, 2019
@peteharverson peteharverson requested a review from a team as a code owner March 6, 2019 15:53
@elasticmachine
Copy link
Contributor

Pinging @elastic/ml-ui

Copy link
Contributor

@walterra walterra left a comment

Choose a reason for hiding this comment

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

LGTM, just added a comment about assigning "magic numbers" to variables.

}
const top = pos.top + (offset.y) + scrollTop - 75; // Subtract 75 to adjust for height of top nav
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of using the comment for clarifying, this refactor might be an opportunity to first assign the raw number to a more self explanatory variable (see https://github.com/elastic/kibana/blob/master/style_guides/js_style_guide.md#magic-numbersstrings). Could also be done for the 22 two lines above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. I've moved those two numbers into variables

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.

LGTM ⚡️

Copy link
Member

@jgowdyelastic jgowdyelastic left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@peteharverson peteharverson merged commit b5bd1b5 into elastic:master Mar 6, 2019
@peteharverson peteharverson deleted the ml-chart-tooltip-offsets branch March 6, 2019 17:32
peteharverson added a commit to peteharverson/kibana that referenced this pull request Mar 6, 2019
* [ML] Fix chart tooltip positioning for new K7 navigation

* [ML] Move numeric offset numbers into variables
peteharverson added a commit to peteharverson/kibana that referenced this pull request Mar 6, 2019
* [ML] Fix chart tooltip positioning for new K7 navigation

* [ML] Move numeric offset numbers into variables
peteharverson added a commit that referenced this pull request Mar 6, 2019
…2570)

* [ML] Fix chart tooltip positioning for new K7 navigation

* [ML] Move numeric offset numbers into variables
peteharverson added a commit that referenced this pull request Mar 6, 2019
…2572)

* [ML] Fix chart tooltip positioning for new K7 navigation

* [ML] Move numeric offset numbers into variables
PhilippBaranovskiy pushed a commit to PhilippBaranovskiy/kibana that referenced this pull request Mar 7, 2019
* [ML] Fix chart tooltip positioning for new K7 navigation

* [ML] Move numeric offset numbers into variables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Anomaly Detection ML anomaly detection Feature:ml-results legacy - do not use :ml non-issue Indicates to automation that a pull request should not appear in the release notes review v7.0.0 v7.2.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants