From 98707fb3f275590b647572142303998bc2ba3850 Mon Sep 17 00:00:00 2001 From: Glen Davies Date: Wed, 6 Sep 2023 17:29:30 +1200 Subject: [PATCH] remove layout attribute and specify default in settings instead --- docs/reference-guides/core-blocks.md | 2 +- packages/block-library/src/block/block.json | 6 ------ packages/block-library/src/block/index.js | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 97c9e012dbb2bf..6e66df88bbac82 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -43,7 +43,7 @@ Create and save content to reuse across your site. Update the pattern, and the c - **Name:** core/block - **Category:** reusable - **Supports:** ~~customClassName~~, ~~html~~, ~~inserter~~ -- **Attributes:** layout, ref +- **Attributes:** ref ## Button diff --git a/packages/block-library/src/block/block.json b/packages/block-library/src/block/block.json index 927e6aaf081fc5..4cb53960725d21 100644 --- a/packages/block-library/src/block/block.json +++ b/packages/block-library/src/block/block.json @@ -10,12 +10,6 @@ "attributes": { "ref": { "type": "number" - }, - "layout": { - "type": "array", - "default": { - "type": "constrained" - } } }, "supports": { diff --git a/packages/block-library/src/block/index.js b/packages/block-library/src/block/index.js index ae2ae5af195c39..5e8482f1fb3490 100644 --- a/packages/block-library/src/block/index.js +++ b/packages/block-library/src/block/index.js @@ -33,6 +33,9 @@ function addEditorOnlyLayoutSupportForPatterns( blockSettings ) { blockSettings.supports.layout = { allowSizingOnChildren: true, allowEditing: false, + default: { + type: 'constrained', + }, }; }