-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
refactor(popover): use usePreventScroll
instead of react-remove-scroll
#3307
base: canary
Are you sure you want to change the base?
refactor(popover): use usePreventScroll
instead of react-remove-scroll
#3307
Conversation
🦋 Changeset detectedLatest commit: 690f200 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@chirokas is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe updates implement a patch for the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
Files selected for processing (5)
- .changeset/real-cows-lie.md (1 hunks)
- packages/components/popover/package.json (2 hunks)
- packages/components/popover/src/popover-content.tsx (3 hunks)
- packages/components/popover/src/use-popover.ts (3 hunks)
- packages/components/popover/stories/popover.stories.tsx (1 hunks)
Files skipped from review due to trivial changes (2)
- .changeset/real-cows-lie.md
- packages/components/popover/stories/popover.stories.tsx
Additional comments not posted (4)
packages/components/popover/package.json (2)
39-39
: Updateframer-motion
version in peerDependenciesThe update of
framer-motion
from10.17.0
to11.0.22
in peerDependencies ensures compatibility with newer versions of this dependency, which could include bug fixes and performance improvements.
66-66
: Ensure compatibility with updatedframer-motion
versionThe update of
framer-motion
to^11.0.22
in devDependencies should be tested to ensure that there are no breaking changes affecting the component's animations or behaviors.packages/components/popover/src/popover-content.tsx (1)
82-98
: Refactor animation logic for popover contentThe refactor introduces a conditional rendering based on
disableAnimation
to either render the content directly or within aLazyMotion
component for animations. This change enhances the component's flexibility by allowing animations to be toggled, which can be useful for performance optimizations or specific UI requirements.packages/components/popover/src/use-popover.ts (1)
308-310
: Implement scroll prevention logicThe addition of the
usePreventScroll
hook with a condition based onshouldBlockScroll
and the popover's open state is a good use of conditional logic to enhance UX by preventing unwanted scroll when the popover is active.
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.
please fill in the PR description, current behavior, new behavior etc and link issue if applicable.
Closes #
📝 Description
This PR improves the
shouldBlockScroll
behavior by usingusePreventScroll
instead ofreact-remove-scroll
to be consistent with the Modal.⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
📝 Additional Information
Summary by CodeRabbit
New Features
usePreventScroll
hook.Deprecations
react-remove-scroll
.Dependency Updates
framer-motion
to version11.0.22
.Component Enhancements