Skip to content

Studio: Improve plans modal in the pull during existing site creation flow - #2222

Merged
katinthehatsite merged 5 commits into
trunkfrom
fix/improve-background-screen-for-pull-no-sites
Dec 10, 2025
Merged

Studio: Improve plans modal in the pull during existing site creation flow#2222
katinthehatsite merged 5 commits into
trunkfrom
fix/improve-background-screen-for-pull-no-sites

Conversation

@katinthehatsite

Copy link
Copy Markdown
Contributor

Related issues

Fixes STU-1113

Proposed Changes

This PR embeds the content for NoWPcomSite modal directly into Add site > Pull an existing site screen when the user does not have any sites on WP.com:

Screenshot 2025-12-09 at 12 08 54 PM

Currently, when you navigate to Add site > Pull an existing site and have no sites, you see the following view:

Screenshot 2025-12-09 at 12 12 28 PM

There are two issues with this implementation:

  • The modal is dismissible so when you dismiss it, you are stuck with the search bar on the screen with no sites and no actions that you can take from there
  • It also doesn't make sense to have to have the search bar behind the modal

Testing Instructions

  • Pull the changes from this branch
  • Apply the following diff:
index dbf92f16..903f078c 100644
--- a/src/stores/sync/wpcom-sites.ts
+++ b/src/stores/sync/wpcom-sites.ts
@@ -123,6 +123,9 @@ export const wpcomSitesApi = createApi( {
                                        return { error: { status: 401, data: 'Not authenticated' } };
                                }
 
+                               return { data: [] };
+
                                try {
                                        const allConnectedSites = await getIpcApi().getConnectedWpcomSites();
  • Start the app with npm start
  • Click on Add site in the sidebar
  • Open the Pull an exisiting site option
  • Confirm that you can see the view from the screenshot above (modal content embedded)
  • Test with a real account with no sites and confirm you can see the correct modal

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@katinthehatsite katinthehatsite self-assigned this Dec 9, 2025
@katinthehatsite
katinthehatsite requested review from a team and sejas December 9, 2025 11:21
@katinthehatsite

Copy link
Copy Markdown
Contributor Author

The modal is dismissible so when you dismiss it, you are stuck with the search bar on the screen with no sites and no actions that you can take from there

I meant no actions you can take to add a site, the only option is to go back and restart the process.

@github-actions

github-actions Bot commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

📊 Performance Test Results

Comparing 60aeac4 vs trunk

site-editor

Metric trunk 60aeac4 Diff Change
load 11291.00 ms 11195.00 ms -96.00 ms 🟢 -0.9%

site-startup

Metric trunk 60aeac4 Diff Change
siteCreation 16175.00 ms 16153.00 ms -22.00 ms 🟢 -0.1%
siteStartup 6972.00 ms 6968.00 ms -4.00 ms 🟢 -0.1%

Results are median values from multiple test runs.

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

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Code looks good. I tested it, and I confirm that the modal and the embedded component are working as expected.

Image Image
Comment thread src/modules/add-site/components/pull-remote-site.tsx Outdated
@katinthehatsite
katinthehatsite merged commit a40edeb into trunk Dec 10, 2025
9 checks passed
@katinthehatsite
katinthehatsite deleted the fix/improve-background-screen-for-pull-no-sites branch December 10, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants