Newsletter: remove old Jetpack Settings newsletter UI#48092
Newsletter: remove old Jetpack Settings newsletter UI#48092
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 17 files. Only the first 5 are listed here.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
The newsletter package's wp-admin settings UI has replaced the old Jetpack Settings newsletter section, so remove the now-obsolete code and the `jetpack_wp_admin_newsletter_settings_enabled` feature-flag filter that gated the rollout. - Delete `_inc/client/newsletter/` and its references in nav, settings routing, and Redux state. - Keep the `/newsletter` route as an unconditional redirect to `admin.php?page=jetpack-newsletter` for bookmarks/external links. - Simplify the newsletter package, my-jetpack, and jetpack-mu-wpcom to unconditionally use the new settings URL and menu registration. - The `jetpack_show_newsletter_menu_item` filter continues to work.
40a9369 to
37a3687
Compare
Fixes https://linear.app/a8c/issue/DOTCOM-16489
Proposed changes
_inc/client/newsletter/set of sections, ~2200 lines). The new Jetpack > Newsletter settings page (from thenewsletterpackage) has replaced it._inc/client/newsletter/index.jsxthat surfaces in Jetpack Settings search results when users search for a newsletter-related term, pointing them to the new settings page.#/newsletterroute in the Jetpack Settings SPA toadmin.php?page=jetpack-newsletterso bookmarks and external links still work.jetpack_wp_admin_newsletter_settings_enabledfeature-flag filter acrossplugins/jetpack,packages/newsletter,packages/my-jetpack, andpackages/jetpack-mu-wpcom. The new settings page is now always on.Urls::get_newsletter_settings_url()(always returns the new wp-admin URL) and update its callers.jetpack_show_newsletter_menu_itemfilter continues to work for hiding theJetpack > Newslettermenu item.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
All environments (self-hosted Jetpack, Atomic, Simple wpcom)
admin.php?page=jetpack-newsletter.admin.php?page=jetpack-newsletter.Self-hosted Jetpack and Atomic (not Simple — those sites don't expose Jetpack → Settings or My Jetpack)
admin.php?page=jetpack#/newsletterdirectly — it should redirect toadmin.php?page=jetpack-newsletter.add_filter( 'jetpack_show_newsletter_menu_item', '__return_false' );and confirm theJetpack > Newslettermenu item is hidden, butadmin.php?page=jetpack-newsletterstill loads when visited directly.Any environment