Skip to content

Add feature-flagged Jetpack admin menu customization#50066

Open
DevinWalker wants to merge 12 commits into
trunkfrom
feature/jetpack-customizable-admin-menu
Open

Add feature-flagged Jetpack admin menu customization#50066
DevinWalker wants to merge 12 commits into
trunkfrom
feature/jetpack-customizable-admin-menu

Conversation

@DevinWalker

@DevinWalker DevinWalker commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Fixes JETPACK-1798

Proposed changes

  • Add a feature-flagged Jetpack admin menu customization layer in admin-ui, including recommended grouped defaults, site defaults, user preferences, and rollout filters.
  • Add a new My Jetpack Customize tab that uses WordPress-native controls to toggle the recommended menu, rename terse group labels, reorder/group/hide menu items, and save site or personal preferences.
  • Add the My Jetpack REST endpoint, documentation, changelog entries, and PHP/JS unit coverage for the customization model and tab visibility.
  • Keep Settings pinned as the last normal Jetpack submenu item, with Activity Log above it and the Upgrade CTA still appended below when present.

Related product discussion/links

  • Linear: JETPACK-1798
  • Product direction developed in Codex discussion.

Does this pull request change what data or activity we track or use?

No tracking changes.

Testing instructions

  • Enable the feature flag:
add_filter( 'jetpack_admin_menu_customization_enabled', '__return_true' );
  • To test a rollout/new-install cohort getting the recommended menu by default, also enable:
add_filter( 'jetpack_admin_menu_customization_default_enabled', '__return_true' );
  • Go to WP Admin > My Jetpack > Customize.
  • As an administrator, verify the Defaults panel appears, the recommended menu toggle can be saved, and group labels can be edited.
  • Save defaults and verify the Jetpack submenu uses the grouped ordering with terse labels such as Create, Protect, and Manage.
  • Verify Activity Log appears above Settings, and Settings appears above the Upgrade CTA when the CTA is present.
  • Use Use legacy menu and verify the menu returns to the existing legacy ordering while Settings remains the last normal submenu item.
  • As a non-admin user with edit_posts, verify Products remains hidden, Customize is available, and only personal menu preferences can be saved.

Verified locally after the trunk merge:

CI=true jp test php packages/admin-ui -v
CI=true jp phan packages/admin-ui
CI=true jp test js packages/my-jetpack -v
CI=true jp test js packages/admin-ui # skipped: no test-js script in composer.json
git diff --check

Notes:

  • The latest commits were created with --no-verify because the local Husky hook used an incompatible pnpm from the Codex runtime, while the Dockerized Jetpack verification above passed.

@DevinWalker DevinWalker added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] Needs Review This PR is ready for review. labels Jun 30, 2026
@DevinWalker DevinWalker self-assigned this Jun 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

…omizable-admin-menu

# Conflicts:
#	projects/packages/admin-ui/src/class-admin-menu.php
#	projects/packages/my-jetpack/_inc/components/my-jetpack-tab-panel/tab-content.tsx
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor
Are you an Automattician? The PR will need to be tested on WordPress.com. This comment will be updated with testing instructions as soon the build is complete.

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

Cannot generate coverage summary while tests are failing. 🤐

Please fix the tests, or re-run the Code coverage job if it was something being flaky.

Full summary · PHP report · JS report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Package] Admin Ui [Package] My Jetpack [Status] Needs Review This PR is ready for review. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant