Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b09ea90
apps/ui: handle add-site menu event and blueprint deeplinks
shaunandrews Jun 10, 2026
f775e43
apps/ui: port Add Site visual design to classic onboarding
shaunandrews Jun 10, 2026
86e09b3
apps/ui: replace free-text WordPress version field with a version sel…
shaunandrews Jun 10, 2026
bbf8298
apps/ui: bring blueprint gallery to parity with the desktop Add Site …
shaunandrews Jun 10, 2026
e2b5a84
apps/ui: add Connect a site onboarding flow
shaunandrews Jun 10, 2026
65fc8f5
apps/ui: announce site creation and collision-check seeded site names
shaunandrews Jun 10, 2026
3a12e58
apps/ui: fix illustration sizing and onboarding overflow found in vis…
shaunandrews Jun 10, 2026
4def510
apps/ui: onboarding feedback round — fixed footer, centering, transit…
shaunandrews Jun 10, 2026
392ba28
apps/ui: onboarding review round two — three flow cards, dark-mode fo…
shaunandrews Jun 10, 2026
98366f0
apps/ui: full grouped site picker for Connect a site
shaunandrews Jun 10, 2026
2c7bd91
apps/ui: tidy the Build a new site gallery
shaunandrews Jun 10, 2026
0fc6171
apps/ui: gallery polish — eye preview buttons, upload joins the accor…
shaunandrews Jun 10, 2026
5a03931
apps/ui: stack the Add a site cards on narrow windows
shaunandrews Jun 10, 2026
ee7c0fc
apps/ui: drag the window from the onboarding edges
shaunandrews Jun 10, 2026
ee0fe2a
apps/ui: count-aware layouts for the Connect a site picker
shaunandrews Jun 10, 2026
e8a1874
apps/ui: mouse nav buttons, CTA scrim, and roomier Connect picker
shaunandrews Jun 10, 2026
14631a3
apps/studio: move environment and mshots helpers to tools/common
shaunandrews Jun 11, 2026
873e1d3
tools/common: mark already-connected sites and fix syncable-sites pag…
shaunandrews Jun 11, 2026
2831dc1
apps/ui: resolve seeded site names in the main process
shaunandrews Jun 11, 2026
2b4da67
apps/ui: generalize pending handoffs into subscribable slots
shaunandrews Jun 11, 2026
10e7dd1
apps/ui: declare @wordpress/a11y as a direct dependency
shaunandrews Jun 11, 2026
5e5c0f9
apps/ui: grid arrow-key navigation hook and focus-ring fixes
shaunandrews Jun 11, 2026
e2d1c7b
apps/ui: onboarding polish — gallery upload, form busy states, connec…
shaunandrews Jun 11, 2026
671b12d
apps/ui: desks onboarding reuses the classic onboarding pages
shaunandrews Jun 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/studio/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const AUTO_UPDATE_INTERVAL_MS = 60 * 60 * 1000;
export const NIGHTLY_UPDATE_TTL_MS = 24 * 60 * 60 * 1000;
export const MACOS_TRAFFIC_LIGHT_POSITION = { x: 20, y: 20 };
export const WINDOWS_TITLEBAR_HEIGHT = 44;
export const EMPTY_SITE_PLAYGROUND_URL = 'https://playground.wordpress.net/';
export { EMPTY_SITE_PLAYGROUND_URL } from '@studio/common/constants';
export const ABOUT_WINDOW_WIDTH = 300;
export const ABOUT_WINDOW_HEIGHT = 350;
export const BUG_REPORT_URL =
Expand Down
46 changes: 5 additions & 41 deletions apps/studio/src/modules/add-site/components/new-site-options.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import {
curateBlueprintsForDisplay,
FEATURED_BLUEPRINT_SLUGS,
} from '@studio/common/lib/blueprint-curation';
import {
__experimentalVStack as VStack,
__experimentalHeading as Heading,
Expand Down Expand Up @@ -172,46 +176,6 @@ function BlueprintCard( {
);
}

const BLUEPRINT_DISPLAY_NAMES: Record< string, string > = {
'Quick Start': 'WordPress.com',
Development: 'WordPress Dev',
Commerce: 'WooCommerce',
};

function getBlueprintExcerptOverrides( __: ( text: string ) => string ): Record< string, string > {
return {
'Quick Start': __(
'A WordPress.com-like environment with Business plan plugins and themes pre-installed.'
),
Commerce: __(
'Create your next online store with WooCommerce and its companion plugins pre-installed.'
),
Development: __( 'A streamlined environment for building and testing themes or plugins.' ),
};
}

const BLUEPRINT_ORDER: Record< string, number > = {
'Quick Start': 1,
Commerce: 2,
Development: 3,
};

const FEATURED_BLUEPRINT_SLUGS = new Set( [ 'woo-shop', 'development', 'quick-start' ] );

function renameBlueprintsForDisplay(
blueprints: Blueprint[],
__: ( text: string ) => string
): Blueprint[] {
const excerptOverrides = getBlueprintExcerptOverrides( __ );
return [ ...blueprints ]
.sort( ( a, b ) => ( BLUEPRINT_ORDER[ a.title ] ?? 99 ) - ( BLUEPRINT_ORDER[ b.title ] ?? 99 ) )
.map( ( item ) => ( {
...item,
excerpt: excerptOverrides[ item.title ] || item.excerpt,
title: BLUEPRINT_DISPLAY_NAMES[ item.title ] || item.title,
} ) );
}

export function NewSiteOptions( {
enableBlueprints,
blueprints,
Expand Down Expand Up @@ -289,7 +253,7 @@ export function NewSiteOptions( {
</div>
) : (
enableBlueprints &&
renameBlueprintsForDisplay( featuredBlueprints, __ ).map( ( item ) => (
curateBlueprintsForDisplay( featuredBlueprints, __ ).map( ( item ) => (
<BlueprintCard
key={ item.slug }
blueprint={ item }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getEnvironmentLabel, EnvironmentType } from '@studio/common/lib/sync/environment-utils';
import { __ } from '@wordpress/i18n';
import { Badge } from 'src/components/badge';
import { cx } from 'src/lib/cx';
import { getEnvironmentLabel, EnvironmentType } from 'src/modules/sync/lib/environment-utils';

interface EnvironmentBadgeProps {
type: EnvironmentType;
Expand Down
2 changes: 1 addition & 1 deletion apps/studio/src/modules/sync/components/site-name-box.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EnvironmentBadge, StudioBadge } from 'src/modules/sync/components/environment-badge';
import type { EnvironmentType } from 'src/modules/sync/lib/environment-utils';
import type { EnvironmentType } from '@studio/common/lib/sync/environment-utils';

type SiteNameBoxProps = {
siteName: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getSiteEnvironment } from '@studio/common/lib/sync/environment-utils';
import { Icon } from '@wordpress/components';
import { createInterpolateElement } from '@wordpress/element';
import { sprintf } from '@wordpress/i18n';
Expand Down Expand Up @@ -34,7 +35,6 @@ import {
convertTreeToPullOptions,
convertTreeToPushOptions,
} from 'src/modules/sync/lib/convert-tree-to-sync-options';
import { getSiteEnvironment } from 'src/modules/sync/lib/environment-utils';
import { useAppDispatch, useI18nLocale, useRootSelector } from 'src/stores';
import {
syncOperationsSelectors,
Expand Down
2 changes: 1 addition & 1 deletion apps/studio/src/modules/sync/components/sync-dialog.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { PRESSABLE_PHP_VERSION } from '@studio/common/constants';
import { SYNC_PUSH_SIZE_LIMIT_GB } from '@studio/common/lib/sync/constants';
import { getSiteEnvironment } from '@studio/common/lib/sync/environment-utils';
import {
Icon,
SelectControl,
Expand Down Expand Up @@ -29,7 +30,6 @@ import { SiteNameBox } from 'src/modules/sync/components/site-name-box';
import { useSelectedItemsPushSize } from 'src/modules/sync/hooks/use-selected-items-push-size';
import { useSyncDialogTexts } from 'src/modules/sync/hooks/use-sync-dialog-texts';
import { useTopLevelSyncTree } from 'src/modules/sync/hooks/use-top-level-sync-tree';
import { getSiteEnvironment } from 'src/modules/sync/lib/environment-utils';
import { useI18nLocale } from 'src/stores';
import {
useHostingPhpVersion,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getSiteEnvironment } from '@studio/common/lib/sync/environment-utils';
import { Icon, SearchControl as SearchControlWp, Spinner } from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
import { useI18n } from '@wordpress/react-i18n';
Expand All @@ -17,7 +18,6 @@ import { getLocalizedLink } from 'src/lib/get-localized-link';
import { CreateButton } from 'src/modules/sync/components/create-button';
import { EnvironmentBadge } from 'src/modules/sync/components/environment-badge';
import { NoWpcomSitesModal } from 'src/modules/sync/components/no-wpcom-sites-modal';
import { getSiteEnvironment } from 'src/modules/sync/lib/environment-utils';
import { useI18nLocale, useRootSelector } from 'src/stores';
import {
connectedSitesSelectors,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { getSiteEnvironment } from '@studio/common/lib/sync/environment-utils';
import { getMshotUrl } from '@studio/common/lib/sync/mshots';
import { Icon, SearchControl as SearchControlWp, Spinner } from '@wordpress/components';
import { __, sprintf } from '@wordpress/i18n';
import { useI18n } from '@wordpress/react-i18n';
Expand All @@ -15,7 +17,6 @@ import { getLocalizedLink } from 'src/lib/get-localized-link';
import { CreateButton } from 'src/modules/sync/components/create-button';
import { EnvironmentBadge } from 'src/modules/sync/components/environment-badge';
import { NoWpcomSitesModal } from 'src/modules/sync/components/no-wpcom-sites-modal';
import { getSiteEnvironment } from 'src/modules/sync/lib/environment-utils';
import { useI18nLocale, useRootSelector } from 'src/stores';
import {
connectedSitesSelectors,
Expand Down Expand Up @@ -418,10 +419,6 @@ function ListSites( {
);
}

function getMshotUrl( siteUrl: string ): string {
return `https://s0.wp.com/mshots/v1/${ encodeURIComponent( siteUrl ) }?w=600&h=400`;
}

function SiteThumbnail( {
site,
isDisabled,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { EnvironmentType } from '@studio/common/lib/sync/environment-utils';
import { useI18n } from '@wordpress/react-i18n';
import { useMemo } from 'react';
import { EnvironmentType } from 'src/modules/sync/lib/environment-utils';

type TextByEnvironment = {
[ key in EnvironmentType ]: {
Expand Down
6 changes: 5 additions & 1 deletion apps/studio/src/modules/sync/lib/ipc-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,11 @@ export async function fetchSyncableWpcomSites( _event: IpcMainInvokeEvent ): Pro
if ( ! token?.accessToken ) {
throw new Error( 'Authentication required to fetch WordPress.com sites.' );
}
return fetchSyncableSites( token.accessToken );
// Pass the already-connected remote IDs so the transform can mark those
// sites 'already-connected' instead of offering them as syncable again.
const connectedSites = await getAllConnectedWpcomSitesForCurrentUser();
const connectedSiteIds = connectedSites.map( ( site ) => site.id );
return fetchSyncableSites( token.accessToken, { connectedSiteIds } );
}

export async function getConnectedWpcomSites(
Expand Down
1 change: 1 addition & 0 deletions apps/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@tanstack/react-query": "^5.75.5",
"@tanstack/react-query-persist-client": "^5.96.2",
"@tanstack/react-router": "^1.120.14",
"@wordpress/a11y": "^4.47.0",
"@wordpress/api-fetch": "^7.47.0",
"@wordpress/components": "^34.0.0",
"@wordpress/core-data": "^7.47.0",
Expand Down
Loading
Loading