From 09db420cea58edceafdbf0fc2f48b9de1b9a0ed0 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 11 Aug 2024 21:47:53 +0530 Subject: [PATCH 1/7] Post Template: Add Border and Spacing Support --- .../block-library/src/post-template/block.json | 14 ++++++++++++++ .../block-library/src/post-template/editor.scss | 1 + .../block-library/src/post-template/style.scss | 1 + 3 files changed, 16 insertions(+) diff --git a/packages/block-library/src/post-template/block.json b/packages/block-library/src/post-template/block.json index 6e1f58155590f..23fa8a530c907 100644 --- a/packages/block-library/src/post-template/block.json +++ b/packages/block-library/src/post-template/block.json @@ -43,6 +43,8 @@ } }, "spacing": { + "margin": true, + "padding": true, "blockGap": { "__experimentalDefault": "1.25em" }, @@ -52,6 +54,18 @@ }, "interactivity": { "clientNavigation": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } } }, "style": "wp-block-post-template", diff --git a/packages/block-library/src/post-template/editor.scss b/packages/block-library/src/post-template/editor.scss index 7b426b0f3d37a..1adeee4b1c13e 100644 --- a/packages/block-library/src/post-template/editor.scss +++ b/packages/block-library/src/post-template/editor.scss @@ -3,5 +3,6 @@ padding-left: 0; margin-left: 0; list-style: none; + box-sizing: border-box; } } diff --git a/packages/block-library/src/post-template/style.scss b/packages/block-library/src/post-template/style.scss index 806aadc77470e..7dce26dcd6a26 100644 --- a/packages/block-library/src/post-template/style.scss +++ b/packages/block-library/src/post-template/style.scss @@ -4,6 +4,7 @@ max-width: 100%; list-style: none; padding: 0; + box-sizing: border-box; // These rules no longer apply but should be kept for backwards compatibility. &.is-flex-container { From abd4087fa0573260bc639a94f3d98451c52f41da Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 21 Dec 2024 21:16:20 +0530 Subject: [PATCH 2/7] fix conflict issue --- docs/reference-guides/core-blocks.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 7e031fa525e1f..06f237fc5ddc1 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -662,6 +662,8 @@ Contains the block elements used to render a post, like the title, date, feature - **Category:** theme - **Ancestor:** core/query - **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout, spacing (blockGap), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Parent:** core/query +- **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ ## Post Terms From 852a15b5f6e92beb9b336417f689c9fc6d8d4667 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Mon, 12 Aug 2024 21:21:37 +0530 Subject: [PATCH 3/7] Added Border & Spacing Controls Optional --- packages/block-library/src/post-template/block.json | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/post-template/block.json b/packages/block-library/src/post-template/block.json index 23fa8a530c907..57664b271bca4 100644 --- a/packages/block-library/src/post-template/block.json +++ b/packages/block-library/src/post-template/block.json @@ -49,7 +49,9 @@ "__experimentalDefault": "1.25em" }, "__experimentalDefaultControls": { - "blockGap": true + "blockGap": true, + "padding" : false, + "margin" : false } }, "interactivity": { @@ -59,13 +61,7 @@ "radius": true, "color": true, "width": true, - "style": true, - "__experimentalDefaultControls": { - "radius": true, - "color": true, - "width": true, - "style": true - } + "style": true } }, "style": "wp-block-post-template", From 1c77a98d620651a1aecb01b2a92f4f1888e95794 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 21 Dec 2024 21:28:04 +0530 Subject: [PATCH 4/7] fix conflict issue --- docs/reference-guides/core-blocks.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 06f237fc5ddc1..b0bdcd3f4faf7 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -660,8 +660,6 @@ Contains the block elements used to render a post, like the title, date, feature - **Name:** core/post-template - **Category:** theme -- **Ancestor:** core/query -- **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout, spacing (blockGap), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Parent:** core/query - **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ From 4069e59a45ce078395b567fcd22aa01e125fd03e Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 21 Dec 2024 21:42:51 +0530 Subject: [PATCH 5/7] Fixed Lint Issue --- docs/reference-guides/core-blocks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index b0bdcd3f4faf7..0715b1e3547e2 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -660,7 +660,7 @@ Contains the block elements used to render a post, like the title, date, feature - **Name:** core/post-template - **Category:** theme -- **Parent:** core/query +- **Ancestor:** core/query - **Supports:** align (full, wide), color (background, gradients, link, text), interactivity (clientNavigation), layout, spacing (blockGap, margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ ## Post Terms From f0e5c38132fe02b1c57aa04b9b7bc968edfc43c3 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 22 Dec 2024 11:53:35 +0530 Subject: [PATCH 6/7] Added Suggested Changes --- packages/block-library/src/post-comments-count/block.json | 6 ++++++ packages/block-library/src/post-template/editor.scss | 1 - packages/block-library/src/post-template/style.scss | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/post-comments-count/block.json b/packages/block-library/src/post-comments-count/block.json index 796e6e3830236..2c41f4d4f4c40 100644 --- a/packages/block-library/src/post-comments-count/block.json +++ b/packages/block-library/src/post-comments-count/block.json @@ -26,6 +26,12 @@ "margin": true, "padding": true }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true + }, "typography": { "fontSize": true, "lineHeight": true, diff --git a/packages/block-library/src/post-template/editor.scss b/packages/block-library/src/post-template/editor.scss index 1adeee4b1c13e..7b426b0f3d37a 100644 --- a/packages/block-library/src/post-template/editor.scss +++ b/packages/block-library/src/post-template/editor.scss @@ -3,6 +3,5 @@ padding-left: 0; margin-left: 0; list-style: none; - box-sizing: border-box; } } diff --git a/packages/block-library/src/post-template/style.scss b/packages/block-library/src/post-template/style.scss index 7dce26dcd6a26..e6896f2db024a 100644 --- a/packages/block-library/src/post-template/style.scss +++ b/packages/block-library/src/post-template/style.scss @@ -4,6 +4,7 @@ max-width: 100%; list-style: none; padding: 0; + // This block has customizable padding, border-box makes that more predictable. box-sizing: border-box; // These rules no longer apply but should be kept for backwards compatibility. From 8c4dcf177b9790a237012c86d05e29755c123e96 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 22 Dec 2024 11:59:37 +0530 Subject: [PATCH 7/7] Added Suggested Changes --- packages/block-library/src/post-comments-count/block.json | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/block-library/src/post-comments-count/block.json b/packages/block-library/src/post-comments-count/block.json index 2c41f4d4f4c40..796e6e3830236 100644 --- a/packages/block-library/src/post-comments-count/block.json +++ b/packages/block-library/src/post-comments-count/block.json @@ -26,12 +26,6 @@ "margin": true, "padding": true }, - "__experimentalBorder": { - "radius": true, - "color": true, - "width": true, - "style": true - }, "typography": { "fontSize": true, "lineHeight": true,