-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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): added ts example for infinite pagination #2534
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughThe summary of changes indicates enhancements and fixes across various components in a documentation application. Notably, it includes the introduction of a default value for the Changes
Assessment against linked issues
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 (
|
@kuri-sun is attempting to deploy a commit to the NextUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
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.
Review Status
Actionable comments generated: 1
Configuration used: .coderabbit.yaml
Files selected for processing (8)
- apps/docs/components/docs/components/code-demo/code-demo.tsx (2 hunks)
- apps/docs/content/components/table/infinite-pagination.ts (1 hunks)
- apps/docs/content/docs/components/autocomplete.mdx (3 hunks)
- apps/docs/content/docs/components/avatar.mdx (2 hunks)
- apps/docs/content/docs/components/button.mdx (1 hunks)
- apps/docs/content/docs/components/image.mdx (1 hunks)
- apps/docs/content/docs/components/link.mdx (1 hunks)
- apps/docs/content/docs/components/table.mdx (1 hunks)
Additional comments: 13
apps/docs/components/docs/components/code-demo/code-demo.tsx (2)
- 62-62: The change to default
showOpenInCodeSandbox
totrue
aligns with the PR objectives and enhances the component's flexibility by allowing explicit control over the visibility of the "Open In Sandbox" button.- 145-145: Correct implementation of the
showOpenInCodeSandbox
prop within theDynamicSandpack
component, ensuring consistent management of the "Open In Sandbox" button's visibility across examples.apps/docs/content/components/table/infinite-pagination.ts (1)
- 70-151: The addition of the TypeScript example for infinite pagination with the
Table
component significantly enhances the documentation by providing a type-safe implementation. This aligns with the PR objectives and benefits TypeScript users.apps/docs/content/docs/components/image.mdx (1)
- 68-68: Setting
showOpenInCodeSandbox={false}
for theCodeDemo
component in this example aligns with the PR objectives to streamline the user experience by differentiating betweenshowOpenInCodeSandbox
andshowPreview
flags.apps/docs/content/docs/components/avatar.mdx (2)
- 79-79: The addition of
showOpenInCodeSandbox={false}
for the custom implementation example aligns with the PR's objective to adjust Code Sandbox visibility. This change ensures users can view the example without the "Open In Sandbox" button, simplifying the UI.- 124-124: Similarly, setting
showOpenInCodeSandbox={false}
for the Avatar Group's custom implementation example is consistent with the PR's goal to enhance the UI experience by hiding the "Open In Sandbox" button where it's deemed unnecessary.apps/docs/content/docs/components/link.mdx (1)
- 92-92: The addition of
showOpenInCodeSandbox={false}
to theCodeDemo
component for the "Custom implementation" section is a clear and effective way to align with the PR's objective of adjusting Code Sandbox visibility. This change ensures that users can focus on the example content without the distraction of an "Open In Sandbox" button, which is not necessary for this context.apps/docs/content/docs/components/button.mdx (1)
- 91-91: The addition of
showOpenInCodeSandbox={false}
to theCodeDemo
component for the "Custom Implementation" section effectively hides the "Open In Sandbox" button. This change aligns with the PR's objective to differentiate betweenshowOpenInCodeSandbox
andshowPreview
flags across various examples. It's a thoughtful update that simplifies the user interface by focusing on the most relevant actions for the user.apps/docs/content/docs/components/table.mdx (2)
- 277-283: The addition of
useInfiniteScroll
anduseAsyncList
imports is a positive change, ensuring that the Infinite Pagination example is up-to-date with the necessary hooks for implementation. This aligns well with the PR's objective to enhance the documentation and examples provided by NextUI, specifically targeting the Table component's Infinite Pagination feature.- 300-301: Adjusting the
showPreview
andshowOpenInCodeSandbox
flags for the Infinite Paginated Table example is a thoughtful change. It improves the user experience by making the example previews visible without the distraction of the "Open In Sandbox" button. This change aligns with the PR's objective to differentiate between these flags across various component examples.apps/docs/content/docs/components/autocomplete.mdx (3)
- 208-208: Setting
showOpenInCodeSandbox={false}
for the "Fully Controlled" example aligns with the PR's objective to differentiate betweenshowOpenInCodeSandbox
andshowPreview
flags, enhancing the user experience by streamlining the visibility of the "Open In Sandbox" button.- 258-258: Setting
showOpenInCodeSandbox={false}
for the "Asynchronous Filtering" example is consistent with the PR's goal to improve the documentation's usability by adjusting the visibility of the "Open In Sandbox" button.- 285-285: Applying
showOpenInCodeSandbox={false}
to the "Asynchronous Loading" example supports the PR's intention to refine the user interface by selectively displaying the "Open In Sandbox" button, making the documentation more focused and user-friendly.
|
||
In case you need to customize the link even further, you can use the `useLink` hook to create your own implementation. | ||
|
||
<CodeDemo showPreview={false} title="Custom implementation" files={linkContent.customImpl} /> | ||
<CodeDemo showPreview={false} showOpenInCodeSandbox={false} title="Custom implementation" files={linkContent.customImpl} /> | ||
|
||
<Spacer y={4} />{" "} | ||
|
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.
📝 NOTE
This review was outside the diff hunks, and no overlapping diff hunk was found. Original lines [71-71]
Consider changing "client side routers" to "client-side routers" to adhere to grammatical conventions for compound adjectives.
- client side routers
+ client-side routers
Closes #2517
📝 Description
Screen.Recording.2024-03-16.at.10.44.22.PM.mov
showOpenInCodeSandbox
tofalse
for them.⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
No.
📝 Additional Information
Summary by CodeRabbit
Table
component, enhancing data display with dynamic loading as the user scrolls.CodeDemo
component now defaults to showing the "Open in CodeSandbox" option, improving accessibility for live code experimentation.Button
,Link
,Avatar
, andImage
components to include or exclude the "Open in CodeSandbox" option in code demos, reflecting customization capabilities.Table
component documentation with details on implementing infinite pagination using new imports and functionalities.