From b09ea9023887ed78bb1b3b5e6c1fd39bde0a0f59 Mon Sep 17 00:00:00 2001
From: Shaun Andrews
- { __( 'WordPress can power anything. What are you building?' ) }
+ { __( 'Start fresh or bring an existing site into your Studio.' ) }
- { __( 'Start fresh with a blank site and build it with AI' ) }
-
- { __(
- 'Pick a featured blueprint or drop in your own to provision plugins, content, and settings.'
- ) }
-
+ { __( 'Start fresh with a blank site and build it with AI' ) }
+
- { __( 'Import from a Jetpack backup or another full-site export' ) }
-
+ { __(
+ 'Pick a featured blueprint or drop in your own to provision plugins, content, and settings.'
+ ) }
+ { __( 'No blueprints found.' ) } { __( 'Loading featured blueprints…' ) }
- { __( 'No featured blueprints available right now.' ) }
- { __( 'Start a new site' ) }
+ { __( 'Add a site' ) }
{ __( 'Create new' ) }
- { __( 'Start from a blueprint' ) }
- { __( 'Build a new site' ) }
+ { __( 'Bring existing' ) }
- { __( 'Start from a blueprint' ) }
+
+
+ { __( 'Explore more blueprints' ) }
+
+ { filteredExploreBlueprints.map( ( item ) => (
+
+ ) }
+ { __( 'Upload your own' ) }
{ __( 'Featured blueprints' ) }
- { isFeaturedLoading && (
-
- { featured.map( ( item ) => (
-
- ) }
-
+ { __( 'New to WordPress.com?' ) }{ ' ' } + +
+ { isOffline && ( +{ __( "You're currently offline." ) }
+ ) } ++ { isSignedIn + ? __( 'Select a WordPress.com or Pressable site to bring into your Studio.' ) + : __( 'Connect your WordPress.com account to access your sites.' ) } +
+ + { ! isSignedIn && ! isAuthLoading &&{ __( 'Loading your sites…' ) }
+ ) } + { ! pickable.isLoading && sites.length === 0 && ( ++ { __( 'No syncable sites found on your WordPress.com account.' ) } +
+ ) } + { sites.length > 0 && ( ++ { __( 'Edit a WordPress.com or Pressable site locally, then push changes back' ) } +
+{ picked.excerpt }
}{ __( 'Loading your sites…' ) }
) } @@ -192,13 +232,44 @@ function OnboardingConnectPage() { { __( 'No syncable sites found on your WordPress.com account.' ) } ) } - { sites.length > 0 && ( -+ { sprintf( + // translators: %s is the search query. + __( 'No sites found for "%s"' ), + searchQuery + ) } +
+ ) } + { filteredSites.length > 0 && ( +{ __( 'Pick a name and local folder. The backup will restore on top of this new site.' ) } @@ -236,10 +236,12 @@ function OnboardingImportPage() { initialValues={ initialValues } existingDomainNames={ existingDomainNames ?? [] } onSubmit={ handleSubmit } - onCancel={ () => void navigate( { to: '/onboarding' } ) } + onCancel={ handleBackToSelect } + cancelLabel={ __( 'Back' ) } isSubmitting={ isSubmitting } submitError={ submitError } submitLabel={ __( 'Import site' ) } + actionsPlacement="floating" />
- { __( - 'Pick a featured Blueprint or drop in your own to provision plugins, content, and settings.' - ) } + { __( 'Start with an empty site or choose a template.' ) }
{ __( 'Loading your sites…' ) }
) } - { ! pickable.isLoading && sites.length === 0 && ( + { ! syncable.isLoading && sites.length === 0 && (- { __( 'No syncable sites found on your WordPress.com account.' ) } + { __( 'No WordPress.com sites found on this account.' ) }
) } - { ! pickable.isLoading && sites.length > 0 && filteredSites.length === 0 && ( + { ! syncable.isLoading && sites.length > 0 && filteredSites.length === 0 && (
{ sprintf(
// translators: %s is the search query.
@@ -274,10 +314,10 @@ function OnboardingConnectPage() {
type="button"
variant="minimal"
tone="neutral"
- onClick={ () => void pickable.refetch() }
- disabled={ pickable.isFetching || isConnecting }
+ onClick={ () => void syncable.refetch() }
+ disabled={ syncable.isFetching || isConnecting }
>
- { pickable.isFetching ? __( 'Refreshing…' ) : __( 'Refresh sites' ) }
+ { syncable.isFetching ? __( 'Refreshing…' ) : __( 'Refresh sites' ) }
- { __( 'Start fresh with a blank site and build it with AI' ) } -
-{ __( - 'Pick a featured blueprint or drop in your own to provision plugins, content, and settings.' + 'Start from scratch or use a blueprint. Perfect for theme and plugin development.' ) }
+
{ __( 'Loading your sites…' ) }
) } @@ -281,18 +447,31 @@ function OnboardingConnectPage() { ) } ) } - { filteredSites.length > 0 && ( -{ section.description }
+ ) } +{ __( 'No blueprints found.' ) }
- ) : ( -{ __( 'No blueprints found.' ) }
+ ) : ( +
{ __( 'Start with an empty site or choose a template.' ) }
From 0fc61719fafc1d2b902ae5bbb37ce32bfa8c6979 Mon Sep 17 00:00:00 2001
From: Shaun Andrews { __( 'No blueprints found.' ) } { __( 'No blueprints found.' ) }
+
- { isSignedIn
- ? __( 'Select a WordPress.com or Pressable site to bring into your Studio.' )
- : __( 'Connect your WordPress.com account to access your sites.' ) }
+ { ! isSignedIn && __( 'Connect your WordPress.com account to access your sites.' ) }
+ { isSignedIn &&
+ ( isSingleSite
+ ? __( 'Ready to bring into your Studio.' )
+ : __( 'Select a WordPress.com or Pressable site to bring into your Studio.' ) ) }
- { __( 'Loading your sites…' ) }
+ { __( 'No WordPress.com sites found on this account.' ) }
+ { __( 'Loading your sites…' ) }
- { __( 'No WordPress.com sites found on this account.' ) }
-
@@ -448,30 +483,43 @@ function OnboardingConnectPage() {
{ section.description } { section.description }
+ { __( 'Get started quickly with a one of our blueprints, or' ) }{ ' ' }
+
+ { uploadError }
+ { __( 'No blueprints found.' ) }{ __( 'Explore more blueprints' ) }
- { __( 'Explore more blueprints' ) }
+
+ { filteredExploreBlueprints.map( ( item ) => (
+
+ ) ) }
+ { __( 'Upload your own' ) }
+
- { filteredExploreBlueprints.map( ( item ) => (
-
- ) ) }
-
- ) }
-
- { __( 'Upload your own' ) }
- { __( 'Connect a site' ) }
+
+ { isSignedIn && isSingleSite ? __( 'Connect your site' ) : __( 'Connect a site' ) }
+
{ section.title }
- { section.description && (
-
- { section.sites.map( ( site ) => (
-
-
+
+ { helperLinks }
+ { section.title }
+ { section.description && (
+
+ { section.sites.map( ( site ) => (
+
+
) : (
@@ -161,9 +161,9 @@ export function BlueprintSelector( {
onPickEmpty,
}: BlueprintSelectorProps ) {
const connector = useConnector();
+ const uploadInputRef = useRef< HTMLInputElement | null >( null );
+ const handleGridKeyDown = useGridArrowNavigation();
const [ uploadError, setUploadError ] = useState< string | null >( null );
- const [ searchQuery, setSearchQuery ] = useState( '' );
- const [ isExploreOpen, setIsExploreOpen ] = useState( false );
// The endpoint returns blueprints oldest-first; newest-first reads better
// in the Explore grid (matches the desktop renderer).
@@ -182,21 +182,6 @@ export function BlueprintSelector( {
[ allBlueprints ]
);
- const filteredExploreBlueprints = useMemo( () => {
- const query = searchQuery.toLowerCase().trim();
- if ( ! query ) {
- return exploreBlueprints;
- }
- return exploreBlueprints.filter( ( blueprint ) => {
- const titleMatch = blueprint.title.toLowerCase().includes( query );
- const excerptMatch = blueprint.excerpt.toLowerCase().includes( query );
- const categoryMatch = getBlueprintCategories( blueprint ).some( ( category ) =>
- category.toLowerCase().includes( query )
- );
- return titleMatch || excerptMatch || categoryMatch;
- } );
- }, [ exploreBlueprints, searchQuery ] );
-
const handleFeaturedClick = useCallback(
( item: FeaturedBlueprint ) => {
setUploadError( null );
@@ -317,10 +302,35 @@ export function BlueprintSelector( {
[ acceptParsedBlueprint, connector ]
);
+ // Callers advertise "drop in your own", so the whole selector accepts
+ // blueprint drops; any validation error renders next to the Upload
+ // button above the explore grid.
+ const handleRootDrop = useCallback(
+ ( event: React.DragEvent< HTMLDivElement > ) => {
+ if ( event.defaultPrevented ) {
+ return;
+ }
+ event.preventDefault();
+ const file = event.dataTransfer.files[ 0 ];
+ if ( ! file ) {
+ return;
+ }
+ void handleFile( file );
+ },
+ [ handleFile ]
+ );
+
return (
-
+
{ __( 'More blueprints' ) }
+
-
{ __( 'Explore more blueprints' ) }
-
- { filteredExploreBlueprints.map( ( item ) => (
-
- ) ) }
- { __( 'Upload your own' ) }
-