From 42be9bdf3565734addce0332429e38834ce00f88 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 11 Aug 2024 21:47:53 +0530 Subject: [PATCH 1/9] 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 6e1f58155590f3..23fa8a530c9074 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 7b426b0f3d37a5..1adeee4b1c13e1 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 806aadc77470eb..7dce26dcd6a26b 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 645c88a5d408630725f55a2c51fef13fc4fe7527 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 21 Dec 2024 21:16:20 +0530 Subject: [PATCH 2/9] 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 7e031fa525e1ff..06f237fc5ddc19 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 cc1eb7cb6b3a7be82e70d7c61d00d1c7f395d3f8 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Mon, 12 Aug 2024 21:21:37 +0530 Subject: [PATCH 3/9] 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 23fa8a530c9074..57664b271bca46 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 322bf7cb37c09bfe8378f73a12a811f2fbc8d26a Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 21 Dec 2024 21:28:04 +0530 Subject: [PATCH 4/9] 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 06f237fc5ddc19..b0bdcd3f4faf70 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 8fa8366b80de506941f097cdfb8a9ea2d0803184 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sat, 21 Dec 2024 21:42:51 +0530 Subject: [PATCH 5/9] 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 b0bdcd3f4faf70..0715b1e3547e2a 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 c29dd95a8cb6e582f79ec52f81f94f90d5b22ccf Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 22 Dec 2024 11:53:35 +0530 Subject: [PATCH 6/9] 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 796e6e3830236c..2c41f4d4f4c400 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 1adeee4b1c13e1..7b426b0f3d37a5 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 7dce26dcd6a26b..e6896f2db024a8 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 7b7ffac8a87fa39eefe2eba9bc63ce724560ac79 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Sun, 22 Dec 2024 11:59:37 +0530 Subject: [PATCH 7/9] 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 2c41f4d4f4c400..796e6e3830236c 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, From 5396bf5686556cdce5e2ebd1fc65ca5c961251e5 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Wed, 25 Dec 2024 09:21:50 +0530 Subject: [PATCH 8/9] Added Suggested Changes --- packages/block-library/src/post-template/editor.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/block-library/src/post-template/editor.scss b/packages/block-library/src/post-template/editor.scss index 7b426b0f3d37a5..b5dbd5ed92f6ff 100644 --- a/packages/block-library/src/post-template/editor.scss +++ b/packages/block-library/src/post-template/editor.scss @@ -1,7 +1,5 @@ .editor-styles-wrapper { ul.wp-block-post-template { - padding-left: 0; - margin-left: 0; list-style: none; } } From a4aac838a1b89330f0be2e785f5a9cd5aef8523a Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Wed, 25 Dec 2024 12:37:58 +0530 Subject: [PATCH 9/9] Added Suggested Changes --- packages/block-library/src/editor.scss | 1 - packages/block-library/src/post-template/editor.scss | 5 ----- 2 files changed, 6 deletions(-) delete mode 100644 packages/block-library/src/post-template/editor.scss diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index a16d5a6c2c69c7..34be4387caad74 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -49,7 +49,6 @@ @import "./template-part/editor.scss"; @import "./text-columns/editor.scss"; @import "./video/editor.scss"; -@import "./post-template/editor.scss"; @import "./query/editor.scss"; @import "./query-pagination/editor.scss"; @import "./query-pagination-numbers/editor.scss"; diff --git a/packages/block-library/src/post-template/editor.scss b/packages/block-library/src/post-template/editor.scss deleted file mode 100644 index b5dbd5ed92f6ff..00000000000000 --- a/packages/block-library/src/post-template/editor.scss +++ /dev/null @@ -1,5 +0,0 @@ -.editor-styles-wrapper { - ul.wp-block-post-template { - list-style: none; - } -}