VideoPress: surface the admin dashboard in the Jetpack plugin#49696
VideoPress: surface the admin dashboard in the Jetpack plugin#49696vianasw wants to merge 2 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! 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 SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
The "Jetpack > VideoPress" dashboard previously appeared only in the standalone Jetpack VideoPress plugin, which enables it by passing `admin_ui => true` to `$config->ensure( 'videopress', ... )`. The main Jetpack plugin ensured the 'videopress' feature without options, so the admin_ui flag was never set and Admin_UI::init() never ran. Pass `admin_ui => true` from Jetpack::configure() so the package's Admin_UI initializes inside the Jetpack plugin too. The page still only renders when the VideoPress module is active (Status::is_active()), and the rsm_jetpack_ui_modernization_videopress filter continues to select the legacy React app vs. the modernized wp-build dashboard. Verified in local Docker with the standalone plugin deactivated: the page renders the modernized dashboard with the filter on and the legacy app with it off. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ment Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQbYMqwYS55EBaSNuHs8aD
640d27d to
131a462
Compare
Proposed changes
The Jetpack > VideoPress admin dashboard has, until now, only ever appeared in the standalone Jetpack VideoPress plugin — even though the dashboard itself lives entirely in the
automattic/jetpack-videopresspackage that the Jetpack plugin already bundles.The reason is a single init option. The package's
Admin_UI::init()only runs whenInitializer::should_initialize_admin_ui()is true, which is only the case when a consumer passesadmin_ui => trueto$config->ensure( 'videopress', … ). The standalone plugin does that;Jetpack::configure()lumped'videopress'into a bare loop that called$config->ensure( $feature )with no options, so the flag was never set and the menu never registered.This PR pulls
'videopress'out of that no-options loop and ensures it witharray( 'admin_ui' => true ), mirroring the standalone plugin.projects/plugins/jetpack/class.jetpack.php: ensure thevideopressfeature withadmin_ui => true.Behavior is unchanged unless the VideoPress module is active:
Status::is_active(), which inside the Jetpack plugin means the VideoPress module must be active (Jetpack, unlike the standalone plugin, does not force-activate the module).rsm_jetpack_ui_modernization_videopressfilter continues to select the UI: off → legacy React app, on → modernized wp-build dashboard. No new enablement mechanism is introduced.All required assets (the legacy
build/adminbundle and the full modernizedbuild/wp-build tree) and thejetpack-wp-build-polyfillsdependency already ship in the Jetpack plugin'sjetpack_vendor/mirror, so no build changes are needed.Related product discussion/links
Does this pull request change what data or activity we track or use?
No. No new tracking is introduced. The package's existing Tracks usage is unchanged and still gated by the standard analytics/consent checks.
Testing instructions
Prerequisite: a site with the Jetpack plugin only (the standalone Jetpack VideoPress plugin deactivated), and the VideoPress module active (
wp jetpack module activate videopress).rsm_jetpack_ui_modernization_videopressoff (default), the legacy React app renders (mount node#jetpack-videopress-root,jetpack-videopress-pkgbundle).add_filter( 'rsm_jetpack_ui_modernization_videopress', '__return_true' );), the modernized wp-build dashboard renders (mount node#jetpack-videopress-dashboard-wp-admin-app,@wordpress/bootscript module).Verified locally in Docker with the standalone plugin deactivated: filter off → legacy app, filter on → modernized dashboard, both served by the Jetpack plugin alone.
🤖 Generated with Claude Code