Skip to content

Studio: Refresh the CTA for users without sites - #2038

Merged
katinthehatsite merged 15 commits into
trunkfrom
add/modal-for-when-no-sites-are-found
Nov 19, 2025
Merged

Studio: Refresh the CTA for users without sites#2038
katinthehatsite merged 15 commits into
trunkfrom
add/modal-for-when-no-sites-are-found

Conversation

@katinthehatsite

@katinthehatsite katinthehatsite commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

Related issues

Closes STU-912

Proposed Changes

This PR adds a modal with call to action for users that don't have any WP.com sites:

Screenshot 2025-11-07 at 4 08 17 PM

Original design: RToz6tIuQ7nlZrikBte4GU-fi-10114_134320 (minus the image on the top as we are not supposed to have the image there.

I made a small change to the design with the modal title:

  • firstly, we should not really use the logo in the title, it does not work well as it is too large to use with the default title size and it does not work with that type
  • we could do the logo in the title but we need to do some CSS to achieve that look (which I can do if we really want that)
  • I was trying to find a simpler solution that features the logo but does not require a whole lot of customizations (this is open for discussion along with the copy)

Testing Instructions

  • Pull the changes from this branch
  • Apply the following diff
index cc226545..5e39a4cd 100644
--- a/src/hooks/use-fetch-wpcom-sites/index.tsx
+++ b/src/hooks/use-fetch-wpcom-sites/index.tsx
@@ -233,8 +233,9 @@ export const useFetchWpComSites = ( connectedSiteIdsOnlyForSelectedSite: number[
                [ rawSyncSites, memoizedConnectedSiteIds ]
        );
        return {
-               syncSites: syncSitesWithSyncSupportForSelectedSite,
+               syncSites: [],
                isFetching: isFetchingSites.current,
                refetchSites: fetchSites,
        };
  • Navigate to Sync tab
  • Click on Publish site or Pull site
  • See the loading state on either of the buttons (this is new because instead of fetching the WP.com sites in the sync modal and seeing the loading state there right away, we are fetching them first and then deciding which modal to fetch)
  • Confirm that you can see the modal for no sites appear
  • Remove the diff that you applied
  • Click on the button again
  • Confirm that you see the sync modal
  • Finally, navigate to a Studio site which already has some sites connected
  • Click on Connect another site button
  • Confirm that you can see the sync modal

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
@katinthehatsite katinthehatsite self-assigned this Nov 7, 2025
@katinthehatsite
katinthehatsite marked this pull request as draft November 7, 2025 13:05
@katinthehatsite katinthehatsite changed the title Studio: Refresh the CTA for users without sites. Nov 7, 2025
@github-actions

github-actions Bot commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

📊 Performance Test Results

Comparing 4c74834 vs trunk

site-editor

Metric trunk 4c74834 Diff Change
load 16433.00 ms 11429.00 ms -5004.00 ms 🟢 -30.5%

site-startup

Metric trunk 4c74834 Diff Change
siteCreation 22281.00 ms 25304.00 ms +3023.00 ms 🔴 13.6%
siteStartup 9009.00 ms 11018.00 ms +2009.00 ms 🔴 22.3%

Results are median values from multiple test runs.

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

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@sejas I am leaving this as draft for now, just wanted to get your thoughts on design and copy for now. What do you think?

sejas commented Nov 7, 2025

Copy link
Copy Markdown
Member

Sounds good! Thanks for working in this issue. I'll give it an early review.

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@sejas One more question - I guess with the new design, we should now display this modal when the user clicks on either of those buttons, right?

Screenshot 2025-11-07 at 5 15 28 PM

sejas commented Nov 7, 2025

Copy link
Copy Markdown
Member

Yes! both buttons will trigger the same modal if the user doesn't have any WPcom site.

@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.

firstly, we should not really use the logo in the title, it does not work well as it is too large to use with the default title size and it does not work with that type

@katinthehatsite , I think the default title is fine without any customizations, and we can move the WPcom logo to the description. 👍

Could you rebase the branch and move it to ready for review?

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@katinthehatsite , I think the default title is fine without any customizations, and we can move the WPcom logo to the description. 👍
Could you rebase the branch and move it to ready for review?

Awesome, on it 👍

@katinthehatsite

Copy link
Copy Markdown
Contributor Author

@sejas Feel free to review, I will test closer tomorrow once again before opening it for the team testing.

tooltipText={
isAnySiteSyncing
pendingModalMode === 'pull'
? __( 'Please wait for the current operation to finish.' )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Technically, we don't need this tooltip here but I added it in case it is not clear for the user. We can remove it if not needed

<div className="flex justify-center items-center h-full">
{ searchQuery
? sprintf( __( 'No sites found for "%s"' ), searchQuery )
: __( 'No sites found' ) }

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed this fallback since if there are no sites found without searchQuery, we should always get the modal with NoWpcomSitesModal

@katinthehatsite
katinthehatsite marked this pull request as ready for review November 19, 2025 10:27

@nightnei nightnei left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Left just 1 small comment

LGTM and works as expected 👍

Screenshot 2025-11-19 at 14 11 40
Comment thread src/modules/sync/components/create-button.tsx Outdated
@katinthehatsite
katinthehatsite merged commit 654da78 into trunk Nov 19, 2025
10 checks passed
@katinthehatsite
katinthehatsite deleted the add/modal-for-when-no-sites-are-found branch November 19, 2025 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants