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

Skip to content

Conversation

@ianmaccallum
Copy link
Contributor

@ianmaccallum ianmaccallum commented Oct 2, 2025

  • Adds draftSavedAt to draft and removed enabled condition from drafts
  • If there is a draft and it is newer than the application form / lander data, use that instead of the value and enable publishing
  • Adds required badge to name, email, and country
Screen.Recording.2025-10-02.at.10.37.11.AM.mov

Summary by CodeRabbit

  • New Features

    • Drafts now persist per-group with timestamps, auto-save when changes exist, hydrate forms reliably, and clear after successful publish.
    • Added a reusable required-field badge used across application forms for clearer labels.
  • Bug Fixes / Improvements

    • Publish button logic simplified and more accurate (disables only when generating or when there are no changes).
    • SVG gradient attributes corrected for consistent rendering across browsers.

@vercel
Copy link
Contributor

vercel bot commented Oct 2, 2025

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

Project Deployment Preview Updated (UTC)
dub Ready Ready Preview Oct 2, 2025 5:15pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2025

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 clearly states that drafts will persist through page navigation, which is the main enhancement introduced by the pull request. It highlights the core functionality of draft persistence without extraneous details. The phrasing is concise, specific, and easy to understand at a glance.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch persist-drafts

📜 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 913ff8c and a380b82.

📒 Files selected for processing (2)
  • apps/web/ui/partners/groups/design/application-form/fields/form-control.tsx (2 hunks)
  • apps/web/ui/partners/groups/design/application-form/program-application-form.tsx (4 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/ui/partners/groups/design/application-form/program-application-form.tsx (1)
apps/web/ui/partners/groups/design/application-form/fields/form-control.tsx (1)
  • FormControlRequiredBadge (11-17)
⏰ 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 (6)
apps/web/ui/partners/groups/design/application-form/fields/form-control.tsx (2)

11-17: LGTM! Good extraction of reusable component.

The FormControlRequiredBadge component is well-extracted for reusability. The implementation is clean and follows React best practices.


32-32: LGTM! Consistent use of extracted badge component.

The refactoring to use FormControlRequiredBadge improves maintainability and ensures consistent styling across required field indicators.

apps/web/ui/partners/groups/design/application-form/program-application-form.tsx (4)

32-32: LGTM! Import correctly added.

The import of FormControlRequiredBadge is properly placed and follows the existing import structure.


199-204: LGTM! Required indicator properly added.

The Name field now displays a required badge that matches the existing validation rule at line 217. The flex layout provides proper spacing between the label text and badge.


223-228: LGTM! Consistent required indicator.

The Email field follows the same pattern as the Name field, properly displaying the required badge that aligns with the validation rule at line 240.


246-251: LGTM! Required indicator consistently applied.

The Country field maintains consistency with the Name and Email fields, displaying the required badge that corresponds to the validation rule at line 256.


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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 5796653 and b81473e.

📒 Files selected for processing (1)
  • apps/web/ui/partners/groups/design/branding-form.tsx (13 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/ui/partners/groups/design/branding-form.tsx (1)
apps/web/lib/types.ts (3)
  • GroupWithProgramProps (559-559)
  • ProgramApplicationFormData (458-458)
  • ProgramLanderData (452-452)
⏰ 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

@steven-tey steven-tey merged commit 6b28dec into main Oct 2, 2025
8 checks passed
@steven-tey steven-tey deleted the persist-drafts branch October 2, 2025 18:45
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