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

Skip to content

Conversation

@marcusljf
Copy link
Collaborator

@marcusljf marcusljf commented Dec 11, 2025

Introduces a conditional 'Marketplace' link in the partner program dropdown, visible only to partners who meet the marketplace view requirements. Imports the necessary utility and icon for this feature.

CleanShot 2025-12-10 at 16 07 13@2x

Summary by CodeRabbit

New Features

  • Marketplace in Partner Sidebar - Partners can now access the Marketplace directly from the partner program sidebar dropdown menu. The Marketplace link is intelligently displayed based on your program eligibility and enrollment status, making it easier to access marketplace features without navigating through multiple sections. The link includes a helpful icon for quick identification.

✏️ Tip: You can customize this high-level summary in your review settings.

Introduces a conditional 'Marketplace' link in the partner program dropdown, visible only to partners who meet the marketplace view requirements. Imports the necessary utility and icon for this feature.
@vercel
Copy link
Contributor

vercel bot commented Dec 11, 2025

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

Project Deployment Preview Updated (UTC)
dub Ready Ready Preview Dec 11, 2025 0:13am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

Walkthrough

The pull request adds a Marketplace link to the partner program dropdown sidebar. It imports a permission check function and Shop icon, conditionally computes visibility based on partner enrollment status, and renders the Marketplace navigation link when authorized.

Changes

Cohort / File(s) Change Summary
Partner Program Dropdown Enhancement
apps/web/ui/layout/sidebar/partner-program-dropdown.tsx
Added imports for partnerCanViewMarketplace permission check and Shop icon; introduced conditional logic to compute canViewMarketplace based on partner and program enrollments; conditionally render Marketplace link with icon and label that closes the popover on interaction

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

  • Single file modification with straightforward conditional rendering
  • Simple permission check integration without complex logic
  • Standard icon and navigation link addition

Possibly related PRs

Suggested reviewers

  • steven-tey

Poem

🐰 A marketplace link hops into view,
Guarded by permissions shining bright and true,
The dropdown now shows what partners may see,
A Shop icon badges the way to be free! 🛍️

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
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.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add Marketplace link to partner program dropdown' clearly and specifically summarizes the main change: adding a new Marketplace link to the partner program dropdown UI component.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch all-programs-dropdown

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 (1)
apps/web/ui/layout/sidebar/partner-program-dropdown.tsx (1)

47-49: Optionally coerce canViewMarketplace to a strict boolean

The current expression works, but programEnrollments && partnerCanViewMarketplace(...) can infer a non-boolean union type. If you want canViewMarketplace to be guaranteed boolean, you could do:

-  const canViewMarketplace =
-    programEnrollments &&
-    partnerCanViewMarketplace({ partner, programEnrollments });
+  const canViewMarketplace =
+    !!programEnrollments &&
+    partnerCanViewMarketplace({ partner, programEnrollments });

Semantics remain the same while making the intent and type a bit clearer.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2918737 and c628d78.

📒 Files selected for processing (1)
  • apps/web/ui/layout/sidebar/partner-program-dropdown.tsx (4 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-08-25T21:03:24.285Z
Learnt from: TWilson023
Repo: dubinc/dub PR: 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/ui/layout/sidebar/partner-program-dropdown.tsx
📚 Learning: 2025-09-24T16:10:37.349Z
Learnt from: TWilson023
Repo: dubinc/dub PR: 2872
File: apps/web/ui/partners/partner-about.tsx:11-11
Timestamp: 2025-09-24T16:10:37.349Z
Learning: In the Dub codebase, the team prefers to import Icon as a runtime value from "dub/ui" and uses Icon as both a type and variable name in component props, even when this creates shadowing. This is their established pattern and should not be suggested for refactoring.

Applied to files:

  • apps/web/ui/layout/sidebar/partner-program-dropdown.tsx
📚 Learning: 2025-10-15T01:05:43.266Z
Learnt from: steven-tey
Repo: dubinc/dub PR: 2958
File: apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx:432-457
Timestamp: 2025-10-15T01:05:43.266Z
Learning: In apps/web/app/app.dub.co/(dashboard)/[slug]/settings/members/page-client.tsx, defer refactoring the custom MenuItem component (lines 432-457) to use the shared dub/ui MenuItem component to a future PR, as requested by steven-tey.

Applied to files:

  • apps/web/ui/layout/sidebar/partner-program-dropdown.tsx
🧬 Code graph analysis (1)
apps/web/ui/layout/sidebar/partner-program-dropdown.tsx (2)
apps/web/lib/network/get-discoverability-requirements.ts (1)
  • partnerCanViewMarketplace (34-51)
packages/ui/src/icons/nucleo/shop.tsx (1)
  • Shop (3-65)
⏰ 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 (2)
apps/web/ui/layout/sidebar/partner-program-dropdown.tsx (2)

3-14: Imports for marketplace permission and icon look correct

The new imports for partnerCanViewMarketplace and Shop are consistent with existing module structure and icon usage in this file; no issues here.


94-108: Marketplace link conditional rendering is consistent and well-integrated

The new Marketplace link correctly mirrors the “All programs” item styling, is properly gated by canViewMarketplace, and closes the popover on click. This fits cleanly into the existing dropdown UX.

@steven-tey steven-tey merged commit f2a42af into main Dec 11, 2025
8 of 9 checks passed
@steven-tey steven-tey deleted the all-programs-dropdown branch December 11, 2025 00:31
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