Repository navigation
Settings: Point the Writing links to Features behind the settings flag - #55012
Conversation
With settings consolidation on, the editor's "Turn on Jetpack Blocks" link searches My Jetpack › Features for the Blocks module, and the wpcomsh notice on Settings › Writing links to Features. The search uses the module's translated name, since Features matches translated names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ABKQhWcG89Ca835d23UqyF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ABKQhWcG89Ca835d23UqyF
|
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. Wpcomsh plugin:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryCoverage changed in 2 files.
Full summary · PHP report · JS report Coverage check overridden by
Covered by non-unit tests
|
CGastrell
left a comment
There was a problem hiding this comment.
LGTM.
Question: Features also reads ?feature=<slug>, which opens that feature's modal. Would admin.php?page=my-jetpack#/features?feature=blocks work here? It would not depend on the translated module name. I could not confirm that blocks is a feature slug in Features, so the search link may be the only option. class-unavailable-blocks.php#L237-L246
|
A locale-independent link would need an untranslated search term on the module, so the translated name stays. Separately, the coverage check failed on the wpcomsh notice file, which has never had tests (wpcomsh's suite doesn't load My Jetpack). I added the Generated by Claude. |
Fixes JETPACK-3730
Proposed changes
Behind the
my-jetpack-settings-consolidationflag (off by default). With the flag off nothing changes.With the flag on, the Settings app hides its Writing tab for admins (#54891). Two links still pointed to it. Now they go to My Jetpack › Features:
Unavailable_Blocks::get_editor_data()fixUrl): when the Blocks module is off, a Jetpack block in the editor shows this button. It now opens Features searched for the Blocks module.blockswould miss the row on non-English sites.admin.php?page=jetpack#/writing.admin.php?page=my-jetpack#/features./writingentries now note that they apply with the flag off.No screenshots: the editor button looks the same (only its target changes), and the notice's new text is above.
Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
Turn the flag on with a snippet:
add_filter( 'jetpack_feature_flag_enabled_my-jetpack-settings-consolidation', '__return_true' );Block editor (self-hosted or Atomic, connected, as an admin):
wpcomsh notice (Atomic Business running this branch's wpcomsh):
wpcom_writing_features_notice_dismissedoption first.Automated:
jp docker phpunit jetpack -- --filter=Unavailable_Blockscovers flag off, flag on, the host hiding My Jetpack, and a disconnected site.The wpcomsh notice file has no unit tests: wpcomsh's suite doesn't load My Jetpack. Both of its branches were checked with a throwaway test against a WordPress install that loads it, and the steps above cover them, hence the
Covered by non-unit testslabel.🤖 Generated with Claude Code