Skip to content
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(docs): incorrect import path in date range picker doc #3117

Merged
merged 1 commit into from
May 29, 2024

Conversation

wingkwong
Copy link
Member

@wingkwong wingkwong commented May 29, 2024

Closes #

📝 Description

as titled

⛳️ Current behavior (updates)

Please describe the current behavior that you are modifying

🚀 New behavior

Please describe the behavior or changes this PR adds

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

📝 Additional Information

Summary by CodeRabbit

  • Documentation
    • Updated the import sources for useLocale and useDateFormatter in the Date Range Picker documentation.
    • Removed the import of I18nProvider from the Date Range Picker documentation.

@wingkwong wingkwong requested a review from jrgarciadev as a code owner May 29, 2024 05:31
Copy link

vercel bot commented May 29, 2024

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

Name Status Preview Comments Updated (UTC)
nextui-docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 5:33am
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 29, 2024 5:33am

Copy link

changeset-bot bot commented May 29, 2024

⚠️ No Changeset found

Latest commit: 7711a50

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

Copy link
Contributor

coderabbitai bot commented May 29, 2024

Walkthrough

The recent changes primarily involve reordering and updating import statements in the presets.ts and date-range-picker.mdx files. Specifically, the imports for useDateFormatter and useLocale have been adjusted to be consistent and sourced from @react-aria/i18n. Additionally, the I18nProvider import has been removed from the date-range-picker.mdx file.

Changes

File Path Change Summary
apps/docs/content/components/date-range-picker/presets.ts Reordered imports: useDateFormatter and useLocale from @react-aria/i18n.
apps/docs/content/docs/components/date-range-picker.mdx Updated imports: moved useLocale and useDateFormatter to @react-aria/i18n, removed I18nProvider.

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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.

Copy link
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: 0

Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 67347d8 and 7711a50.
Files selected for processing (2)
  • apps/docs/content/components/date-range-picker/presets.ts (1 hunks)
  • apps/docs/content/docs/components/date-range-picker.mdx (1 hunks)
Additional Context Used
LanguageTool (10)
apps/docs/content/docs/components/date-range-picker.mdx (10)

Near line 65: Usually, there’s no comma before “if”.
Context: ...lows displaying up to 3 months at a time, if screen space permits. <CodeDemo title=...
Rule ID: IF_NO_COMMA


Near line 116: ‘taken into account’ might be wordy. Consider a shorter alternative.
Context: ...ncerns such as daylight saving time are taken into account when the value is manipulated. [@Inter...
Rule ID: EN_WORDINESS_PREMIUM_TAKEN_INTO_ACCOUNT


Near line 231: This expression is usually spelled with a hyphen.
Context: ...PickerContent.unavailableDates} /> ### Non Contiguous The allowsNonContiguousRanges prop ena...
Rule ID: NON_ANTI_JJ


Near line 322: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ent**: When the date-range-picker has a end content. Base on those endContent...
Rule ID: EN_A_VS_AN


Near line 324: This phrasing could be wordy, so try replacing it with something more concise.
Context: ... the date-range-picker's visibleMonth is more than 2. ## Accessibility ...
Rule ID: MORE_THAN_EXCEEDS


Near line 357: In this case, the usual preposition with “side” is “on”, not “in”. Did you mean “on the left side”?
Context: ... | Element to be rendered in the left side of the date-range-picker. ...
Rule ID: IN_ON_THE_RIGHT_HAND_SIDE


Near line 358: In this case, the usual preposition with “side” is “on”, not “in”. Did you mean “on the right side”?
Context: ... | Element to be rendered in the right side of the date-range-picker. ...
Rule ID: IN_ON_THE_RIGHT_HAND_SIDE


Near line 368: Consider adding a comma after ‘Usually’ for more clarity.
Context: ...icon to toggle the date picker popover. Usually a calendar icon. ...
Rule ID: RB_LY_COMMA


Near line 372: When ‘24-hour’ is used as a modifier, it is usually spelled with a hyphen.
Context: ... | Whether to display the time in 12 or 24 hour format. This is determined by the user'...
Rule ID: HOUR_HYPHEN


Near line 373: A comma may be missing after the conjunctive/linking adverb ‘Typically’.
Context: ...t that is displayed in the date picker. Typically "day" for dates. ...
Rule ID: SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA

Additional comments not posted (2)
apps/docs/content/components/date-range-picker/presets.ts (1)

3-3: The reordering of imports is typically a style preference or to comply with linting rules. Ensure this change aligns with your project's coding standards.

apps/docs/content/docs/components/date-range-picker.mdx (1)

277-277: The update of import paths from @internationalized/date to @react-aria/i18n for useLocale and useDateFormatter is correct, assuming the functionality remains consistent across these libraries. Verify that all functionalities provided by the old imports are available in the new library.

Verification successful

The search results indicate that the useLocale and useDateFormatter functions are being imported from @react-aria/i18n in multiple .mdx files, including date-range-picker.mdx, date-picker.mdx, and date-input.mdx. This suggests that the transition from @internationalized/date to @react-aria/i18n has been consistently applied across the documentation.

However, to ensure that all functionalities provided by the old imports are available in the new library, it would be prudent to verify the usage of these functions within the codebase to confirm that they are functioning as expected.


The search results show extensive usage of useLocale and useDateFormatter from @react-aria/i18n across various files in the codebase. This indicates that the transition from @internationalized/date to @react-aria/i18n has been applied consistently and the functionalities are being utilized as expected.

Given the comprehensive usage and the absence of any errors or missing functionalities in the search results, it can be concluded that the import changes are correct and the functionalities provided by the old imports are available in the new library.

  • apps/docs/content/docs/components/date-range-picker.mdx
  • apps/docs/content/docs/components/date-picker.mdx
  • apps/docs/content/docs/components/date-input.mdx
  • Various other files in the packages/components and apps/docs/content/components directories.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify that all functionalities provided by `@internationalized/date` are available in `@react-aria/i18n`.

# Test: Search for the usage of `useLocale` and `useDateFormatter` in the codebase. Expect: No missing functionalities.
rg --type mdx --files-with-matches $'useLocale|useDateFormatter'

Length of output: 93



Script:

#!/bin/bash
# Description: Verify that all functionalities provided by `@internationalized/date` are available in `@react-aria/i18n`.

# Test: Search for the usage of `useLocale` and `useDateFormatter` in the codebase. Expect: No missing functionalities.
rg 'useLocale|useDateFormatter' --glob '*.mdx'

Length of output: 901



Script:

#!/bin/bash
# Description: Verify the usage of `useLocale` and `useDateFormatter` in the codebase to ensure they function as expected.

# Test: Search for the usage of `useLocale` and `useDateFormatter` in the codebase.
rg 'useLocale|useDateFormatter' --glob '*.{js,jsx,ts,tsx}'

Length of output: 11372

@jrgarciadev jrgarciadev merged commit 0bfa585 into main May 29, 2024
3 checks passed
@jrgarciadev jrgarciadev deleted the fix/incorrect-import-path branch May 29, 2024 19:27
@wingkwong wingkwong mentioned this pull request May 30, 2024
@coderabbitai coderabbitai bot mentioned this pull request Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants