Skip to content

Collect DAF details in the modal and hand off to every.org's DAF flows - #475

Merged
jiwon85 merged 4 commits into
mainfrom
claude/daf-donate-button-modal-74a0fa
Oct 9, 2026
Merged

jiwon85 merged 4 commits into
mainfrom
claude/daf-donate-button-modal-74a0fa

Conversation

@jiwon85

@jiwon85 jiwon85 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

The donate button's DAF screen skipped every.org's contact info step. Donors went straight to instructions without giving their name and email.

Not caused by #471. The widget's manual DAF screen was static instructions from 2023. every.org's manual flow later added donation details and contact info steps, and the widget never linked to them. The Chariot submit also went to the generic #/donate page instead of the Chariot confirm page.

Changes

  • Chariot: "Continue with Chariot" now goes to #/donate/daf/chariot/confirm, which asks for name and email.
  • Manual: "Get instructions for a manual DAF donation" opens a step in the modal (amount, custom fields, note, testimony), then goes to #/donate/daf/manual/confirm. This replaces the hardcoded instructions screen. Required custom fields now apply to manual DAF too.
  • One-time only: DAF stays one-time on both paths. The frequency text now says "DAF only supports one-time donations" instead of naming Chariot.
  • $50 minimum: DAF amounts must be at least $50 instead of $10. A higher minimum set by the nonprofit still wins.

For reviewers

  • useSubmitDonation now takes an optional every.org route from the caller instead of hardcoding DAF. constructDonateUrl appends it after #/donate, and other payment methods still use #/donate.
  • I opened both every.org confirm URLs in a browser, and both ask for name and email. Typecheck and eslint pass.
  • Needs a click-through in a preview build: both DAF buttons, the $50 check, and the redirect URLs.
  • Local dev: if yarn workspace @everydotorg/donate-button-v4 dev fails with Can't resolve 'src/autoPlayMode', run yarn install to apply the preact-cli patch from Upgrade to Node 24 (minimal) #470.

🤖 Generated with Claude Code

jiwon85 and others added 4 commits October 9, 2026 10:13
Problem: The widget's DAF screen skips every.org's contact info step. "Get instructions for a manual DAF donation" shows hardcoded instructions in the widget, and "Donate with DAFpay" redirects to the generic donate page.

Root Cause: The widget's manual DAF view is static text from 2023. every.org's manual flow now asks for donation details and the donor's name and email before showing instructions, and the widget never linked to it.

Solution: Link the manual button to every.org's #/donate/daf/manual flow and send the Chariot submit to #/donate/daf/chariot/confirm. Add an optional `route` to the donate URL builders for these deep links, and remove the unused static manual view.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Problem: "Get instructions for a manual DAF donation" sends donors to every.org's manual flow before they enter an amount, and skips the nonprofit's required custom fields.

Solution: Add a manual step to the DAF flow that reuses the Chariot amount view with yearly, monthly and one-time frequencies, then submits to every.org's #/donate/daf/manual/confirm. useSubmitDonation now takes the route and whether to allow recurring from its caller instead of hardcoding DAF.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DAF is in OneTimeFrequencyMethods, so the manual step should not offer recurring frequencies. Drop the allowRecurring option and say "DAF only supports one-time donations", since the message now shows on both the Chariot and manual steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DAF grants have a $50 minimum, but the widget validated DAF amounts against the general $10 default. Add useMinDonationAmount, which raises the minimum to $50 when DAF is selected (a higher nonprofit minimum still wins), and use it for both the amount field and the submit check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
donate-button Ready Ready Preview Oct 9, 2026 5:28pm UTC

Request Review

@jiwon85
jiwon85 marked this pull request as ready for review October 9, 2026 17:29
@jiwon85
jiwon85 requested review from Exploding and johnemau October 9, 2026 17:29
@jiwon85
jiwon85 merged commit c17077f into main Oct 9, 2026
6 checks passed
@jiwon85
jiwon85 deleted the claude/daf-donate-button-modal-74a0fa branch October 9, 2026 17:47

This branch was successfully deployed

1 active deployment
Preview — c321f9ff Deployed Oct 9, 2026 by vercel[bot]
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