Studio: Make sure that Publish site button navigates to WP.com - #2264
Conversation
📊 Performance Test ResultsComparing a951b43 vs trunk site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change |
epeicher
left a comment
There was a problem hiding this comment.
Thanks @katinthehatsite for improving this! I have tested it, and it works as expected. I am redirected to the creation site flow, and the site is connected to Studio at the end of the process. Changes also LGTM!
| After clicking on Publish Site | Creating site | Site is created | Site is connected to Studio |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
This PR is working as expected and could be merged. However, I would like to point out that the button says Publish site, and that is not actually happening until they click on Push in Studio. So I think we should create some follow-up task to add a clear Notice to the user that the site must be pushed for the local site to be published.
Thanks for the review 👍 @epeicher 100%, we will do the follow up PR as mentioned in Linear to do the following:
|
| export function generateCheckoutUrl( selectedSite?: SiteDetails ): string { | ||
| const url = new URL( | ||
| 'https://wordpress.com/setup/new-hosted-site?ref=studio§ion=studio-sync&showDomainStep' |
There was a problem hiding this comment.
@katinthehatsite, can we pass the section as a parameter? Currently it's hardcoded to §ion=studio-sync, but I would like the Publish site button to have a different section in the URL so we can measure the amount of "clicks" on this button.
There was a problem hiding this comment.
Sure, I will adress these comments in a follow up PR 👍




Related issues
Fixes STU-1108
Proposed Changes
This PR ensures that when you click on the
Publish sitebutton in Studio, it navigates to WP.com and takes you through the purchase flow, then bringing back to Studio. It should behave identical toCreate a new WordPress.com sitebutton inside theSyncmodal.Testing Instructions
SynctabPublish sitebutton displays in the top right cornerPublish sitebuttonSynctab (might be a couple of seconds)Pre-merge Checklist