Make mozilla-foundation newsletter migration permanent - #17308
Make mozilla-foundation newsletter migration permanent#17308stephaniehobson wants to merge 1 commit into
Conversation
Route newsletter signups to `mozilla-foundation`, excluding ones specifically Firefox branded. - The `foundation-separate-newsletter` switch is retired and mozilla-foundation now unconditionally routes to FOUNDATION_SUBSCRIBE_URL. - Mozilla pages non-English fallback to Firefox now list the mozilla-foundation with available language options. - Default form titles and the new homepage hero copy are updated to use existing Mozilla-worded FTL strings. Issue / Bugzilla link n/a Testing - Verify form action equals FOUNDATION_SUBSCRIBE_URL on Mozilla pages in English and a non-English locale (home, /about/, /about/mission/, foundation pages, footer, /newsletter/) - Verify newsletter/family.html action equals BASKET_SUBSCRIBE_URL - Verify Foundation manage/unsubscribe links appear unconditionally on /newsletter/existing/ - Verify a Firefox page (e.g. newsletter/firefox.html) still uses mozilla-and-you → BASKET_SUBSCRIBE_URL with Firefox-worded copy - Follow the unsubcribe path for a Firefox newsletter
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17308 +/- ##
=======================================
Coverage 82.72% 82.72%
=======================================
Files 178 178
Lines 9318 9318
=======================================
Hits 7708 7708
Misses 1610 1610 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR makes the “foundation newsletter migration” permanent by removing the foundation-separate-newsletter switch and ensuring Mozilla site newsletter signups consistently target the Foundation subscription endpoint, while keeping Firefox-branded newsletter pages routed to Basket.
Changes:
- Removes switch-gated logic so
mozilla-foundationnow always posts toFOUNDATION_SUBSCRIBE_URL, including footer and key mozorg/foundation templates. - Updates the footer/newsletter form default title copy to use Mozilla-worded Fluent strings, and adjusts non-English fallbacks to show the Foundation form instead of Firefox.
- Cleans up related tests and introduces a separate assertion that non-Foundation newsletters (e.g.,
newsletter.family) still post toBASKET_SUBSCRIBE_URL.
Review note: This review was performed following the repository guidance in AGENTS.md (including Fluent/i18n conventions and Python 3.13 targeting).
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| uv.lock | Updates locked Python requirement to >=3.13. |
| bedrock/settings/base.py | Renames/standardizes the Foundation available-languages setting key/name. |
| bedrock/newsletter/views.py | Passes a language override for Foundation-only posts when validating footer form data server-side. |
| bedrock/newsletter/tests/test_footer_form.py | Removes switch-based branching tests and adds a Basket routing assertion for a non-Foundation newsletter page. |
| bedrock/newsletter/templatetags/helpers.py | Removes waffle switch usage; routes mozilla-foundation unconditionally to FOUNDATION_SUBSCRIBE_URL and applies language overrides. |
| bedrock/newsletter/templates/newsletter/mozilla.html | Simplifies to always render the Foundation newsletter form. |
| bedrock/newsletter/templates/newsletter/management.html | Makes Foundation manage/unsubscribe/subscribe links unconditional. |
| bedrock/newsletter/templates/newsletter/index.html | Makes /newsletter/ render Foundation-only signup unconditionally. |
| bedrock/newsletter/templates/newsletter/includes/form.html | Adjusts default single-form title logic to use Mozilla vs Firefox wording based on newsletter id. |
| bedrock/newsletter/templates/newsletter/family.html | Ensures the family (Firefox-branded) page uses mozilla-and-you only. |
| bedrock/mozorg/templates/mozorg/mission.html | Routes newsletter signup to Foundation for all locales (including previously “Firefox fallback” locales). |
| bedrock/mozorg/templates/mozorg/home/home-old.html | Routes newsletter signup to Foundation unconditionally and aligns copy usage. |
| bedrock/mozorg/templates/mozorg/home/home-new.html | Updates homepage hero newsletter copy and routes signup to Foundation. |
| bedrock/mozorg/templates/mozorg/base.html | Routes base mozorg newsletter include to Foundation for all locales. |
| bedrock/mozorg/templates/mozorg/about/index.html | Routes about page newsletter to Foundation. |
| bedrock/mozorg/templates/mozorg/about-base.html | Routes non-English branch to Foundation instead of defaulting to Firefox. |
| bedrock/legal/templates/legal/index.html | Ensures legal page newsletter form uses Foundation newsletter id in both branches. |
| bedrock/foundation/templates/foundation/base.html | Routes non-English branch to Foundation instead of defaulting to Firefox. |
| bedrock/foundation/templates/foundation/annualreport/2010/base.html | Routes non-English branch to Foundation instead of defaulting to Firefox. |
| bedrock/foundation/templates/foundation/annualreport/2009/base.html | Routes non-English branch to Foundation instead of defaulting to Firefox. |
| bedrock/base/templates/includes/protocol/footer/footer-newsletter.html | Routes footer newsletter signup to Foundation unconditionally. |
| <h2>{{ ftl('newsletter-form-join-the-community', fallback='newsletter-form-get-mozilla-updates') }}</h2> | ||
| <p>{{ ftl('multi-newsletter-form-desc') }}</p> |
| # Custom languages for the Foundation signup form; need specifying directly | ||
| # because the form config is not provided by Basket | ||
| FOUNDATION_SUBSCRIBE_AVAILABLE_LANGUAGUES = config( | ||
| "FOUNDATION_SUBSCRIBE_AVAILABLE_LANGUAGUES", | ||
| FOUNDATION_SUBSCRIBE_AVAILABLE_LANGUAGES = config( | ||
| "FOUNDATION_SUBSCRIBE_AVAILABLE_LANGUAGES", | ||
| default="en,de,fr,es,pl,pt", | ||
| parser=ListOf(str), | ||
| ) |
One-line summary
Route all newsletter signups to
mozilla-foundation, excluding ones specifically Firefox branded.Significant changes and points to review
foundation-separate-newsletterswitch is retired and mozilla-foundation now unconditionally routes to FOUNDATION_SUBSCRIBE_URL.Issue / Bugzilla link
n/a
Testing
Note
This is still the AI generated list. Feel free to jump in but I'll write better testing steps on Wednesday and this is not urgent.