Skip to content
8 changes: 4 additions & 4 deletions common/lib/blueprint-validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ const UNSUPPORTED_BLUEPRINT_FEATURES: UnsupportedFeature[] = [
{
type: 'step',
name: 'enableMultisite',
reason: __( 'Multisite functionality is not currently supported in Studio' ),
reason: __( 'Multisite functionality is not currently supported in Studio.' ),
},
{
type: 'step',
name: 'login',
reason: __( 'Studio automatically creates and logs in the admin user during site creation' ),
reason: __( 'Studio automatically creates and logs in the admin user during site creation.' ),
},
{
type: 'step',
name: 'defineSiteUrl',
reason: __(
'Studio manages site URLs internally and cannot accept custom URLs from blueprints'
'Custom site URLs in blueprints are ignored. You can set a custom site URL on the Settings tab.'
),
},
];
Expand All @@ -38,7 +38,7 @@ const UNSUPPORTED_BLUEPRINT_PROPERTIES: UnsupportedFeature[] = [
{
type: 'property',
name: 'landingPage',
reason: __( 'Studio manages its own navigation and landing pages' ),
reason: __( 'Studio manages its own navigation and landing pages.' ),
},
];

Expand Down
39 changes: 20 additions & 19 deletions src/modules/add-site/components/blueprint-warning-notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
Modal,
Notice,
} from '@wordpress/components';
import { Icon, caution } from '@wordpress/icons';
import { Icon, caution, check } from '@wordpress/icons';
import { useI18n } from '@wordpress/react-i18n';
import { useState } from 'react';
import { BlueprintValidationWarning } from 'common/lib/blueprint-validation';
Expand All @@ -33,40 +33,41 @@ function BlueprintIssuesModal( {
return (
<Modal
className="blueprints-issues-modal"
title={ __( 'Blueprint Details' ) }
title={ __( 'Blueprint details' ) }
onRequestClose={ onClose }
size="medium"
>
<div className="h-full flex flex-col gap-1">
<Text className="font-medium text-gray-900">{ fileName }</Text>
<VStack spacing={ 6 } className="h-full">
<div className="flex items-center">
<Icon className="fill-a8c-blue-50 me-2 shrink-0" icon={ check } />
<Text className="font-medium text-gray-900">{ fileName }</Text>
</div>
<Text>
{ warnings?.length &&
__(
'The following features are not supported in Studio and will be automatically removed:'
) }
</Text>
<div className="flex-1 overflow-y-auto">
<VStack spacing={ 3 } className="divide-y divide-gray-200">
<VStack spacing={ 3 }>
{ warnings?.map( ( warningItem, index ) => (
<div key={ index } className={ index > 0 ? 'pt-3' : '' }>
<HStack alignment="topLeft" spacing={ 2 }>
<Icon
icon={ caution }
className="text-orange-500 mt-1 flex-shrink-0"
size={ 20 }
/>
<VStack spacing={ 1 }>
<Text weight={ 600 } className="text-base">
{ warningItem.feature }
</Text>
<Text className="text-sm text-gray-700">{ warningItem.reason }</Text>
<div
key={ index }
className="rounded-sm p-3 border border-gray-200"
style={ { backgroundColor: 'color-mix(in srgb, #d47608 4%, transparent)' } }
>
<HStack alignment="flex-start" spacing={ 2 }>
<Icon icon={ caution } className="fill-[#a77f30] shrink-0 w-6 h-6" />
<VStack spacing={ 1 } className="flex-grow py-0.5">
<Text weight={ 500 }>{ warningItem.feature }</Text>
<div>{ warningItem.reason }</div>
</VStack>
</HStack>
</div>
) ) }
</VStack>
</div>
<div className="pt-4 border-t border-gray-200">
<div>
<Text className="text-sm text-gray-600">
{ __(
'Your Blueprint will still work, but these features will be skipped during site creation.'
Expand All @@ -78,7 +79,7 @@ function BlueprintIssuesModal( {
{ __( 'Got it' ) }
</Button>
</HStack>
</div>
</VStack>
</Modal>
);
}
Expand Down