Uh oh!
There was an error while loading. Please reload this page.
Newsletter - #63
Conversation
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds CSS keyframe animations for a newsletter modal, extends Playfair_Display font weights/styles, and implements a landing-page beta newsletter signup modal with state, lifecycle effects (auto-close, closing delay, body scroll lock), basic email validation, and POST submission to the newsletter API. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Landing as Frontend (page.tsx)
participant Modal as Modal UI
participant API as Backend API
User->>Landing: Click "Sign up for Beta"
Landing->>Landing: set betaModalOpen = true
Landing->>Landing: disable body scroll
Landing->>Modal: render email form
User->>Modal: Enter email & submit
Modal->>Landing: submit handler
Landing->>Landing: validate email
alt invalid
Landing->>Modal: set betaEmailError (show error)
else valid
Landing->>Landing: set betaSubmitting = true
Landing->>API: POST { email } to /api/newsletter/subscribe
API-->>Landing: response (errors swallowed)
Landing->>Landing: set betaSubmitted = true
Landing->>Modal: render success UI
Landing->>Landing: schedule auto-close (3200ms)
end
Landing->>Landing: closeModal triggered
Landing->>Landing: set betaModalClosing = true
Landing->>Landing: wait 200ms, then reset state
Landing->>Landing: re-enable body scroll
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
| import { useRouter } from 'next/navigation'; | ||
| import { useUser } from '@/context/UserContext'; | ||
| import { Network, Sparkles, FilePlus2, Brain, CalendarClock, Users, PenSquare } from 'lucide-react'; | ||
| import { Network, Sparkles, FilePlus2, Brain, CalendarClock, Users, PenSquare, Bell, Map, Shield } from 'lucide-react'; |
…tion or class' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
Uh oh!
There was an error while loading. Please reload this page.
Description
Adds a newsletter/beta waitlist signup modal to the landing page. Users can enter their email to get early access and receive the Sapling newsletter. Emails are stored in Supabase and deduplicated on insert. The modal features entrance/exit animations, a success state that auto-dismisses after 3.2 seconds, and body scroll lock while open.
Changes Made
page.tsxwith animated open/close transitions and a compact auto-dismissing success popupmodal-backdrop-in/out,modal-card-in/out) toglobals.csslayout.tsxbackend/routes/newsletter.py—POST /api/newsletter/subscribeendpoint that upserts emails into anewsletter_emailsSupabase table with TLD validationmain.pyunder/api/newsletteremail-validatortorequirements.txtbackend/db/migration_newsletter.sqlto create thenewsletter_emailstableRelated Issues
Closes #
Testing
migration_newsletter.sqlin Supabase SQL Editor before deploying{"ok": true}, missing TLD returns 422Notes for Reviewers
The
newsletter_emailstable migration must be applied to Supabase before the backend route will work. Seebackend/db/migration_newsletter.sql.Summary by CodeRabbit
New Features
Style