Skip to content

NewsletterSignup.island.tsx — signed in flow #15678

@georgerichmond

Description

@georgerichmond

Summary

Implement the signed-in flow for NewsletterSignup.island.tsx, including matching Storybook coverage.

Parent epic: @guardian/dotcom-rendering/issues/15677


Tasks

  • Implement the signed-in state for the newsletter signup component
  • Show the Sign up button in the signed-in experience
  • Display the newsletter privacy message underneath the signup card
  • Show the success state after signup, including:
    • You're signed up
    • the newsletter name and frequency
    • a Browse more newsletters link
  • Reuse the existing newsletter signup tracking pattern from SecureSignup.island.tsx / newsletter-sign-up-requests.ts so the new component reports the same interaction lifecycle.
  • Add Storybook coverage for the signed-in state and success state

Suggested component structure

  • NewsletterSignup.island.tsx as the top-level auth-aware wrapper
  • Shared NewsletterSignupCard / card shell for the outer chrome
  • Shared NewsletterSignupSuccessConfirmation for the success state
  • Shared NewsletterPrivacyMessage beneath the card
  • Signed-in state can be kept as a small focused view inside the wrapper

Reuse

Existing request and tracking logic can likely be reused from SecureSignup.island.tsx, including:

  • useAuthStatus
  • postFormData
  • buildFormData
  • sendTracking

The privacy message placement pattern already exists in:

  • ContributionsEpicNewsletterSignup.tsx
  • NewsletterSignupLayout.tsx

Notes

  • The Preview latest CTA is intentionally out of scope here and will be added in a later ticket.

Out of scope

  • Signed-out email entry flow
  • Validation errors
  • Active-field reveal behavior for logged-out users
  • Feature flag work
  • Preview latest button

Metadata

Metadata

Labels

NEWSLETTERSNewsletters related work.featureDepartmental tracking: work on a new feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions