From c866c1c411c44468ae06f76bba6aaaa68cfb47b5 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Thu, 23 Jun 2022 18:00:43 +1000 Subject: [PATCH 1/3] Improvements to "inherit default layout" toggle --- packages/block-editor/src/hooks/layout.js | 29 ++++++++++++++++------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js index 7fbb4a0a662c22..9467669f86801b 100644 --- a/packages/block-editor/src/hooks/layout.js +++ b/packages/block-editor/src/hooks/layout.js @@ -130,15 +130,26 @@ function LayoutPanel( { setAttributes, attributes, name: blockName } ) { { showInheritToggle && ( - - setAttributes( { - layout: { inherit: ! inherit }, - } ) - } - /> + <> + + setAttributes( { + layout: { inherit: ! inherit }, + } ) + } + /> +

+ { !! inherit + ? __( + 'Nested blocks use default content width with options for full and wide widths.' + ) + : __( + 'Nested blocks will fill the width of this container' + ) } +

+ ) } { ! inherit && allowSwitching && ( From f37c91e2897fddc15f7c76c4bb384d6a254ed20f Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Fri, 24 Jun 2022 15:21:42 +1000 Subject: [PATCH 2/3] Update copy --- packages/block-editor/src/hooks/layout.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js index 9467669f86801b..c0ded1da609efd 100644 --- a/packages/block-editor/src/hooks/layout.js +++ b/packages/block-editor/src/hooks/layout.js @@ -132,7 +132,7 @@ function LayoutPanel( { setAttributes, attributes, name: blockName } ) { { showInheritToggle && ( <> setAttributes( { @@ -143,7 +143,7 @@ function LayoutPanel( { setAttributes, attributes, name: blockName } ) {

{ !! inherit ? __( - 'Nested blocks use default content width with options for full and wide widths.' + 'Nested blocks use theme content width with options for full and wide widths.' ) : __( 'Nested blocks will fill the width of this container' From ec8e977c369c58d9f3d09e2fe0e630cf0d62d490 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Mon, 27 Jun 2022 02:17:27 +0100 Subject: [PATCH 3/3] Update packages/block-editor/src/hooks/layout.js Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com> --- packages/block-editor/src/hooks/layout.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js index c0ded1da609efd..c5072200869ed2 100644 --- a/packages/block-editor/src/hooks/layout.js +++ b/packages/block-editor/src/hooks/layout.js @@ -146,7 +146,7 @@ function LayoutPanel( { setAttributes, attributes, name: blockName } ) { 'Nested blocks use theme content width with options for full and wide widths.' ) : __( - 'Nested blocks will fill the width of this container' + 'Nested blocks will fill the width of this container.' ) }