-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(calendar): disable button picker in calendar if isDisabled
is true
#3358
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: ead1831 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 update to the Changes
Assessment against linked issues
Tip Early access features
Note:
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 (3)
- .changeset/friendly-pumas-brush.md (1 hunks)
- packages/components/calendar/tests/calendar.test.tsx (1 hunks)
- packages/components/calendar/src/use-calendar.ts (2 hunks)
Files skipped from review due to trivial changes (2)
- .changeset/friendly-pumas-brush.md
- packages/components/calendar/tests/calendar.test.tsx
Additional comments not posted (2)
packages/components/calendar/src/use-calendar.ts (2)
11-11
: Import statement update looks good.The addition of
mergeProps
from@react-aria/utils
is appropriate for the changes made.
79-79
: LGTM!The use of
mergeProps
to include theisDisabled
property inbuttonPickerProps
is correct and ensures that the button picker respects theisDisabled
state.However, ensure this change is properly reflected in all relevant parts of the codebase.
Verification successful
LGTM!
The use of
mergeProps
to include theisDisabled
property inbuttonPickerProps
is correct and ensures that the button picker respects theisDisabled
state. The change is properly reflected in all relevant parts of the codebase.
calendar-base.tsx
: Properly passesbuttonPickerProps
toCalendarHeader
.calendar-header.tsx
: Properly spreadsbuttonPickerProps
onto theButton
component.use-calendar.ts
: MergesisDisabled
intobuttonPickerProps
and passes it correctly.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all references to `buttonPickerProps` to ensure they handle the `isDisabled` property correctly. # Test: Search for the usage of `buttonPickerProps` in the codebase. Expect: Proper handling of `isDisabled` property. rg --type-add 'tsx' --type-add 'ts' --type tsx,ts 'buttonPickerProps'Length of output: 125
Script:
#!/bin/bash # Description: Verify all references to `buttonPickerProps` to ensure they handle the `isDisabled` property correctly. # Test: Search for the usage of `buttonPickerProps` in the codebase. Expect: Proper handling of `isDisabled` property. rg --type-add 'tsx:*.tsx' --type-add 'ts:*.ts' --type tsx,ts 'buttonPickerProps'Length of output: 111
Script:
#!/bin/bash # Description: Verify all references to `buttonPickerProps` to ensure they handle the `isDisabled` property correctly. # Test: Search for the usage of `buttonPickerProps` in the codebase. Expect: Proper handling of `isDisabled` property. rg --type-add 'tsx:*.tsx' --type tsx 'buttonPickerProps' rg --type-add 'ts:*.ts' --type ts 'buttonPickerProps'Length of output: 1831
Script:
#!/bin/bash # Description: Inspect the context around references to `buttonPickerProps` to verify the handling of the `isDisabled` property. # Check context of `buttonPickerProps` in calendar-base.tsx rg --type-add 'tsx:*.tsx' --type tsx -C 5 'buttonPickerProps' packages/components/calendar/src/calendar-base.tsx # Check context of `buttonPickerProps` in calendar-header.tsx rg --type-add 'tsx:*.tsx' --type tsx -C 5 'buttonPickerProps' packages/components/calendar/src/calendar-header.tsx # Check context of `buttonPickerProps` in use-calendar.ts rg --type-add 'ts:*.ts' --type ts -C 5 'buttonPickerProps' packages/components/calendar/src/use-calendar.tsLength of output: 3211
Closes #3357
📝 Description
passing
isDisabled
tobuttonPickerProps
⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
No
📝 Additional Information
Summary by CodeRabbit
Bug Fixes
isDisabled
is set to true, resolving issue [BUG] - Calendar #3357.Tests
isDisabled
is true.