-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(docs): nextUI pro callout #4391
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Caution Review failedThe pull request is closed. WalkthroughThe pull request introduces modifications to the documentation components in the NextUI project. A new Changes
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
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 using PR comments)
Other keywords and placeholders
Documentation and Community
|
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
🧹 Nitpick comments (1)
apps/docs/components/docs/toc.tsx (1)
138-166
: Consider accessibility improvements for the promotional bannerWhile the implementation is functional, consider these accessibility enhancements:
- Add appropriate ARIA attributes for better screen reader support
- Ensure keyboard navigation works correctly with the animated button
- Consider adding
aria-label
to describe the promotional contentHere's a suggested improvement:
<div className="w-full border border-default/60 hover:shadow-inner hover:border-default/80 rounded-md p-2 cursor-pointer"> <a className="flex flex-col items-center" href="https://nextui.pro?utm_source=nextui.org&utm_medium=callout" rel="noopener noreferrer" + aria-label="Explore NextUI Pro components" onClick={handleClick} > {/* ... content ... */} <div className="flex group min-w-[120px] items-center font-semibold text-foreground shadow-sm gap-1.5 relative overflow-hidden rounded-full p-[1px]"> <span className="absolute inset-[-1000%] animate-[spin_3s_linear_infinite] bg-[conic-gradient(from_90deg_at_50%_50%,#F54180_0%,#338EF7_50%,#F54180_100%)]" /> - <div className="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-full bg-background group-hover:bg-background/70 transition-background px-3 py-1 text-sm font-medium text-foreground backdrop-blur-3xl"> + <div + className="inline-flex h-full w-full cursor-pointer items-center justify-center rounded-full bg-background group-hover:bg-background/70 transition-background px-3 py-1 text-sm font-medium text-foreground backdrop-blur-3xl" + role="button" + tabIndex={0} + > Explore Components </div> </div> </a> </div>
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
apps/docs/components/docs/toc.tsx
(3 hunks)apps/docs/components/primitives.ts
(1 hunks)
🔇 Additional comments (3)
apps/docs/components/primitives.ts (1)
20-20
: LGTM: New size variant follows existing patterns
The new xs
size variant is well-implemented, following the established responsive design pattern and maintaining consistency with existing size variants.
apps/docs/components/docs/toc.tsx (2)
8-8
: LGTM: Analytics implementation follows best practices
The PostHog integration is well-implemented with appropriate event naming and categorization. The click tracking is focused on the specific user interaction without collecting sensitive data.
Also applies to: 70-77
145-155
: LGTM: Responsive design implementation is well-structured
The mobile-first approach with flex direction changes at breakpoints is well-implemented. The usage of the new xs
title variant maintains consistency across different screen sizes.
1c6b99d
to
a0b23a9
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: 4
🧹 Nitpick comments (2)
apps/docs/components/docs/nextui-pro-callout.tsx (2)
5-7
: Consider adding TypeScript typesThe component structure looks good, but adding TypeScript types would improve maintainability and type safety.
-export const NextUIProCallout = () => { +export const NextUIProCallout: React.FC = () => {
8-13
: Add error handling for analytics trackingWhile the click handler is well-structured, it should handle potential PostHog failures gracefully.
const handleClick = () => { - posthog.capture("NextUI Pro Banner", { - action: "click", - category: "nextui-callout", - }); + try { + posthog.capture("NextUI Pro Banner", { + action: "click", + category: "nextui-callout", + }); + } catch (error) { + console.error("Failed to track click event:", error); + } };
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
apps/docs/app/docs/[[...slug]]/page.tsx
(2 hunks)apps/docs/components/docs/nextui-pro-callout.tsx
(1 hunks)apps/docs/components/docs/toc.tsx
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- apps/docs/app/docs/[[...slug]]/page.tsx
- apps/docs/components/docs/toc.tsx
🔇 Additional comments (1)
apps/docs/components/docs/nextui-pro-callout.tsx (1)
1-3
: LGTM! Clean and focused imports
The "use client" directive is correctly placed, and imports are properly organized.
a0b23a9
to
1eef6a3
Compare
Closes ENG-1735
📝 Description
PR adds a callout for NextUI pro.
🚀 New behavior
💣 Is this a breaking change (Yes/No): No
Summary by CodeRabbit
New Features
Bug Fixes