From 454d5ec798a09ea57088898d666bd7f1f28173c0 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 3 Mar 2020 18:53:48 +0100 Subject: [PATCH 1/2] Make the editor fullscreen by default --- packages/edit-post/src/store/defaults.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/edit-post/src/store/defaults.js b/packages/edit-post/src/store/defaults.js index 1c252d42a573c..cbd1c8c3eb729 100644 --- a/packages/edit-post/src/store/defaults.js +++ b/packages/edit-post/src/store/defaults.js @@ -10,6 +10,7 @@ export const PREFERENCES_DEFAULTS = { fixedToolbar: false, showInserterHelpPanel: true, welcomeGuide: true, + fullscreenMode: true, }, pinnedPluginItems: {}, hiddenBlockTypes: [], From cf5a45910c89ed47df9d222a5ad36256cc00e5c3 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 3 Mar 2020 19:30:27 +0100 Subject: [PATCH 2/2] Fix e2e tests --- packages/e2e-test-utils/src/create-new-post.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/e2e-test-utils/src/create-new-post.js b/packages/e2e-test-utils/src/create-new-post.js index 7e5b8a9a28710..602a470de51d2 100644 --- a/packages/e2e-test-utils/src/create-new-post.js +++ b/packages/e2e-test-utils/src/create-new-post.js @@ -32,6 +32,9 @@ export async function createNewPost( { const isWelcomeGuideActive = await page.evaluate( () => wp.data.select( 'core/edit-post' ).isFeatureActive( 'welcomeGuide' ) ); + const isFullscreenMode = await page.evaluate( () => + wp.data.select( 'core/edit-post' ).isFeatureActive( 'fullscreenMode' ) + ); if ( showWelcomeGuide !== isWelcomeGuideActive ) { await page.evaluate( () => @@ -40,4 +43,12 @@ export async function createNewPost( { await page.reload(); } + + if ( isFullscreenMode ) { + await page.evaluate( () => + wp.data + .dispatch( 'core/edit-post' ) + .toggleFeature( 'fullscreenMode' ) + ); + } }