-
-
Notifications
You must be signed in to change notification settings - Fork 505
fix: update shadcn input and tooltip to latest versions #236
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
base: main
Are you sure you want to change the base?
fix: update shadcn input and tooltip to latest versions #236
Conversation
|
@kumarayushkumar is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe Input and Tooltip components were refactored from forwardRef-based wrappers to plain function components. Input removes ref forwarding and adds data-slot attribute with expanded classNames. Tooltip replaces static aliases with explicit functions, adding TooltipProvider composition, data-slot attributes, and adjusting default sideOffset from 4 to 0. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
components/ui/input.tsx(1 hunks)components/ui/tooltip.tsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (2)
components/ui/tooltip.tsx (1)
lib/utils.ts (1)
cn(6-8)
components/ui/input.tsx (1)
lib/utils.ts (1)
cn(6-8)
🔇 Additional comments (6)
components/ui/input.tsx (2)
1-3: LGTM!Imports are correct and appropriate for the component.
5-19: LGTM! Changes align with PR objectives.The Input component correctly implements the latest shadcn/ui patterns:
- Removal of
forwardRefis appropriate for React 19, whererefis now a regular prop.- Dark mode variants are present (
dark:bg-input/30,dark:aria-invalid:ring-destructive/40).- The
data-slot="input"attribute aligns with modern shadcn/ui component architecture.components/ui/tooltip.tsx (4)
1-6: LGTM!The "use client" directive and imports are correct for a Radix UI-based tooltip component.
8-19: LGTM!TooltipProvider correctly wraps the Radix primitive. The
delayDuration={0}default provides immediate tooltip display, which aligns with modern UI expectations.
31-35: LGTM!TooltipTrigger is correctly implemented with the
data-slotattribute.
37-59: LGTM! Changes align with PR objectives.TooltipContent correctly implements the latest patterns:
sideOffset={0}default (changed from previous value) for tighter positioning- Includes
TooltipPrimitive.Arrowfor the tooltip pointer- Animation classes and color tokens provide proper styling
- The implementation supports dark mode through semantic color tokens (
bg-foreground,text-background)
|
@jnsahaj please let me what need to be fixed in this PR |
|
Hi! thanks for the change. can you share a screenshot of the preview? |
What
Updates
inputandtooltipcomponents to the latest shadcn/ui versions that includedark:variant styles for improved dark mode support.Changes
inputcomponent with latest dark mode variants (dark:bg-input/30, etc.)tooltipcomponent to latest versionFixes #231
Summary by CodeRabbit
Refactor
Style