Skip to content

Add opt-in newsletter signup and admin tools - #544

Merged
JonDevOps merged 1 commit into
mainfrom
wip/newsletters
Nov 27, 2026
Merged

JonDevOps merged 1 commit into
mainfrom
wip/newsletters

Conversation

@JonDevOps

Copy link
Copy Markdown
Member

Adds an opt-in newsletter signup page and a Newsletter tab to the existing admin dashboard. Administrators can draft a campaign, preview recipient counts and check delivery results.

The newsletter backend is a separate Firebase codebase. Publish this frontend after its project has the newsletter endpoints. Campaign sending starts disabled.

Verified locally with the site build and Firebase Auth/Firestore emulator tests.

@JonDevOps
JonDevOps marked this pull request as ready for review November 27, 2026 21:55
@JonDevOps
JonDevOps requested a review from a team as a code owner November 27, 2026 21:55
Copilot AI lite review requested due to automatic review settings November 27, 2026 21:55
@JonDevOps
JonDevOps merged commit 1130252 into main Nov 27, 2026
4 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

A moderate active finding remains because Newsletter.tsx bypasses the appFunctions emulator-aware wrapper, causing local emulator runs to call deployed functions and preventing authenticated newsletter flows from working correctly.

1 open issue
What changed in this PR

Adds authenticated newsletter subscription management and administrator campaign tools backed by Firebase callable functions, integrating the feature into notification settings and the moderation dashboard.

Changes:

  • Adds opt-in and opt-out newsletter subscription controls for signed-in users.
  • Adds campaign drafting, audience previews, queueing, and delivery-result views for administrators.
  • Adds newsletter navigation and styling across the notifications and moderation interfaces.
File Description
src/​components/​NewsletterSubscription.tsx Connects signed-in users to the newsletter subscription panel.
src/​components/​newsletter/​Newsletter.tsx Implements subscription management, administrator campaign workflows, previews, queueing, and delivery-result views.
src/​components/​newsletter/​newsletter.css Provides styling for newsletter panels, forms, controls, and status messages.
src/​app/​notifications/​page.tsx Links notification settings users to newsletter subscription management.
src/​app/​moderation/​ModerationQueue.tsx Adds an administrator-only Newsletter tab to the moderation dashboard.

Review effort: Lite

};

async function call<T>(region: string, name: string, request: Record<string, unknown>) {
const result = await httpsCallable<Record<string, unknown>, T>(getFunctions(getApp(), region), name)(request);
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.

2 participants