Skip to content

Commit

Permalink
Make the editor fullscreen by default (#20611)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad authored and jorgefilipecosta committed Mar 3, 2020
1 parent 1d1b55f commit 172f61d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/e2e-test-utils/src/create-new-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -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( () =>
Expand All @@ -40,4 +43,12 @@ export async function createNewPost( {

await page.reload();
}

if ( isFullscreenMode ) {
await page.evaluate( () =>
wp.data
.dispatch( 'core/edit-post' )
.toggleFeature( 'fullscreenMode' )
);
}
}
1 change: 1 addition & 0 deletions packages/edit-post/src/store/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export const PREFERENCES_DEFAULTS = {
fixedToolbar: false,
showInserterHelpPanel: true,
welcomeGuide: true,
fullscreenMode: true,
},
pinnedPluginItems: {},
hiddenBlockTypes: [],
Expand Down

0 comments on commit 172f61d

Please sign in to comment.