-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Remove usages of react-onclickoutside to support React 19 #4979
Remove usages of react-onclickoutside to support React 19 #4979
Conversation
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.
✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!
What to expect from this code review:
- Comments posted to any areas of potential concern or improvement.
- Detailed feedback or actions needed to resolve issues that are found.
- Turnaround times vary, but we aim to be swift.
@hamidrezahanafi you can click here to see the review status or cancel the code review job.
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.
PullRequest Breakdown
Reviewable lines of change
+ 164
- 101
61% TSX
34% TSX (tests)
3% TypeScript
2% JSON
<1% JavaScript
Generated lines of change
+ 0
- 12
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
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.
The change looks good to me. On the other hand, the discussion on #4605 mentioned using floating-ui
instead, https://floating-ui.com/docs/usedismiss. Any specific reason to build the custom solution instead of using that?
Reviewed with ❤️ by PullRequest
Not all usages of the |
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4979 +/- ##
==========================================
+ Coverage 96.39% 96.42% +0.02%
==========================================
Files 28 29 +1
Lines 3305 3328 +23
Branches 1387 1411 +24
==========================================
+ Hits 3186 3209 +23
+ Misses 119 115 -4
- Partials 0 4 +4 ☔ View full report in Codecov by Sentry. |
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.
PullRequest Breakdown
Reviewable lines of change
+ 196
- 101
55% TSX
41% TSX (tests)
3% TypeScript
1% JSON
<1% JavaScript
Generated lines of change
+ 0
- 12
Type of change
Feature - These changes are adding a new feature or improvement to existing code.
Thanks! I'll do some manual testing before merging. Stay tuned. |
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.
This seems to work fine, I'm going to merge this. |
@martijnrusschen Is there any plan to cut a new release soon? React 19 is on the horizon and I would like to start some testing with this change. |
Description
Closes #4801
Closes #4605
Problem
React 19 removed
findDOMNode
andreact-onclickoutside
is not supportedChanges
react-onclickoutside
and replace with custom wrapperonClickOutside
to useMouseEvent
instead ofReact.MouseEvent
since it's a document event listenerScreenshots
To reviewers
Contribution checklist