From 448ccbcea350940808fc7fd8275f75e4bb3681b5 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Tue, 6 Aug 2024 23:16:48 +0530 Subject: [PATCH 1/5] Comment Pagination Next: Add Border Support --- docs/reference-guides/core-blocks.md | 2 +- .../src/comments-pagination-next/block.json | 19 ++++++++++++++++++- .../src/comments-pagination-next/style.scss | 4 ++++ packages/block-library/src/style.scss | 1 + 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 packages/block-library/src/comments-pagination-next/style.scss diff --git a/docs/reference-guides/core-blocks.md b/docs/reference-guides/core-blocks.md index 72281a53c3dd18..e526cbb4e710c3 100644 --- a/docs/reference-guides/core-blocks.md +++ b/docs/reference-guides/core-blocks.md @@ -207,7 +207,7 @@ Displays the next comment's page link. ([Source](https://github.com/WordPress/gu - **Name:** core/comments-pagination-next - **Category:** theme - **Parent:** core/comments-pagination -- **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Supports:** color (background, gradients, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** label ## Comments Page Numbers diff --git a/packages/block-library/src/comments-pagination-next/block.json b/packages/block-library/src/comments-pagination-next/block.json index 22e20bfa8dbf2d..485a535c8bcb04 100644 --- a/packages/block-library/src/comments-pagination-next/block.json +++ b/packages/block-library/src/comments-pagination-next/block.json @@ -38,6 +38,23 @@ }, "interactivity": { "clientNavigation": true + }, + "spacing": { + "margin": true, + "padding": true + }, + "__experimentalBorder": { + "radius": true, + "color": true, + "width": true, + "style": true, + "__experimentalDefaultControls": { + "radius": true, + "color": true, + "width": true, + "style": true + } } - } + }, + "style": "wp-block-comments-pagination-next" } diff --git a/packages/block-library/src/comments-pagination-next/style.scss b/packages/block-library/src/comments-pagination-next/style.scss new file mode 100644 index 00000000000000..264d0ad608bc00 --- /dev/null +++ b/packages/block-library/src/comments-pagination-next/style.scss @@ -0,0 +1,4 @@ +.wp-block-comments-pagination-next { + // This block has customizable padding, border-box makes that more predictable. + box-sizing: border-box; +} diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index 8f17cd7a50f55c..74de86e2286608 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -61,5 +61,6 @@ @import "./verse/style.scss"; @import "./video/style.scss"; @import "./footnotes/style.scss"; +@import "./comments-pagination-next/style.scss"; @import "common.scss"; From 158b9b6e57b5deefb309db911c2732e6c165aaa5 Mon Sep 17 00:00:00 2001 From: shail-mehta Date: Thu, 8 Aug 2024 21:40:42 +0530 Subject: [PATCH 2/5] Added suggested changes --- .../src/comments-pagination-next/block.json | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/packages/block-library/src/comments-pagination-next/block.json b/packages/block-library/src/comments-pagination-next/block.json index 485a535c8bcb04..cd35631fc2ae08 100644 --- a/packages/block-library/src/comments-pagination-next/block.json +++ b/packages/block-library/src/comments-pagination-next/block.json @@ -41,19 +41,17 @@ }, "spacing": { "margin": true, - "padding": true + "padding": true, + "__experimentalDefaultControls": { + "margin": false, + "padding": false + } }, "__experimentalBorder": { "radius": true, "color": true, "width": true, - "style": true, - "__experimentalDefaultControls": { - "radius": true, - "color": true, - "width": true, - "style": true - } + "style": true } }, "style": "wp-block-comments-pagination-next" From 8a7bc8f0ef82e9127b48d954859017f3ae3cc14f Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Tue, 22 Sep 2026 23:20:19 +0530 Subject: [PATCH 3/5] Comments Pagination Next: Document spacing support in generated docs. --- docs/reference-guides/core-blocks/README.md | 2 +- packages/block-library/src/comments-pagination-next/README.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks/README.md b/docs/reference-guides/core-blocks/README.md index 9b8d6b52f2aaac..6e0e3ffe86afb7 100644 --- a/docs/reference-guides/core-blocks/README.md +++ b/docs/reference-guides/core-blocks/README.md @@ -265,7 +265,7 @@ Displays the next comment's page link. - **Name:** [core/comments-pagination-next](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments-pagination-next/) - **Category:** [theme](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/) - **Parent:** core/comments-pagination -- **Supports:** anchor, background (gradient), color (background, gradients, ~~text~~), interactivity (clientNavigation), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Supports:** anchor, background (gradient), color (background, gradients, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** label ## Comments Page Numbers diff --git a/packages/block-library/src/comments-pagination-next/README.md b/packages/block-library/src/comments-pagination-next/README.md index a600f42127043a..ee06822e17ccb2 100644 --- a/packages/block-library/src/comments-pagination-next/README.md +++ b/packages/block-library/src/comments-pagination-next/README.md @@ -38,6 +38,9 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer - [`lineHeight`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#typography-lineheight): `true` - [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity): - `clientNavigation`: `true` +- [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing): + - `margin`: `true` + - `padding`: `true` ## Context From 56132c6f41e536abded3f31e9631d1952d7483c8 Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Tue, 29 Sep 2026 19:50:17 +0530 Subject: [PATCH 4/5] Remove Margin Support --- packages/block-library/src/comments-pagination-next/README.md | 1 - packages/block-library/src/comments-pagination-next/block.json | 2 -- 2 files changed, 3 deletions(-) diff --git a/packages/block-library/src/comments-pagination-next/README.md b/packages/block-library/src/comments-pagination-next/README.md index ee06822e17ccb2..a3c3c8bebd763f 100644 --- a/packages/block-library/src/comments-pagination-next/README.md +++ b/packages/block-library/src/comments-pagination-next/README.md @@ -39,7 +39,6 @@ _Defined via the [`supports`](https://developer.wordpress.org/block-editor/refer - [`interactivity`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#interactivity): - `clientNavigation`: `true` - [`spacing`](https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/#spacing): - - `margin`: `true` - `padding`: `true` ## Context diff --git a/packages/block-library/src/comments-pagination-next/block.json b/packages/block-library/src/comments-pagination-next/block.json index 4be1be2adfbe48..7cbc1bba7cd1cd 100644 --- a/packages/block-library/src/comments-pagination-next/block.json +++ b/packages/block-library/src/comments-pagination-next/block.json @@ -44,10 +44,8 @@ "clientNavigation": true }, "spacing": { - "margin": true, "padding": true, "__experimentalDefaultControls": { - "margin": false, "padding": false } }, From ffd5be26c74cbbbdbb388731af5417e9ddab91a8 Mon Sep 17 00:00:00 2001 From: Shail Mehta Date: Tue, 29 Sep 2026 19:57:08 +0530 Subject: [PATCH 5/5] Revise supports attributes for comments-pagination-next --- docs/reference-guides/core-blocks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference-guides/core-blocks/README.md b/docs/reference-guides/core-blocks/README.md index 530b319d31d080..95327f492bde40 100644 --- a/docs/reference-guides/core-blocks/README.md +++ b/docs/reference-guides/core-blocks/README.md @@ -265,7 +265,7 @@ Displays the next comment's page link. - **Name:** [core/comments-pagination-next](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/core-block-comments-pagination-next/) - **Category:** [theme](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-theme/) - **Parent:** core/comments-pagination -- **Supports:** anchor, background (gradient), color (background, gradients, ~~text~~), interactivity (clientNavigation), spacing (margin, padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ +- **Supports:** anchor, background (gradient), color (background, gradients, ~~text~~), interactivity (clientNavigation), spacing (padding), typography (fontSize, lineHeight), ~~html~~, ~~reusable~~ - **Attributes:** label ## Comments Page Numbers