My Jetpack: add flagged products-only interface for Simple and Atomic sites#49982
My Jetpack: add flagged products-only interface for Simple and Atomic sites#49982enejb wants to merge 6 commits into
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! |
Code Coverage SummaryCoverage changed in 6 files. Only the first 5 are listed here.
2 files are newly checked for coverage.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
Proposed changes
Trial/prototype PR exploring a new products-only My Jetpack interface for WordPress.com Simple and Atomic sites, behind a feature flag. The goal is to prototype the new interface — the page URL (
admin.php?page=my-jetpack) stays the same, but the UI shows only products with no tabs.When the
JETPACK_MY_JETPACK_PRODUCTS_ONLYconstant is set and the site is Simple or Atomic:Status\Hostand the WordPress.com "site has feature" API (Product::does_site_have_feature()). All three signals are overridable via filters so a mu-plugin can force states for testing:my_jetpack_products_page_site_type—simple/atomic/othermy_jetpack_products_page_enabled— force the whole mode on/offmy_jetpack_products_page_can_manage_modules— force the toggle capabilityRelated product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
This is behind a feature flag, so it's easiest to test on a Jurassic Ninja site (or local) with a small mu-plugin that turns the flag on and forces each state via the filters above:
Tester mu-plugin
/wp-admin/admin.php?page=my-jetpack&mj_state=simple→ only the products grid renders (no tabs), and no module toggles appear.…&mj_state=atomic_business→ same products-only layout, module toggles are shown.…&mj_state=atomic_nobiz→ products-only layout, no toggles.…&mj_state=off→ normal tabbed My Jetpack.Screenshots
Captured on a live Jurassic Ninja site at 1440×900.
mj_state=simple)atomic_business)atomic_nobiz)Control — flag off renders the normal tabbed My Jetpack: