Skip to content

Conversation

@marcusljf
Copy link
Collaborator

@marcusljf marcusljf commented Dec 1, 2025

Introduces a new email template for announcing the Dub Program Marketplace. The template includes branding, program details, a call-to-action button, and a footer for notification settings.

Like the previous email, added the asset file to payload for initial use before moving to AWS.

Tested on:

  • Gmail
  • Apple Mail
CleanShot.2025-12-01.at.15.19.48.mp4
CleanShot 2025-12-01 at 15 21 22@2x

Summary by CodeRabbit

  • New Features
    • Added a new email template for partner marketplace announcements featuring customizable content sections, a prominent call-to-action button, and responsive design for mobile devices.

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

Introduces a new email template for announcing the Dub Program Marketplace. The template includes branding, program details, a call-to-action button, and a footer for notification settings.
@vercel
Copy link
Contributor

vercel bot commented Dec 1, 2025

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

Project Deployment Preview Updated (UTC)
dub Error Error Dec 1, 2025 11:22pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Walkthrough

A new React-Email template component is added for a partner marketplace announcement email. The template includes header branding, marketing content sections, and a call-to-action button linking to the marketplace, with the email recipient configurable via props.

Changes

Cohort / File(s) Summary
New email template
packages/email/src/templates/partner-marketplace-announcement.tsx
Added PartnerMarketplaceAnnouncement component—a React-Email TSX template rendering a marketing email layout with logo, headings, visual section, body text, CTA button, and Footer. Accepts email prop (default: [email protected]). Includes Tailwind styling and mobile-responsive adjustments.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify template follows existing email component patterns and conventions
  • Review Tailwind classes for responsive design consistency
  • Confirm Footer integration and prop passing

Suggested reviewers

  • steven-tey

Poem

🐰 A marketplace announcement hops on through,
With logos and buttons, so shiny and new,
The rabbit approves of this template so fine,
Where CTAs and footers in harmony align! ✨

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 PR title 'Add program marketplace announcement template' accurately summarizes the main change: adding a new email template component for announcing the Dub Program Marketplace.
✨ 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 marketplace-announcement

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: 2

🧹 Nitpick comments (2)
packages/email/src/templates/partner-marketplace-announcement.tsx (2)

70-70: Consider extracting the marketplace URL to a constant.

The marketplace URL "https://partners.dub.co/programs" is repeated on lines 70 and 103. Extracting it to a constant would improve maintainability if the URL changes.

Example:

const MARKETPLACE_URL = "https://partners.dub.co/programs";

Also applies to: 103-103


124-124: Consider extracting the notification settings URL to a constant.

Similar to the marketplace URL, the notification settings URL is hardcoded. Extracting it to a constant would improve maintainability.

Example:

const NOTIFICATION_SETTINGS_URL = "https://partners.dub.co/settings/notifications";
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 37b5095 and 90a389a.

📒 Files selected for processing (1)
  • packages/email/src/templates/partner-marketplace-announcement.tsx (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/email/src/templates/partner-marketplace-announcement.tsx (2)
packages/email/src/react-email.d.ts (11)
  • Html (4-4)
  • Head (5-5)
  • Preview (18-18)
  • Tailwind (19-19)
  • Body (6-6)
  • Container (7-7)
  • Section (8-8)
  • Img (13-13)
  • Heading (16-16)
  • Text (15-15)
  • Link (14-14)
packages/ui/src/footer.tsx (1)
  • Footer (106-344)
⏰ 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)
packages/email/src/templates/partner-marketplace-announcement.tsx (2)

74-74: Asset URL is accessible and correctly configured.

The GIF asset at https://assets.dub.co/cms/marketplace-announcement-logo-full-optimize.gif returns HTTP 200 with the correct content-type: image/gif header. No action required.


15-15: Footer component exists and is properly configured.

The Footer component at ../components/footer exists and correctly exports a function that accepts the email (required string) and notificationSettingsUrl (optional string) props being passed on lines 122-124. No compatibility issues found.

Comment on lines +17 to +21
export default function PartnerMarketplaceAnnouncement({
email = "[email protected]",
}: {
email: string;
}) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Make the email prop optional in the type definition.

The email prop has a default value but is typed as required. This creates a type inconsistency where the implementation allows calling the component without the prop, but the type definition suggests it's required.

Apply this diff to align the type with the implementation:

 export default function PartnerMarketplaceAnnouncement({
   email = "[email protected]",
 }: {
-  email: string;
+  email?: string;
 }) {
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export default function PartnerMarketplaceAnnouncement({
email = "[email protected]",
}: {
email: string;
}) {
export default function PartnerMarketplaceAnnouncement({
email = "[email protected]",
}: {
email?: string;
}) {
🤖 Prompt for AI Agents
In packages/email/src/templates/partner-marketplace-announcement.tsx around
lines 17 to 21, the component provides a default value for the email prop but
the TS type marks it as required; update the props type so email is optional
(e.g., change email: string to email?: string) so the signature matches the
implementation and callers can omit the prop while the default remains in place.

Comment on lines +102 to +117
<Link
href="https://partners.dub.co/programs"
className="box-border inline-block rounded-lg bg-neutral-900 px-6 py-3 text-center text-sm font-medium text-white no-underline"
style={{
backgroundColor: "#171717",
color: "#ffffff",
borderRadius: "8px",
padding: "12px 24px",
textDecoration: "none",
display: "inline-block",
fontWeight: "500",
fontSize: "14px",
}}
>
Explore the program marketplace
</Link>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Remove duplicate styles from the CTA button.

The Link component has both className with Tailwind classes and inline style attributes that duplicate the same properties (backgroundColor, color, borderRadius, padding, textDecoration, display, fontWeight, fontSize). In email templates, inline styles are preferred for better email client compatibility, making the Tailwind classes redundant.

Apply this diff to keep only the inline styles:

             <Link
               href="https://partners.dub.co/programs"
-              className="box-border inline-block rounded-lg bg-neutral-900 px-6 py-3 text-center text-sm font-medium text-white no-underline"
               style={{
                 backgroundColor: "#171717",
                 color: "#ffffff",
                 borderRadius: "8px",
                 padding: "12px 24px",
                 textDecoration: "none",
                 display: "inline-block",
                 fontWeight: "500",
                 fontSize: "14px",
               }}
             >
               Explore the program marketplace
             </Link>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link
href="https://partners.dub.co/programs"
className="box-border inline-block rounded-lg bg-neutral-900 px-6 py-3 text-center text-sm font-medium text-white no-underline"
style={{
backgroundColor: "#171717",
color: "#ffffff",
borderRadius: "8px",
padding: "12px 24px",
textDecoration: "none",
display: "inline-block",
fontWeight: "500",
fontSize: "14px",
}}
>
Explore the program marketplace
</Link>
<Link
href="https://partners.dub.co/programs"
style={{
backgroundColor: "#171717",
color: "#ffffff",
borderRadius: "8px",
padding: "12px 24px",
textDecoration: "none",
display: "inline-block",
fontWeight: "500",
fontSize: "14px",
}}
>
Explore the program marketplace
</Link>
🤖 Prompt for AI Agents
In packages/email/src/templates/partner-marketplace-announcement.tsx around
lines 102 to 117, the CTA Link mixes Tailwind className and inline style
attributes duplicating visual properties; remove the redundant Tailwind classes
from the className (or clear className entirely) and keep the explicit inline
style object only, ensuring the button appearance is defined by the inline
styles for better email client compatibility.

@steven-tey steven-tey changed the title Add partner marketplace announcement template Add program marketplace announcement template Dec 2, 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.

2 participants