From 763c9917024cc89706ef3b8035a7947cff9f040f Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Mon, 22 Jul 2024 15:04:56 -0400 Subject: [PATCH 1/3] add conditional to not output lines when distraction free --- packages/block-editor/src/components/block-list/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/components/block-list/index.js b/packages/block-editor/src/components/block-list/index.js index 37dba80511d920..164d8afa84af92 100644 --- a/packages/block-editor/src/components/block-list/index.js +++ b/packages/block-editor/src/components/block-list/index.js @@ -58,9 +58,9 @@ function Root( { className, ...settings } ) { getTemporarilyEditingAsBlocks, isTyping, } = unlock( select( blockEditorStore ) ); - const { outlineMode, focusMode } = getSettings(); + const { outlineMode, focusMode, isDistractionFree } = getSettings(); return { - isOutlineMode: outlineMode && ! isTyping(), + isOutlineMode: outlineMode && ! isTyping() && ! isDistractionFree, isFocusMode: focusMode, editorMode: __unstableGetEditorMode(), temporarilyEditingAsBlocks: getTemporarilyEditingAsBlocks(), From ef669f9e7eade609bc65237f3189d72443188254 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Mon, 22 Jul 2024 15:05:25 -0400 Subject: [PATCH 2/3] Update index.js --- packages/block-editor/src/components/block-list/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-list/index.js b/packages/block-editor/src/components/block-list/index.js index 164d8afa84af92..2333a1c86766cd 100644 --- a/packages/block-editor/src/components/block-list/index.js +++ b/packages/block-editor/src/components/block-list/index.js @@ -60,7 +60,7 @@ function Root( { className, ...settings } ) { } = unlock( select( blockEditorStore ) ); const { outlineMode, focusMode, isDistractionFree } = getSettings(); return { - isOutlineMode: outlineMode && ! isTyping() && ! isDistractionFree, + isOutlineMode: outlineMode && ! isDistractionFree && ! isTyping(), isFocusMode: focusMode, editorMode: __unstableGetEditorMode(), temporarilyEditingAsBlocks: getTemporarilyEditingAsBlocks(), From bfaac73e39766d812c6896b0db815196f2901119 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Mon, 22 Jul 2024 15:08:49 -0400 Subject: [PATCH 3/3] make change for outlineMode instead --- packages/block-editor/src/components/block-list/index.js | 4 ++-- .../src/components/provider/use-block-editor-settings.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/block-list/index.js b/packages/block-editor/src/components/block-list/index.js index 2333a1c86766cd..37dba80511d920 100644 --- a/packages/block-editor/src/components/block-list/index.js +++ b/packages/block-editor/src/components/block-list/index.js @@ -58,9 +58,9 @@ function Root( { className, ...settings } ) { getTemporarilyEditingAsBlocks, isTyping, } = unlock( select( blockEditorStore ) ); - const { outlineMode, focusMode, isDistractionFree } = getSettings(); + const { outlineMode, focusMode } = getSettings(); return { - isOutlineMode: outlineMode && ! isDistractionFree && ! isTyping(), + isOutlineMode: outlineMode && ! isTyping(), isFocusMode: focusMode, editorMode: __unstableGetEditorMode(), temporarilyEditingAsBlocks: getTemporarilyEditingAsBlocks(), diff --git a/packages/editor/src/components/provider/use-block-editor-settings.js b/packages/editor/src/components/provider/use-block-editor-settings.js index 231e2df8f91e4d..023c9dcc302812 100644 --- a/packages/editor/src/components/provider/use-block-editor-settings.js +++ b/packages/editor/src/components/provider/use-block-editor-settings.js @@ -311,7 +311,7 @@ function useBlockEditorSettings( settings, postType, postId, renderingMode ) { __experimentalUndo: undo, // Check whether we want all site editor frames to have outlines // including the navigation / pattern / parts editors. - outlineMode: postType === 'wp_template', + outlineMode: ! isDistractionFree && postType === 'wp_template', // Check these two properties: they were not present in the site editor. __experimentalCreatePageEntity: createPageEntity, __experimentalUserCanCreatePages: userCanCreatePages,