-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(switch): the group has been replaced with a switch group in toggle #2989
Conversation
🦋 Changeset detectedLatest commit: eecc201 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 |
Someone is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe patch enhances the Changes
Assessment against linked issues
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 selected for processing (2)
- .changeset/giant-kids-march.md (1 hunks)
- packages/core/theme/src/components/toggle.ts (7 hunks)
Files skipped from review due to trivial changes (1)
- .changeset/giant-kids-march.md
Additional comments not posted (5)
packages/core/theme/src/components/toggle.ts (5)
33-33
: The update to thebase
slot class name enhances specificity and should help prevent style conflicts. Good improvement.
66-97
: The introduction of specific class names for thewrapper
slot based on theselected
attribute directly addresses the issue of the switch's state being influenced by parent elements. This is a crucial fix for the reported bug.
Line range hint
107-129
: Adjustments to the margin-left of thethumb
slot across different sizes ensure that the visual state of the switch is consistent and clear. This enhances user experience by providing immediate visual feedback.
153-160
: The modifications to thedisableAnimation
variants introduce smoother transitions and visual effects based on theselected
state, contributing to a more intuitive and responsive user interface.
176-199
: The updates to thecompoundVariants
introduce specific width adjustments for thethumb
based on thepressed
state, enhancing the component's interactivity and providing accurate visual feedback during user interactions.
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 add some tests
- please share the code you tested with
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 selected for processing (1)
- .changeset/giant-kids-march.md (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- .changeset/giant-kids-march.md
closing - will be covered in #3658 |
Closes #2959
📝 Description
Fixed a styles bug where the state of the
Switch
group takes the value of the data attributedata-selected
from the elements above⛳️ Current behavior (updates)
Testing code
Before.video.mp4
🚀 New behavior
After.mp4
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Summary by CodeRabbit
Switch
component to ensure visual consistency across different states.