Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@TWilson023
Copy link
Collaborator

@TWilson023 TWilson023 commented Sep 22, 2025

  • Add application details to enrolled partner page
  • Add status badge to partner info cards
Screenshot 2025-09-22 at 4 28 48 PM Screenshot 2025-09-22 at 4 25 58 PM

Summary by CodeRabbit

  • New Features

    • Partner About pages show an Application section with proposal and comments when available, including loading states and “No response provided” fallbacks.
    • Partner info cards can hide specific status badges (e.g., Approved or Pending) for cleaner views in different contexts.
  • Style

    • Partner info card header layout updated to include a status badge beside avatar and country info.
    • Online presence empty-state uses smaller, clearer text styling.

@vercel
Copy link
Contributor

vercel bot commented Sep 22, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
dub Ready Ready Preview Sep 22, 2025 8:39pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 22, 2025

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The title "Partner UI tweaks" is short and broadly related to the changeset (multiple partner-related UI adjustments such as adding application details and a status badge), but it is generic and does not call out the primary changes or intent, so it may not clearly communicate the main purpose to reviewers or future readers. Please make the title more specific to the main changes; for example, "Add partner application details and status badge" or "Show partner application details; add status badge to PartnerInfoCards" so the primary changes are immediately clear when scanning PR history.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch partner-tweaks

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f0f944 and d23369e.

📒 Files selected for processing (1)
  • apps/web/ui/partners/partner-info-cards.tsx (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/ui/partners/partner-info-cards.tsx
⏰ 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

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between f1f11a2 and 4f0f944.

📒 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.

@steven-tey steven-tey merged commit 18d42d6 into main Sep 22, 2025
8 checks passed
@steven-tey steven-tey deleted the partner-tweaks branch September 22, 2025 20:56
@coderabbitai coderabbitai bot mentioned this pull request Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants