From 1a5dbb49d494102e32c567d9295564d4cd0c328d Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 25 Jun 2020 21:54:08 +0200 Subject: [PATCH 1/6] Edit Site: Allow wide alignment --- lib/edit-site-page.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/edit-site-page.php b/lib/edit-site-page.php index 837148666319dc..7658fe05a59516 100644 --- a/lib/edit-site-page.php +++ b/lib/edit-site-page.php @@ -127,6 +127,7 @@ function gutenberg_edit_site_init( $hook ) { } $settings = array( + 'alignWide' => get_theme_support( 'align-wide' ), 'disableCustomColors' => get_theme_support( 'disable-custom-colors' ), 'disableCustomFontSizes' => get_theme_support( 'disable-custom-font-sizes' ), 'imageSizes' => $available_image_sizes, From fd2b7dd6d74dd908175b9c298b9d8d422b9a1fcc Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 25 Jun 2020 23:55:48 +0200 Subject: [PATCH 2/6] Block Wrapper: Un-omit data-align prop --- .../block-editor/src/components/block-list/block-wrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-list/block-wrapper.js b/packages/block-editor/src/components/block-list/block-wrapper.js index aeefcfc70b6111..78d19b176a9c8b 100644 --- a/packages/block-editor/src/components/block-list/block-wrapper.js +++ b/packages/block-editor/src/components/block-list/block-wrapper.js @@ -233,7 +233,7 @@ const BlockComponent = forwardRef( // Overrideable props. aria-label={ blockLabel } role="group" - { ...omit( wrapperProps, [ 'data-align' ] ) } + { ...wrapperProps } { ...props } id={ blockElementId } ref={ wrapper } From 186aa2e85170ab8492eeb977c5afe7d08e3e8191 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Thu, 25 Jun 2020 23:58:06 +0200 Subject: [PATCH 3/6] Post Content Block: Support alignment --- packages/block-library/src/post-content/block.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-library/src/post-content/block.json b/packages/block-library/src/post-content/block.json index 215989a2a8feb9..dc8ad29ba4d0a5 100644 --- a/packages/block-library/src/post-content/block.json +++ b/packages/block-library/src/post-content/block.json @@ -6,6 +6,7 @@ "postType" ], "supports": { + "align": true, "html": false } } From 17449b08605e5a68565866a2685e0fe2a2b6f2d2 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Mon, 29 Jun 2020 20:37:37 +0200 Subject: [PATCH 4/6] Revert "Block Wrapper: Un-omit data-align prop" This reverts commit fd2b7dd6d74dd908175b9c298b9d8d422b9a1fcc. --- .../block-editor/src/components/block-list/block-wrapper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/components/block-list/block-wrapper.js b/packages/block-editor/src/components/block-list/block-wrapper.js index 78d19b176a9c8b..aeefcfc70b6111 100644 --- a/packages/block-editor/src/components/block-list/block-wrapper.js +++ b/packages/block-editor/src/components/block-list/block-wrapper.js @@ -233,7 +233,7 @@ const BlockComponent = forwardRef( // Overrideable props. aria-label={ blockLabel } role="group" - { ...wrapperProps } + { ...omit( wrapperProps, [ 'data-align' ] ) } { ...props } id={ blockElementId } ref={ wrapper } From 6ae4c63cfb272f06cf5408e61b08700767686633 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Mon, 29 Jun 2020 21:15:21 +0200 Subject: [PATCH 5/6] Site Editor: Remove Block List padding This carries over a change that was applied to the Post Editor in #22213. See there for more context. --- .../src/components/block-editor/style.scss | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/packages/edit-site/src/components/block-editor/style.scss b/packages/edit-site/src/components/block-editor/style.scss index 38b2c0ad022c86..7ef76c4533a5e4 100644 --- a/packages/edit-site/src/components/block-editor/style.scss +++ b/packages/edit-site/src/components/block-editor/style.scss @@ -1,17 +1,3 @@ -.edit-site-block-editor__block-list { - padding-bottom: $grid-unit-30; - padding-top: $grid-unit-30 + 5; - - padding-left: $block-padding; - padding-right: $block-padding; - - // Full-wide. (to account for the padddings added above) - .wp-block[data-align="full"] { - margin-left: -$block-padding; - margin-right: -$block-padding; - } -} - // The button element easily inherits styles that are meant for the editor style. // These rules enhance the specificity to reduce that inheritance. // This is duplicated in visual-editor. From 1ee4458e148c5ca3de8779f85eeecc7672797f95 Mon Sep 17 00:00:00 2001 From: Bernie Reiter Date: Tue, 30 Jun 2020 18:17:26 +0200 Subject: [PATCH 6/6] Template Part Block: Add alignment support --- packages/block-library/src/template-part/block.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/block-library/src/template-part/block.json b/packages/block-library/src/template-part/block.json index bd381e4dd073dc..bb5146843f7b77 100644 --- a/packages/block-library/src/template-part/block.json +++ b/packages/block-library/src/template-part/block.json @@ -13,6 +13,7 @@ } }, "supports": { + "align": true, "html": false } }