-
-
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
fix: lazyMotion forwardRef issue #2622
fix: lazyMotion forwardRef issue #2622
Conversation
🦋 Changeset detectedLatest commit: 3830c6e The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 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 |
WalkthroughThe recent updates focus on enhancing component testing across various UI elements like Accordions, Dropdowns, Modals, Navbars, Popovers, and Tabs. These improvements include adding spies to monitor console errors, particularly regarding refs in function components, and introducing test cases to ensure error-free interactions. Additionally, a minor functionality change in the Ripple component involves a structural adjustment. A patch is also introduced to address a specific issue related to forwardRef in the LazyMotion component. 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 (
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@wingkwong is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
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: 1
Review Status
Configuration used: .coderabbit.yaml
Files selected for processing (9)
- .changeset/chilled-horses-type.md (1 hunks)
- packages/components/accordion/tests/accordion.test.tsx (1 hunks)
- packages/components/dropdown/tests/dropdown.test.tsx (1 hunks)
- packages/components/modal/tests/modal.test.tsx (2 hunks)
- packages/components/navbar/tests/navbar.test.tsx (2 hunks)
- packages/components/popover/tests/popover.test.tsx (1 hunks)
- packages/components/ripple/src/ripple.tsx (1 hunks)
- packages/components/tabs/tests/tabs.test.tsx (2 hunks)
- packages/components/tooltip/tests/tooltip.test.tsx (1 hunks)
Additional comments not posted (9)
.changeset/chilled-horses-type.md (1)
5-5
: The changeset description is clear and concise, directly addressing the issue fixed. Note that "LazyMotion" and "forwardRef" are specific terms related to the library's functionality, not spelling errors.packages/components/ripple/src/ripple.tsx (1)
29-56
: Wrapping the<m.span>
element in a fragment is a valid approach to address specific React rendering issues. Ensure comprehensive testing, especially focusing on the component's behavior in various use cases, to confirm that no unintended side effects are introduced.packages/components/tooltip/__tests__/tooltip.test.tsx (1)
17-31
: The test case implementation for spying onconsole.error
is correct and follows best practices. Consider adding a comment detailing the specific error message expected not to occur, enhancing the test's clarity and maintainability.packages/components/modal/__tests__/modal.test.tsx (1)
5-14
: > 📝 NOTEThis review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [8-26]
The test case for spying on
console.error
is correctly implemented. To improve clarity, consider adding a comment that specifies the exact error message this test aims to ensure does not occur, thereby enhancing the test's readability and purpose.packages/components/popover/__tests__/popover.test.tsx (1)
23-48
: The test case for ensuring no error is thrown when clicking the trigger button is correctly implemented. To enhance clarity and maintainability, consider adding a comment detailing the specific error message this test aims to ensure does not occur.packages/components/navbar/__tests__/navbar.test.tsx (2)
14-14
: Mockingwindow.scrollTo
is a good practice to avoid issues in tests that involve scrolling behavior. Ensure that this mock is only used in tests where scrolling behavior is not being explicitly tested.
58-92
: The test case for ensuring no error is thrown after a toggle click is correctly implemented. Consider adding comments to clarify the purpose of the test and the specific error message this test aims to ensure does not occur, enhancing the test's readability and purpose.packages/components/tabs/__tests__/tabs.test.tsx (1)
31-40
: > 📝 NOTEThis review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [34-56]
The test case for spying on
console.error
is correctly implemented. To improve clarity, consider adding a comment that specifies the exact error message this test aims to ensure does not occur, thereby enhancing the test's readability and purpose.packages/components/accordion/__tests__/accordion.test.tsx (1)
10-24
: The test case for ensuring no console error related to refs in function components is correctly implemented. To enhance clarity and maintainability, consider adding a comment detailing the specific error message this test aims to ensure does not occur.
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 Status
Configuration used: .coderabbit.yaml
Files selected for processing (7)
- packages/components/accordion/tests/accordion.test.tsx (2 hunks)
- packages/components/dropdown/tests/dropdown.test.tsx (2 hunks)
- packages/components/modal/tests/modal.test.tsx (2 hunks)
- packages/components/navbar/tests/navbar.test.tsx (2 hunks)
- packages/components/popover/tests/popover.test.tsx (2 hunks)
- packages/components/tabs/tests/tabs.test.tsx (2 hunks)
- packages/components/tooltip/tests/tooltip.test.tsx (2 hunks)
Files skipped from review as they are similar to previous changes (7)
- packages/components/accordion/tests/accordion.test.tsx
- packages/components/dropdown/tests/dropdown.test.tsx
- packages/components/modal/tests/modal.test.tsx
- packages/components/navbar/tests/navbar.test.tsx
- packages/components/popover/tests/popover.test.tsx
- packages/components/tabs/tests/tabs.test.tsx
- packages/components/tooltip/tests/tooltip.test.tsx
Closes #
📝 Description
⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
📝 Additional Information
Summary by CodeRabbit