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 DatePicker Time Input #2845
base: canary
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: c67c283 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 |
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 recent updates to the date picker component focus on improving control over open and close states. 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.
- please add some description on the issue and what you are trying to fix
- please add a changeset since you've changed the src code
- please add tests to cover the logic you added
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 tests to
packages/components/date-picker/__tests__/date-picker.test.tsx
to cover the logic you added.
b02ebef
to
e7cf05d
Compare
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
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.
The test cases you added just cover the base case of month and year picker, which is ok. However, I didn't see the logic where the PR is trying to solve in the test case, i.e. calendarBottomContent should be still here after open the month / year picker and the date picker.
If there are any problems, please guide me. Thanks! |
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)
- packages/components/date-picker/tests/date-picker.test.tsx (1 hunks)
Files not reviewed due to errors (1)
- packages/components/date-picker/tests/date-picker.test.tsx (no review received)
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)
- packages/components/date-picker/src/use-date-picker-base.ts (6 hunks)
Files not reviewed due to errors (1)
- packages/components/date-picker/src/use-date-picker-base.ts (no review received)
Closes #
📝 Description
Closing the Date Picker while the Month and Year Pickers are open causes the Time Input to disappear when reopened.
nextui/packages/components/date-picker/src/date-picker.tsx
Lines 41 to 42 in 1ba2d02
⛳️ Current behavior (updates)
20240424_160529.mp4
20240422_221921.mp4
🚀 New behavior
20240422_221611.mp4
💣 Is this a breaking change (Yes/No):
📝 Additional Information
Summary by CodeRabbit
onOpenChange
callback to manage open state changes.DatePicker
component.