Skip to content

fix(docs): add missing date-picker props#4768

Closed
wingkwong wants to merge 2 commits into
mainfrom
fix/date-picker-props
Closed

fix(docs): add missing date-picker props#4768
wingkwong wants to merge 2 commits into
mainfrom
fix/date-picker-props

Conversation

@wingkwong
Copy link
Copy Markdown
Member

@wingkwong wingkwong commented Jan 30, 2025

Closes #

📝 Description

some props got removed unexpectedly when migrating to APITable. ref: https://github.com/heroui-inc/heroui/pull/4191/files#diff-3bd1deb071cf435f924e0febde82674bf9db50bdf41be760a29f74914e56fbc1

⛳️ Current behavior (updates)

🚀 New behavior

💣 Is this a breaking change (Yes/No):

📝 Additional Information

Summary by CodeRabbit

  • New Features
    • Enhanced DatePicker component with extensive customization options
    • Added support for bottom calendar content
    • Introduced month and year picker toggles
    • Enabled custom properties for popover, selector button, calendar, and time input
    • Implemented animation control and advanced class name customization

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jan 30, 2025

⚠️ No Changeset found

Latest commit: 073776b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
heroui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 1, 2025 1:13pm
heroui-sb ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 1, 2025 1:13pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 30, 2025

Walkthrough

The pull request introduces multiple new properties to the DatePicker component's API in the documentation. These additions enhance the functionality and customization options for developers. The new properties include options for rendering additional content, controlling the visibility of month and year pickers, customizing sub-components, and applying custom class names, thereby allowing for more tailored implementations of the DatePicker.

Changes

File Change Summary
apps/docs/content/docs/components/date-picker.mdx Added documentation for new DatePicker props:
- CalendarBottomContent (ReactNode)
- showMonthAndYearPickers (boolean)
- popoverProps (PopoverProps)
- selectorButtonProps (ButtonProps)
- calendarProps (CalendarProps)
- timeInputProps (TimeInputProps)
- disableAnimation (boolean)
- classNames (custom component class names)

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 073776b and 4e4eda6.

📒 Files selected for processing (1)
  • apps/docs/content/docs/components/date-picker.mdx (1 hunks)
🔇 Additional comments (6)
apps/docs/content/docs/components/date-picker.mdx (6)

492-497: Approve the addition of CalendarBottomContent prop.
This new property, which allows rendering extra bottom content in the calendar component, is defined with a clear type and concise description. The default value of "-" is consistent with other props that do not have a preset value.


498-503: Approve the addition of showMonthAndYearPickers prop.
The property is appropriately typed as boolean | undefined and comes with a clear description and a default of "false". This addition enhances customization for displaying the month and year pickers.


504-509: Validate default values for popoverProps.
The default value { placement: "bottom", triggerScaleOnOpen: false, offset: 13 } seems reasonable for a popover component. Please double-check that these defaults align with the behavior expected by the popover component elsewhere in the codebase.


510-515: Approve the selectorButtonProps property.
The default provided ({ size: "sm", variant: "light", radius: "full", isIconOnly: true }) is consistent with similar customization props, and the description clearly states its purpose.


528-533: Approve the addition of disableAnimation prop.
This property clearly documents its purpose to disable animations across various date-picker elements and uses a default of "false", which is appropriate.


534-539: Approve the addition of classNames prop.
The type definition is comprehensive, allowing custom class names for multiple slots within the date-picker, and the default value of "-" is consistent with the rest of the API.


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?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@wingkwong wingkwong added the 📋 Scope : Docs Related to the documentation label Jan 30, 2025
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a 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 details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ceb6385 and 073776b.

📒 Files selected for processing (1)
  • apps/docs/content/docs/components/date-picker.mdx (1 hunks)
🔇 Additional comments (1)
apps/docs/content/docs/components/date-picker.mdx (1)

491-545: LGTM! Well-documented props with clear descriptions.

The new props are thoroughly documented with appropriate types, descriptions, and default values. The documentation includes:

  • Clear type definitions
  • Comprehensive descriptions
  • Proper default values (except for the ones flagged above)
  • Consistent formatting with existing props

Comment thread apps/docs/content/docs/components/date-picker.mdx
@wingkwong
Copy link
Copy Markdown
Member Author

will be updated in #4780

@wingkwong wingkwong deleted the fix/date-picker-props branch February 1, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📋 Scope : Docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants