fix(docs): incorrect import path in date range picker doc#3117
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThe recent changes primarily involve reordering and updating import statements in 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.
Actionable comments posted: 0
Review Details
Configuration used: .coderabbit.yaml
Review profile: CHILL
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 thoseendContent...
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'svisibleMonthis 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/dateto@react-aria/i18nforuseLocaleanduseDateFormatteris 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
useLocaleanduseDateFormatterfunctions are being imported from@react-aria/i18nin multiple.mdxfiles, includingdate-range-picker.mdx,date-picker.mdx, anddate-input.mdx. This suggests that the transition from@internationalized/dateto@react-aria/i18nhas 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
useLocaleanduseDateFormatterfrom@react-aria/i18nacross various files in the codebase. This indicates that the transition from@internationalized/dateto@react-aria/i18nhas 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.mdxapps/docs/content/docs/components/date-picker.mdxapps/docs/content/docs/components/date-input.mdx- Various other files in the
packages/componentsandapps/docs/content/componentsdirectories.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
Closes #
📝 Description
as titled
⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
📝 Additional Information
Summary by CodeRabbit
useLocaleanduseDateFormatterin the Date Range Picker documentation.I18nProviderfrom the Date Range Picker documentation.