-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Partner UI tweaks #2873
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
Partner UI tweaks #2873
Conversation
…partner info cards
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ 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)
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: 0
🧹 Nitpick comments (5)
apps/web/ui/partners/partner-info-cards.tsx (3)
38-46: Strongly type hideStatuses to partner status union.Avoids typos and improves DX.
export function PartnerInfoCards({ partner, - hideStatuses = [], + hideStatuses = [], selectedGroupId, setSelectedGroupId, }: { partner?: EnrolledPartnerProps; - /** Partner statuses to hide badges for */ - hideStatuses?: string[]; + /** Partner statuses to hide badges for */ + hideStatuses?: Array<EnrolledPartnerProps["status"]>;
122-126: Encode fallback avatar name to avoid broken URLs.Names with spaces/special chars can yield invalid URLs.
- src={partner.image || `${OG_AVATAR_URL}${partner.name}`} + src={partner.image || `${OG_AVATAR_URL}${encodeURIComponent(partner.name)}`}
143-147: Prefer omitting optional props over passing null.If StatusBadge.icon is optional, drop icon={null} to avoid null checks downstream.
- <StatusBadge icon={null} variant={badge.variant}> + <StatusBadge variant={badge.variant}> {badge.label} </StatusBadge>Can you confirm icon is optional in @dub/ui’s StatusBadge?
apps/web/ui/partners/partner-application-details.tsx (2)
25-27: Prevent “undefined” in the heading before program loads.Use a friendly fallback while program is loading.
- title: `How do you plan to promote ${program?.name}?`, + title: `How do you plan to promote ${program?.name ?? "the program"}?`,
40-56: Don’t wrap placeholder text in Linkify.Render the “No response provided” copy plainly; only linkify real responses.
- {field.value || field.value === "" ? ( - <Linkify - as="p" - options={{ - target: "_blank", - rel: "noopener noreferrer nofollow", - className: - "underline underline-offset-4 text-neutral-400 hover:text-neutral-700", - }} - > - {field.value || ( - <span className="text-content-muted italic"> - No response provided - </span> - )} - </Linkify> - ) : ( + {field.value !== undefined ? ( + field.value !== "" ? ( + <Linkify + as="p" + options={{ + target: "_blank", + rel: "noopener noreferrer nofollow", + className: + "underline underline-offset-4 text-neutral-400 hover:text-neutral-700", + }} + > + {field.value} + </Linkify> + ) : ( + <p className="text-content-muted italic">No response provided</p> + ) + ) : ( <div className="h-4 w-28 min-w-0 animate-pulse rounded-md bg-neutral-200" /> )}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/about/page-client.tsx(1 hunks)apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/layout.tsx(1 hunks)apps/web/ui/partners/online-presence-summary.tsx(2 hunks)apps/web/ui/partners/partner-about.tsx(1 hunks)apps/web/ui/partners/partner-application-details.tsx(1 hunks)apps/web/ui/partners/partner-application-sheet.tsx(3 hunks)apps/web/ui/partners/partner-info-cards.tsx(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-25T21:03:24.285Z
Learnt from: TWilson023
PR: dubinc/dub#2736
File: apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/bounties/bounty-card.tsx:1-1
Timestamp: 2025-08-25T21:03:24.285Z
Learning: In Next.js App Router, Server Components that use hooks can work without "use client" directive if they are only imported by Client Components, as they get "promoted" to run on the client side within the Client Component boundary.
Applied to files:
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/about/page-client.tsx
🧬 Code graph analysis (5)
apps/web/ui/partners/online-presence-summary.tsx (1)
apps/web/lib/types.ts (1)
EnrolledPartnerProps(437-437)
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/layout.tsx (1)
apps/web/ui/partners/partner-info-cards.tsx (1)
PartnerInfoCards(36-292)
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/about/page-client.tsx (3)
apps/web/lib/swr/use-partner.ts (1)
usePartner(6-29)apps/web/ui/partners/partner-about.tsx (1)
PartnerAbout(6-54)apps/web/ui/partners/partner-application-details.tsx (1)
PartnerApplicationDetails(8-64)
apps/web/ui/partners/partner-info-cards.tsx (2)
apps/web/lib/types.ts (1)
EnrolledPartnerProps(437-437)packages/utils/src/constants/misc.ts (1)
OG_AVATAR_URL(29-29)
apps/web/ui/partners/partner-application-sheet.tsx (1)
apps/web/ui/partners/partner-application-details.tsx (1)
PartnerApplicationDetails(8-64)
⏰ 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)
- GitHub Check: build
🔇 Additional comments (7)
apps/web/ui/partners/online-presence-summary.tsx (2)
93-99: Prop extension is clean and backward‑compatible.Adding emptyClassName is typed, optional, and non‑breaking.
136-141: Empty state styling merge looks good.cn(...) order preserves defaults while allowing overrides via className/emptyClassName.
apps/web/ui/partners/partner-about.tsx (1)
36-36: LGTM on empty-state sizing hook.Passing emptyClassName="text-xs" cleanly scopes the empty state without affecting non‑empty renders.
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/about/page-client.tsx (1)
12-25: Application section integration looks correct.Conditional render guards on applicationId; layout and heading hierarchy read well next to PartnerAbout.
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/partners/[partnerId]/layout.tsx (1)
74-74: Hiding the “approved” status badge here makes sense.Keeps the header minimal in the main layout while still showing status elsewhere.
apps/web/ui/partners/partner-application-sheet.tsx (2)
101-104: Good use of hideStatuses to reduce redundancy in the sheet.Consider aligning prop typing with the suggested union type in PartnerInfoCards.
153-159: Reuse of PartnerApplicationDetails is a solid consolidation.Removes duplicate fetch/UI logic and standardizes the Application section.
Summary by CodeRabbit
New Features
Style