Skip to content

fix: make footer newsletter signup submit - #632

Merged
Durgeshwar-AI merged 4 commits into
Durgeshwar-AI:mainfrom
nyxsky404:fix/610-footer-newsletter-submit
Aug 11, 2026
Merged

fix: make footer newsletter signup submit#632
Durgeshwar-AI merged 4 commits into
Durgeshwar-AI:mainfrom
nyxsky404:fix/610-footer-newsletter-submit

Conversation

@nyxsky404

Copy link
Copy Markdown
Contributor

Pull Request

Issue Reference

Closes #610


Summary

  • add controlled footer newsletter form state with validation
  • surface loading, success, and error feedback on submit
  • use local mailto compose so signup stays zero-storage

Screenshots (if applicable)

NA


Checklist

  • My code follows the project's coding conventions
  • I have tested all impacted features
  • I have updated or added necessary documentation

Related Issues / PRs

NA


Open Source Program Participation

Program Name: GSSoC


Additional Notes

No third-party newsletter API and no backend email storage, matching the project privacy rules. Focused Vitest checks, typecheck, and production build pass.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

@nyxsky404 is attempting to deploy a commit to the Durgeshwar's projects Team on Vercel.

A member of the Team first needs to authorize it.

nyxsky404 and others added 2 commits August 8, 2026 03:22
Resolve Readme conflict by keeping both the footer newsletter note and same-name PDF merge wording.

Co-authored-by: Cursor <cursoragent@cursor.com>
Backend CI failed because conftest replaced PIL with MagicMock, leaving img.size unpackable. Use the real Pillow install in tests instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@nyxsky404

Copy link
Copy Markdown
Contributor Author

@Durgeshwar-AI The CI issue has been fixed.

What was failing

  • Backend CI: test_add_watermark_* blew up because backend/conftest.py mocked all of PIL with MagicMock, so img.size unpacked to 0 values.
  • The PR was also conflicting with main on Readme.md.

What we changed

  • Merged latest main and resolved the README conflict.
  • Stopped mocking Pillow in conftest.py so watermark tests use the real install.

Current status

  • backend passed
  • frontend passed
  • ⚠️ Vercel still fails with “Authorization required to deploy” — that needs a Durgeshwar Vercel team member to authorize the fork deployment; it is not a code failure.

@nyxsky404 nyxsky404 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review (cannot approve own PR as @nyxsky404)

Looks good to merge from a code perspective.

  • Footer Stay Updated form has validation + loading/success/error feedback
  • Local mailto compose keeps the flow zero-storage / no third-party newsletter API
  • Helper unit tests cover validation and mailto construction
  • GitHub Actions backend + frontend are green after the conftest Pillow mock fix and main merge
  • Remaining red check is Vercel fork deploy authorization only (not a code failure)

@nyxsky404

Copy link
Copy Markdown
Contributor Author

@Durgeshwar-AI This PR is mergeable (no conflicts with main). Frontend and backend CI are green here (includes the watermark test fixture fix).

The remaining Vercel failure is a team authorization/git/authorize issue on the org side, not caused by this PR’s footer newsletter changes.

@nyxsky404

Copy link
Copy Markdown
Contributor Author

Hi @Durgeshwar-AI — gentle nudge.

This PR is ready for review and merge from my side (conflicts resolved / up to date; remaining red checks if any are non-blocking deploy/preview noise like Vercel).

Could you please review and merge when you get a chance?

Thank you!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the landing-page footer “Stay Updated” newsletter signup by adding controlled form state, validating email input, and initiating a privacy-preserving “subscription” via a local mailto: compose (no backend storage / no external newsletter API), aligning with the repo’s project rules.

Changes:

  • Added shared utilities to validate email input and construct a newsletter mailto: link.
  • Wired the footer form to controlled state with loading/success/error feedback on submit.
  • Added Vitest coverage for the new newsletter utility functions and updated README feature list.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Readme.md Documents the footer newsletter signup behavior in the feature list.
frontend/src/utils/newsletterSignup.ts Adds email validation + mailto: link builder helpers.
frontend/src/utils/newsletterSignup.test.ts Adds Vitest tests for email validation and mailto generation.
frontend/src/components/Landing/Footer.tsx Implements controlled newsletter form state and submit handler with UI feedback.
backend/conftest.py Adjusts test module mocking list (removes PIL from mocked modules).
Suppressed comments (1)

frontend/src/components/Landing/Footer.tsx:212

  • The feedback message uses role="status" even for validation/configuration failures. For error states, role="alert" (or assertive live region) is more appropriate so the message is announced immediately to screen readers.
                <p
                  id="footer-newsletter-status"
                  role="status"
                  className={`mt-2 text-xs ${

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +50 to +60
try {
// Privacy-first: no backend storage or third-party newsletter API.
// Open the local mail client so the visitor can confirm interest.
window.location.href = buildNewsletterMailto(email, contactAddress);
setStatus("success");
setStatusMessage("Thanks! Confirm the message in your email client.");
setEmail("");
} catch {
setStatus("error");
setStatusMessage("Could not open your email client. Try again.");
}
Comment on lines +194 to +197
autoComplete="email"
aria-invalid={status === "error"}
aria-describedby="footer-newsletter-status"
disabled={status === "loading"}
Comment thread Readme.md
**PDF Tools:**

- Convert PDF pages to PNG (single page, range, or all pages)
- Footer “Stay Updated” signup validates email and opens a local mailto compose (no server storage)
@Durgeshwar-AI
Durgeshwar-AI merged commit d86a473 into Durgeshwar-AI:main Aug 11, 2026
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Footer newsletter signup does not submit subscriptions

3 participants