Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.43k stars 1.99k forks source link

Site Migration flows should redirect to home instead of /start #96591

Closed escapemanuele closed 1 day ago

escapemanuele commented 1 day ago

Related to https://github.com/Automattic/dotcom-forge/issues/9709#issuecomment-2488150145

Proposed Changes

Instead of redirecting the users to /start, when there is not site id or site slug, we redirect them to /home as it is done in the site-setup flow

Why are these changes being made?

When you remove the siteSlug/siteId in the /setup/site-setup steps, you get redirected to the primary site. However, when you remove the siteSlug/siteId in the /setup/site-migration/site-migration-identify step, you get redirected to the Domains step, and potentially create a new site if you continue the flow.

Testing Instructions

github-actions[bot] commented 1 day ago
Calypso Live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125213
Jetpack Cloud live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125213&env=jetpack
Automattic for Agencies live (direct link)
https://calypso.live?image=registry.a8c.com/calypso/app:build-125213&env=a8c-for-agencies
matticbot commented 1 day ago

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~10 bytes removed 📉 [gzipped])

``` name parsed_size gzip_size site-migration-flow -57 B (-0.1%) -10 B (-0.1%) hosted-site-migration-flow -57 B (-0.1%) -10 B (-0.1%) ``` Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size? **Parsed Size:** Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. **Gzip Size:** Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

matticbot commented 1 day ago

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix-site-migration-redirection on your sandbox.