-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Enhance PartnerLinkCard with edit button and UI improvements #2608
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
Conversation
Added an 'Edit link' button that appears on hover, allowing users to edit partner links directly from the card. Improved the UI for short and destination links by grouping them, adding hover effects, and making copy buttons visible only on hover for a cleaner interface.
|
@marcusljf is attempting to deploy a commit to the Dub Team on Vercel. A member of the Team first needs to authorize it. |
|
Caution Review failedThe pull request is closed. WalkthroughThe Changes
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
CodeRabbit Configuration File (
|
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/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx (1)
139-153: Consider adding accessibility improvements.The edit button implementation is functionally correct with proper event handling and hover states. However, it could benefit from better accessibility.
Consider adding an
aria-labelfor better screen reader support:<button type="button" + aria-label="Edit partner link" className="absolute right-4 top-4 z-10 opacity-0 pointer-events-none translate-y-1 transition-all duration-200 group-hover:opacity-100 group-hover:pointer-events-auto group-hover:translate-y-0" onClick={e => { e.stopPropagation(); setShowPartnerLinkModal(true); }} >
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx (2)
Learnt from: devkiran
PR: dubinc/dub#2448
File: packages/email/src/templates/partner-program-summary.tsx:0-0
Timestamp: 2025-05-29T04:45:18.504Z
Learning: In the PartnerProgramSummary email template (packages/email/src/templates/partner-program-summary.tsx), the stat titles are hardcoded constants ("Clicks", "Leads", "Sales", "Earnings") that will always match the ICONS object keys after toLowerCase() conversion, so icon lookup failures are not possible.
Learnt from: TWilson023
PR: dubinc/dub#2445
File: apps/web/ui/partners/design/branding-form.tsx:315-318
Timestamp: 2025-05-27T20:33:24.040Z
Learning: In the Dub codebase, prefer code simplicity over handling minor edge case UX issues, particularly when the fix would add complexity like viewport change listeners for minor state management.
🧬 Code Graph Analysis (1)
apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx (1)
apps/web/ui/modals/partner-link-modal.tsx (1)
PartnerLinkModal(59-76)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (4)
apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-card.tsx (4)
18-19: LGTM! Clean import additions.The new imports for
ButtonandPenWritingare appropriately added to support the edit functionality.
134-134: LGTM! Proper group class addition.Adding the
groupclass to the card container correctly enables CSS group hover states for the nested edit button and other hover effects.
138-138: LGTM! Correct positioning context.Adding
relativepositioning to the main div provides the necessary positioning context for the absolutely positioned edit button.
169-206: Excellent UX enhancement with proper hover interactions.The restructuring of the link display sections with dedicated hover groups provides a clean, intuitive user experience. The implementation correctly:
- Groups related elements together
- Applies hover effects with smooth transitions
- Shows copy buttons only on hover for cleaner UI
- Preserves existing functionality like the comments badge
The CSS classes and transitions are well-implemented and follow good UX patterns.
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Added an 'Edit link' button that appears on hover, allowing users to edit partner links directly from the card. Improved the UI for short and destination links by grouping them, adding hover effects, and making copy buttons visible only on hover for a cleaner interface.
Summary by CodeRabbit