Skip to content

Conversation

@katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Dec 18, 2025

Related issues

Fixes STU-1108

Proposed Changes

This PR ensures that when you click on Publish site button and come back to WP.com, the WP.com site is not only connected but that we also open a Push modal.

Testing Instructions

  • This needs to be tested with Studio: Pass "autoOpenPush" to deeplink wp-calypso#107779 which needs to be applied in Calypso first
  • Pull the changes from this branch
  • Start Studio
  • Navigate to the Sync tab
  • Make sure that you don't have any WP.com sites connected to your Studio site so that the Publish site button displays in the top right corner
  • Click on the Publish site button
  • Observe that you are brought to WP.com
  • Complete the purchase
  • Wait for the site to go Atomic
  • Observe that you see a popup asking you to open Studio
  • Confirm that the site you just created is connected in the Sync tab (might be a couple of seconds)
  • Confirm that the Push modal is open
  • Test the same steps with Create a new WordPress.com site from the Sync modal and confirm that once you connect the site, the Push modal does not auto-open

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@katinthehatsite katinthehatsite self-assigned this Dec 18, 2025
@katinthehatsite katinthehatsite marked this pull request as draft December 18, 2025 13:37
@katinthehatsite katinthehatsite marked this pull request as ready for review December 18, 2025 15:36
@katinthehatsite katinthehatsite requested a review from a team December 18, 2025 15:36
Copy link
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @katinthehatsite for implementing this! I reviewed the related PR in Calypso repo, so I will copy my comments and the screenshots here for completeness:

This nicely wraps up the process of publishing a local site to WordPress.com 🙌. I have tested it, and it works as expected. After purchasing the site, it is created as Atomic, and eventually, Studio connects the site and opens the Push modal.

Studio click on Publish site Redirects to WP.com Open in Studio Push modal opens Push completes Site is published in WP.com
Image Image Image Image Image Image

I have also tested the additional step of:

Test the same steps with Create a new WordPress.com site from the Sync modal and confirm that once you connect the site, the Push modal does not auto-open

and it works as expected 👌, but I was wondering if that flow should be similar to the Publish site flow? 🤔 Anyways, that can be discussed as a possible follow-up.

I see one Unit Test failing, but after addressing that, this can be progressed. LGTM! :shipit:

@katinthehatsite
Copy link
Contributor Author

but I was wondering if that flow should be similar to the Publish site flow? 🤔 Anyways, that can be discussed as a possible follow-up.

I am not sure 😅 This was @sejas request to make the difference between these two buttons - Publish site should auto-open and the Create a new site should behave as is without changes. We can adjust it if needed, I don't have any strong preferences.

@sejas
Copy link
Member

sejas commented Dec 19, 2025

I am not sure 😅 This was @sejas request to make the difference between these two buttons - Publish site should auto-open and the Create a new site should behave as is without changes. We can adjust it if needed, I don't have any strong preferences.

Yep! I suggested keeping the same behaviour for the Connect site flow. The main reason is that connecting a site can be used for Push or Pull direction, so we can auto-open any modal. Correct me if I'm wrong. 🤔
We are talking about this button-link:

Screenshot 2025-12-19 at 14 38 09

@epeicher
Copy link
Contributor

Yep! I suggested keeping the same behaviour for the Connect site flow. The main reason is that connecting a site can be used for Push or Pull direction, so we can auto-open any modal. Correct me if I'm wrong. 🤔
We are talking about this button-link:

@sejas, yes, that's the one I meant. My reasoning here was that if users are creating a site, they probably want to push their local changes, but I agree they can:

  • Create a site
  • Customize the new created site on WordPress.com
  • Pull their changes and continue working locally

So I agree opening the Push modal limits one possible scenario unnecessarily. I agree with leaving that as is. Thanks for the explanation!

@sejas
Copy link
Member

sejas commented Dec 19, 2025

Yep! I suggested keeping the same behaviour for the Connect site flow. The main reason is that connecting a site can be used for Push or Pull direction, so we can auto-open any modal. Correct me if I'm wrong. 🤔
We are talking about this button-link:

@sejas, yes, that's the one I meant. My reasoning here was that if users are creating a site, they probably want to push their local changes, but I agree they can:

  • Create a site
  • Customize the new created site on WordPress.com
  • Pull their changes and continue working locally

So I agree opening the Push modal limits one possible scenario unnecessarily. I agree with leaving that as is. Thanks for the explanation!

You make a valid point. Newly created sites will usually be empty, so the chances that the user wants to push rather than pull are quite high. I think it's worth discussing whether it's better to open the push modal further.

Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested it and it works as expected. It would be great to speed up the actions if possible, like connecting and opening the modal. It could be improved in a follow-up issue.

I'm approving the PR, although there are some conflicts and unit tests that need to be fixed before merging.

connect-and-auto-open-push.mp4

@katinthehatsite
Copy link
Contributor Author

It would be great to speed up the actions if possible, like connecting and opening the modal. It could be improved in a follow-up issue.

Sounds good, I will open a follow up issue.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 22, 2025

📊 Performance Test Results

Comparing dc27c39 vs trunk

site-editor

Metric trunk dc27c39 Diff Change
load 11203.00 ms 8938.00 ms -2265.00 ms 🟢 -20.2%

site-startup

Metric trunk dc27c39 Diff Change
siteCreation 16290.00 ms 23572.00 ms +7282.00 ms 🔴 44.7%
siteStartup 7957.00 ms 8033.00 ms +76.00 ms 🔴 1.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@katinthehatsite katinthehatsite merged commit a4da168 into trunk Dec 22, 2025
8 of 9 checks passed
@katinthehatsite katinthehatsite deleted the add/publish-site-button-opens-push branch December 22, 2025 13:57
@katinthehatsite
Copy link
Contributor Author

katinthehatsite commented Dec 22, 2025

I opened the follow up issue for speed improvement here: STU-1173

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants