-
Notifications
You must be signed in to change notification settings - Fork 715
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
fix(tooltip): fallback to left/top positioning, add applyPositionStyle #857
Conversation
React.HTMLProps<HTMLDivElement> & | ||
WithBoundingRectsProps; | ||
|
||
function TooltipWithBounds({ | ||
children, |
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.
abc ordering
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 is abc?
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.
sorry updated
@@ -2,13 +2,26 @@ import React from 'react'; | |||
import cx from 'classnames'; | |||
|
|||
export type TooltipProps = { | |||
children?: React.ReactNode; |
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.
abc ordering
Pull Request Test Coverage Report for Build 294468908
💛 - Coveralls |
🐛 Bug Fix
This partially reverts #828 (which fixed #767) because the re-implementation of in
Tooltip
to usetransform
instead oftop/left
for positioning breaks cases where users themselves setstyle.transform
and would thus be a 💥 breaking change. This was true in the/areas
demo:Before
After
🚀 Enhancements
@visx/tooltip
applyPositionStyle
which appliesposition: absolute
so that users who setunstyled=true
don't have to set this themselves via a CSS selector 🤦 . In a future breaking change this will be the default behavior.@hshoff @kristw