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: Start in Select mode #30187

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
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
10 changes: 8 additions & 2 deletions packages/edit-site/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ import {
Button,
} from '@wordpress/components';
import { EntityProvider } from '@wordpress/core-data';
import { BlockContextProvider, BlockBreadcrumb } from '@wordpress/block-editor';
import {
BlockContextProvider,
BlockBreadcrumb,
store as blockEditorStore,
} from '@wordpress/block-editor';
import {
FullscreenMode,
InterfaceSkeleton,
Expand Down Expand Up @@ -67,7 +71,7 @@ function Editor( { initialSettings } ) {

// Prefetch and parse patterns. This ensures patterns are loaded and parsed when
// the editor is loaded rather than degrading the performance of the inserter.
select( 'core/block-editor' ).__experimentalGetAllowedPatterns();
select( blockEditorStore ).__experimentalGetAllowedPatterns();

// The currently selected entity to display. Typically template or template part.
return {
Expand All @@ -94,8 +98,10 @@ function Editor( { initialSettings } ) {
const { setPage, setIsInserterOpened, updateSettings } = useDispatch(
editSiteStore
);
const { setNavigationMode } = useDispatch( blockEditorStore );
useEffect( () => {
updateSettings( initialSettings );
setNavigationMode( true );
}, [] );

// Keep the defaultTemplateTypes in the core/editor settings too,
Expand Down