Skip to content

docs: replace waitlist form with Loops.so integration#447

Merged
BYK merged 1 commit into
mainfrom
docs/loops-waitlist-form
May 21, 2026
Merged

docs: replace waitlist form with Loops.so integration#447
BYK merged 1 commit into
mainfrom
docs/loops-waitlist-form

Conversation

@BYK
Copy link
Copy Markdown
Owner

@BYK BYK commented May 21, 2026

Summary

Replace the FormSubmit.co waitlist form on the website with a Loops.so newsletter form integration.

Changes

Backend

  • FormSubmit.co Loops.so (https://app.loops.so/api/newsletter-form/...)
  • Content-Type: application/x-www-form-urlencoded (Loops requirement)
  • Progressive enhancement: action + method on <form> so native POST works without JS

UI/UX

  • Three-view state system: form (default), success, error — only one visible at a time via .cta-form-view/.show toggle
  • Retry support: error view shows a "Try Again" button that restores the form with email preserved
  • Loading state: button shows "Sending..." and disables during fetch, restores in finally
  • Rate limiting: 60s cooldown via localStorage timestamp (matches Loops embed behavior)

Robustness

  • res.json() failure (non-JSON response like 502) caught cleanly — falls to network error
  • localStorage wrapped in try/catch for Safari private browsing compatibility
  • Rate-limit timestamp only recorded on success (not on API error responses)
  • Email input preserved on error (only cleared on success)
  • "Email already on list" treated as success

Accessibility

  • aria-live="polite" on success view for screen reader announcements
  • role="alert" on error view for immediate screen reader notification
  • Focus management: retry button focused on error, email input focused on retry

Styling

  • All inline styles from Loops embed stripped — uses existing CSS variables (--g0, --c0, --c2, etc.)
  • No Inter font import — inherits site's DM Sans
  • New classes: .cta-form-view, .cta-error, .cta-back, .cta-submit:disabled
  • Mobile responsive: .cta-back added to full-width rule
  • Editorial aesthetic preserved (2px border-radius, uppercase letter-spacing, cream/green palette)

- Switch backend from FormSubmit.co to Loops.so newsletter API
- Three-view state system (form/success/error) with retry support
- Progressive enhancement: native form POST fallback if JS unavailable
- Client-side rate limiting (60s cooldown) with localStorage
- Proper error handling: API errors, network errors, non-JSON responses
- Accessibility: aria-live on success, role=alert on error, focus management
- Safari private browsing safety: localStorage wrapped in try/catch
- Email preserved on error (not cleared until success)
- All styling uses existing CSS variables (no Inter font, no inline styles)
- Mobile responsive: retry button included in full-width rule
@BYK BYK merged commit 8dfe1f1 into main May 21, 2026
7 checks passed
@BYK BYK deleted the docs/loops-waitlist-form branch May 21, 2026 10:24
@craft-deployer craft-deployer Bot mentioned this pull request May 21, 2026
6 tasks
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.

1 participant