-
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
test(xychart): add refined Tooltip, TooltipProvider tests #852
test(xychart): add refined Tooltip, TooltipProvider tests #852
Conversation
8f96801
to
c7901b2
Compare
}} | ||
> | ||
<Tooltip | ||
resizeObserverPolyfill={ResizeObserver} |
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 happens if the polyfill is not passed?
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.
if it's not passed and it's not available globally on window
, it will throw (this logic lives in react-use-measure
). Throwing may seem extreme but I think it's the cleanest way to polyfill, we import it globally in @visx/responsive
's ParentSize
and have gotten negative feedback about it.
I think we just need to be clear about it in the docs like in @visx/tooltip
+ react-use-measure
.
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.
ic. a bit more gear towards power users i guess.
If doc emphasizes it enough probably ok.
Perhaps can make it a bit more convenient later to do this once instead of passing to every Tooltip
instance.
c7901b2
to
8d01a95
Compare
* new(tooltip/useTooltipInPortal): allow detectBounds overrid in component * new(xychart/Tooltip): add working crosshairs + point * internal(demo/xychart/ChartBackground): use innerWidth/Height * new(xychart): working multi-datum toolips * new(xychart/Tooltip): add snapTooltipToDatumX/Y * new(xychart): add showMultipleCircles support, debounce hideTooltip * new(demo/xychart): add tooltip controls * internal(xychart): cleanup * internal(xychart): cleanup * internal(xychart): memoize coordinate getter * type(xychart/TooltipContext): remove svgPoint * fix(xychart/TooltipContext): infer Datum type * new(xychart): circle => glyph * test(xychart): add refined Tooltip, TooltipProvider tests (#852) * test(xychart): add more Tooltip tests * test(xychart): add more TooltipProvider tests
🏠 Internal
Builds on #846, adding tests for the new
Tooltip
+TooltipProvider
functionality (new tests highlighted). Separated for review-ability.@kristw @hshoff