-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Partner link card updates #2916
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
WalkthroughAdds shared UI state for open link action menus via context, refactors partner link card to use a new Controls component, introduces keyboard shortcuts and a Duplicate Link flow with a new modal, and updates the Partner Link modal to explicitly handle create vs edit modes. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Page as ProgramLinksPageClient
participant Ctx as PartnerLinksContext
participant Card as PartnerLinkCard
participant Ctrl as PartnerLinkControls
participant M_Edit as PartnerLinkModal
participant M_QR as LinkQRModal
participant M_Dup as DuplicateLinkModal
participant API as /api/partner-links
User->>Card: hover/click card
Card->>Ctx: read/write openMenuLinkId
Card->>Ctrl: render with openPopover/setOpenPopover, shortcutsEnabled
alt user opens actions
User->>Ctrl: click actions button
Ctrl-->>User: show popover with actions (Edit, QR, Duplicate)
end
par keyboard shortcuts (if enabled)
User->>Ctrl: press E
Ctrl->>M_Edit: open Edit modal
User->>Ctrl: press Q
Ctrl->>M_QR: open QR modal
User->>Ctrl: press D
Ctrl->>M_Dup: open Duplicate modal
end
rect rgba(235,245,255,0.6)
User->>M_Edit: save changes
M_Edit->>API: PATCH /partner-links/{id}
API-->>M_Edit: 200
M_Dup->>API: POST /partner-links
API-->>M_Dup: 201
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code graph analysis (2)apps/web/ui/modals/partner-link-modal.tsx (1)
apps/web/app/(ee)/partners.dub.co/(dashboard)/programs/[programSlug]/(enrolled)/links/partner-link-controls.tsx (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (12)
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Summary by CodeRabbit
New Features
UX Improvements