Update Popover to use Floating UI instead of Popper.js#1229
Conversation
🦋 Changeset detectedLatest commit: 76537f1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
This pull request is being automatically deployed with Vercel (learn more). ariakit – ./🔍 Inspect: https://vercel.com/ariakit/ariakit/3UU5N7rjh5vv7tcyCRAhmHfTBegP reakit – ./🔍 Inspect: https://vercel.com/ariakit/reakit/6wqsxGfg6zyu75mY8pvuRoB8wsoF [Deployment for 76537f1 canceled] |
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 76537f1:
|
Codecov Report
@@ Coverage Diff @@
## main #1229 +/- ##
==========================================
+ Coverage 82.38% 82.51% +0.12%
==========================================
Files 230 230
Lines 5723 5724 +1
Branches 1592 1591 -1
==========================================
+ Hits 4715 4723 +8
+ Misses 1004 998 -6
+ Partials 4 3 -1
Continue to review full report at Codecov.
|
Closes #931
This PR replaces
@popperjs/corewith@floating-ui/domand updates theusePopoverStatehook to use the latter instead.With this change, I took the opportunity to improve the API and add/modify some features. Here's a list of them:
Fixed a bug where quickly hovering over nested
Hovercardcomponents right after they were mounted would cause the parent and the nestedHovercardto hide.Added
fitViewportprop tousePopoverStateand derived state hooks.The
preventOverflowprop has been renamed toslideonusePopoverStateand derived state hooks.Dropped support for
auto,auto-startandauto-endplacements onusePopoverStateand derived state hooks.The
shiftandgutterprops onusePopoverStateand derived state hooks don't support string values anymore. Now only numbers are supported.Added
overlapprop tousePopoverStateand derived state hooks.The
paddingprop has been renamed tooverflowPaddingonusePopoverStateand derived state hooks.