TEST EXP: calypso_launch_button_experiment_test_20260319_4, WP Admin Launchpad#47922
TEST EXP: calypso_launch_button_experiment_test_20260319_4, WP Admin Launchpad#47922
Conversation
…P Admin masterbar Adds the actual API call to the Launch site button for both Simple sites (via wpcom-proxy-request) and Atomic sites (via a new /wpcom/v2/launch-site proxy endpoint that tunnels through the Jetpack connection). Also populates JetpackScriptData.site.wpcom.blog_id for Atomic so the Simple site path has the correct blog ID available. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_Site class declaration Guard the class with class_exists() to prevent a fatal redeclaration conflict when the same class is already loaded from WPCOM core's rest-api-plugins on Simple sites.
…aunch_Site Rename WPCOM_REST_API_V2_Endpoint_Launch_Site to WPCOM_REST_API_V2_Endpoint_Jetpack_Launch_Site to avoid a fatal conflict with the identically named class in WPCOM core's rest-api-plugins.
…ton/index.php Enqueue site data (siteUrl, siteDomain, sitePlan, hasCustomDomain) as an inline script in the launch button enqueue hook, so CelebrateLaunchModal has the data it needs regardless of whether the user is on the dashboard page.
…com/v2 - Switch from as_blog to as_user to allow user-level launch action
Moves the mutation logic out of LaunchButton into a reusable useLaunchSiteMutation hook in common/hooks, so it can be shared with the upcoming Reading Settings launch flow.
The modal is now used by both the masterbar launch button and the dashboard widgets, so it belongs in common/ rather than scoped to wpcom-dashboard-widgets.
Adds ExPlat experiment handling to the launchpad dashboard widget: - Control: preserves existing behavior (launchpad API call + redirect to ?celebrate-launch=true) - gated_site_launch: redirects to /start/launch-site without making an API call - ungated_site_launch: launches via useLaunchSiteMutation and shows CelebrateLaunchModal in place
- Use window.location.assign() for the gated redirect - Add comments referencing wp-calypso/pull/109434 for return false
…/celebrate-launch/
|
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 🤖 🔴 Action required: Please edit your PR description and explain what functional changes your PR includes, and why those changes are needed. 🔴 Action required: Please include detailed testing steps, explaining how to test your change, like so: 🔴 Action required: We would recommend that you add a section to the PR description to specify whether this PR includes any changes to data or privacy, like so: Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
This PR is only for the testing purposes of the #47832 with testing experiment.
DON'T MERGE