-
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 chart tooltip positioning for new K7 navigation #32563
[ML] Fix chart tooltip positioning for new K7 navigation #32563
Conversation
Pinging @elastic/ml-ui |
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, 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 |
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.
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.
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.
Good call. I've moved those two numbers into variables
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 ⚡️
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
💔 Build Failed |
💚 Build Succeeded |
* [ML] Fix chart tooltip positioning for new K7 navigation * [ML] Move numeric offset numbers into variables
* [ML] Fix chart tooltip positioning for new K7 navigation * [ML] Move numeric offset numbers into variables
* [ML] Fix chart tooltip positioning for new K7 navigation * [ML] Move numeric offset numbers into variables
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:
After:
Checklist