Tooltip portal
Description
This turned out to be easy now that tooltip is in context.
Related Issue
https://github.com/recharts/recharts/pull/4435
https://github.com/recharts/recharts/issues/2458
Motivation and Context
Make sure Tooltip always renders on top of other content, and Cursor always below
How Has This Been Tested?
tests, storybooks
Screenshots (if appropriate):
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [x] I have added a storybook story or extended an existing story to show my changes
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.09%. Comparing base (
dcb864b) to head (47f761d).
Additional details and impacted files
@@ Coverage Diff @@
## 3.x #4441 +/- ##
==========================================
+ Coverage 95.04% 95.09% +0.05%
==========================================
Files 106 107 +1
Lines 20723 20813 +90
Branches 2819 2846 +27
==========================================
+ Hits 19696 19792 +96
+ Misses 1021 1015 -6
Partials 6 6
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I think the screenshot is from build 863? I ran that one, then I realized I need to have a separate cursor portal, then I added the cursor portal. My bad, I should have generated a new diff, here it is: https://www.chromatic.com/test?appId=63da8268a0da9970db6992aa&id=66211568b767d61b79aa05d1
For comparison here's a codesandbox I made on 2.x version - the tooltip wasn't clipped then. https://codesandbox.io/p/sandbox/tall-tooltip-739pqy?file=%2Fsrc%2FApp.tsx%3A62%2C16
Sweet sorry, I could've found out post-merge. Thanks!