Update partner reward UI with descriptions and helper blocks#3420
Update partner reward UI with descriptions and helper blocks#3420
Conversation
…tates, and helper blocks Changes: (1) Onboarding reward form - updated descriptions, "Most common" tags, payout model radio cards, dynamic labels; (2) New program reward form - similar updates with custom commission descriptions and page title change; (3) Group reward empty states - structured title + description instead of generic text; (4) Reward creation helper - per-event-type dismissible info blocks with independent localStorage persistence. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe changes enhance reward configuration across multiple forms and components by introducing semantic constants for descriptions, adding "Most common" indicators for frequently-used options, refactoring UI layouts to wrapped per-item structures with metadata support, and introducing a dismissible helper block during reward creation. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/rewards/form.tsx (1)
284-291:⚠️ Potential issue | 🟡 MinorAvoid using
selectedattribute on<option>in React.React recommends using
defaultValueorvalueon the<select>element instead ofselectedon individual<option>elements. Since this select is controlled by react-hook-form viaregister, theselectedattribute is unnecessary and may cause a React warning.🔧 Proposed fix
<option key={duration} value={duration} - selected={duration === 12} > {duration} {duration === 1 ? "month" : "months"} </option>The form's
defaultValuesor theuseEffectthat setscommissionStructureshould handle the initial selection.
🧹 Nitpick comments (1)
apps/web/app/(ee)/app.dub.co/(new-program)/[slug]/program/new/rewards/form.tsx (1)
136-189: Consider extracting shared radio card component.The radio card UI pattern (with label, description,
CircleCheckFill, and "Most common" indicator) is duplicated across this file and the onboarding form (apps/web/app/app.dub.co/(onboarding)/onboarding/(steps)/program/reward/form.tsx).If these forms evolve together, extracting a reusable
RadioCardcomponent could reduce duplication and ensure visual consistency. However, this can be deferred if the forms are expected to diverge.
Summary
Updated partner program reward UI across 4 flows to improve user education and guidance:
Changes
All changes are type-safe and follow existing patterns in the codebase.
Summary by CodeRabbit
Release Notes
New Features
Style