Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site Editor: Add context for templates that can not be previewed #64050

Closed
wants to merge 6 commits into from
16 changes: 14 additions & 2 deletions packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ import { store as noticesStore } from '@wordpress/notices';
import { privateApis as routerPrivateApis } from '@wordpress/router';
import { store as preferencesStore } from '@wordpress/preferences';
import { decodeEntities } from '@wordpress/html-entities';
import { Icon, arrowUpLeft } from '@wordpress/icons';
import { Warning } from '@wordpress/block-editor';
import { Icon, homeButton, arrowUpLeft } from '@wordpress/icons';
import { store as blockEditorStore } from '@wordpress/block-editor';

/**
Expand Down Expand Up @@ -214,7 +215,18 @@ export default function EditSiteEditor( { isPostsList = false } ) {
/>
<EditorKeyboardShortcutsRegister />
{ isEditMode && <BlockKeyboardShortcuts /> }
{ ! isReady ? <CanvasLoader id={ loadingProgressId } /> : null }
{ ! isReady ? (
<>
{ ! editedPostType && (
<Warning className="editor-error-boundary">
{ __(
'The template you are currently using is not compatible with the Site Editor.'
) }
</Warning>
) }
<CanvasLoader id={ loadingProgressId } />
</>
) : null }
{ isEditMode && (
<WelcomeGuide
postType={ postWithTemplate ? context.postType : postType }
Expand Down
Loading