Skip to content

Comments Pagination Numbers: Add border support - #85164

Merged
aaronrobertshaw merged 1 commit into
trunkfrom
add/comments-pagination-numbers-border-support
Oct 21, 2026
Merged

aaronrobertshaw merged 1 commit into
trunkfrom
add/comments-pagination-numbers-border-support

Conversation

@aaronrobertshaw

@aaronrobertshaw aaronrobertshaw commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #66471 by @rinkalpagdar.

Related: #43241

What?

Adds border support (color, radius, style and width) to the Comments Page Numbers block.

Why?

The Comments Page Numbers block has background and spacing controls, but no border. This brings it in line with Comments Pagination Next and Previous as part of the design tools consistency work.

How?

Adds __experimentalBorder to the block's block.json supports. It follows #66471, with the border on the block wrapper, where the background and the existing padding already apply. The controls are hidden by default, like the other Comments Pagination blocks.

The block renders through get_block_wrapper_attributes(), so no PHP change is needed. With one page it renders nothing, so there is no empty bordered box.

Testing Instructions

Setup: one comment per page (Settings > Discussion), and a post with a few comments.

  1. No styles: the numbers render as before.
  2. Global Styles > Blocks > Comments Page Numbers > Border: 2px solid.
    • A single border wraps all the numbers in the editor and on the front end.
    • The current page and dots are unchanged.
  3. Global Styles, Mobile state: 4px dotted.
    • Editor: View > Responsive styles > Mobile.
    • Front end: mobile width.
    • Mobile value shows. Desktop keeps step 2.
  4. Block inspector: 6px dashed, 16px radius.
    • The block value wins at every width, mobile included: a block value has no mobile state of its own and still outranks Global Styles.
  5. Block inspector, Mobile selected: 8px double, 24px radius.
    • The block mobile value wins.

Screenshots or screencast

composite

Use of AI Tools

Implemented, built and screenshotted by a Claude Code agent from a predefined task.

@aaronrobertshaw aaronrobertshaw added [Type] Enhancement A suggestion for improvement. [Package] Block library /packages/block-library labels Oct 20, 2026
@aaronrobertshaw aaronrobertshaw self-assigned this Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 9e5a6c5 trunk % Change
timeToFirstByte 42.45 ms +17.2% -3.53% 42.85 ms +8.75% -3.03% -0.93%
largestContentfulPaint 76 ms +0% -10.53% 72 ms +5.56% -5.56% 5.56%
lcpMinusTtfb 28.15 ms +11.9% -2.84% 28.65 ms +4.01% -7.33% -1.75%
wpBeforeTemplate 22.07 ms +24.2% -1.63% 21.89 ms +13.57% -1.01% 0.82%
wpTemplate 17.12 ms +2.92% -6.66% 17.13 ms +2.51% -4.61% -0.06%
wpTotal 39.18 ms +16.21% -3.52% 39.36 ms +9.58% -3.3% -0.46%
wpMemoryUsage 7.65 MB +0% -0% 7.61 MB +0% -0% 0.48%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 9e5a6c5 trunk % Change
timeToFirstByte 35.15 ms +4.69% -3.13% 32.7 ms +5.81% -2.29% 7.49%
largestContentfulPaint 80 ms +5% -5% 72 ms +0% -0% 11.11%
lcpMinusTtfb 43.55 ms +4.82% -4.02% 39.2 ms +1.66% -3.32% 11.1%
wpBeforeTemplate 18.92 ms +6.4% -1.06% 19.68 ms +3.25% -2.44% -3.86%
wpTemplate 13.28 ms +3.16% -5.72% 10.51 ms +2.95% -5.71% 26.36%
wpTotal 32.41 ms +4.97% -3.27% 30.04 ms +6.66% -1.73% 7.89%
wpMemoryUsage 6.34 MB +0% -0% 6.19 MB +0% -0% 2.41%
wpDbQueries 13 +0% -0% 9 +0% -0% 44.44%

media-processing

Metric 9e5a6c5 trunk % Change
mediaProcessingJpeg 329.4 ms +4.94% -0.33% 326.4 ms +0.71% -1.3% 0.92%
mediaProcessingAvif 4864.16 ms +0.21% -0.12% 4836.73 ms +0.29% -0.37% 0.57%
mediaProcessingJpegToAvif 3381.54 ms +0.44% -0.12% 3382.7 ms +0.12% -0.2% -0.03%

media-upload

Metric 9e5a6c5 trunk % Change
jpegUploadProcessing 1428.52 ms +35.74% -0.5% 1428.82 ms +0.72% -1.08% -0.02%
pngUploadProcessing 214.39 ms +6.99% -3.6% 224.79 ms +3.61% -6.59% -4.63%
largeJpegUploadProcessing 1417.26 ms +1.28% -0.42% 1418.8 ms +0.71% -0.83% -0.11%
multipleImageUploadProcessing 1530.14 ms +8.12% -0.31% 1523.88 ms +0.82% -1.02% 0.41%

post-editor

Metric 9e5a6c5 trunk % Change
serverResponse 244.05 ms +1.93% -3.45% 235.35 ms +9.1% -4.78% 3.7%
firstPaint 223.07 ms +27.41% -20.35% 310.05 ms +2.74% -44.6% -28.05%
domContentLoaded 700.6 ms +5.1% -3.56% 678.12 ms +3.05% -1.78% 3.32%
loaded 701.3 ms +5.11% -3.56% 678.86 ms +3.1% -1.75% 3.31%
firstContentfulPaint 291.88 ms +9.4% -3.34% 317.91 ms +0.43% -1.66% -8.19%
firstBlock 2078.73 ms +3.46% -6.09% 2008.11 ms +2.05% -3.02% 3.52%
type 12.47 ms +1.52% -1.68% 12.58 ms +4.05% -1.83% -0.87%
typeWithoutInspector 12.06 ms +2.16% -3.23% 12.68 ms +1.58% -1.89% -4.89%
typeWithTopToolbar 15.44 ms +2.85% -2.4% 15.77 ms +4.82% -4.95% -2.09%
typeContainer 5.26 ms +23% -7.98% 6.1 ms +8.69% -4.75% -13.77%
focus 68.69 ms +4.4% -2.14% 67.27 ms +4.42% -4.47% 2.11%
firstFocus 136.4 ms +0% -0% 148.94 ms +0% -0% -8.42%
selectAll 331.11 ms +2.49% -3.4% 350.77 ms +3.41% -2.18% -5.6%
listViewOpen 44.98 ms +13.49% -2.31% 47.61 ms +6.34% -6.34% -5.52%
inserterOpen 26.54 ms +7.8% -5.92% 25.78 ms +6.4% -1.9% 2.95%
inserterHover 8.07 ms +7.93% -6.44% 8 ms +7.25% -5% 0.88%
inserterSearch 6.12 ms +5.72% -3.76% 6.32 ms +5.06% -4.43% -3.16%
loadPatterns 405.31 ms +1.32% -2.92% 405.16 ms +0.7% -5.25% 0.04%
wpTotal 237.8 ms +1.8% -3.71% 229.05 ms +8.95% -4.99% 3.82%
wpMemoryUsage 14.66 MB +0% -0% 14.63 MB +0% -0% 0.26%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric 9e5a6c5 trunk % Change
serverResponse 506.06 ms +1.5% -5.2% 500.45 ms +5.73% -5.77% 1.12%
firstPaint 272.21 ms +6.19% -11.95% 265.67 ms +15.2% -4.25% 2.46%
domContentLoaded 1270.07 ms +0.86% -0.65% 1265.43 ms +0.27% -1.15% 0.37%
loaded 1271.12 ms +0.85% -0.66% 1266.69 ms +0.28% -1.18% 0.35%
firstContentfulPaint 512.12 ms +4.58% -2.03% 508.69 ms +1.33% -2.33% 0.67%
firstBlock 4777.64 ms +0.49% -0.46% 4762.94 ms +0.49% -0.33% 0.31%
type 17.67 ms +7.87% -4.7% 18.45 ms +7.64% -2.76% -4.23%
navigate 129.8 ms +8.08% -3.78% 123.82 ms +13.84% -5.98% 4.83%
loadPatterns 1226.62 ms +6.11% -8.56% 1237.64 ms +2.9% -4.48% -0.89%
loadPages 986.12 ms +1.93% -1.43% 971.23 ms +7.74% -2.01% 1.53%
wpTotal 496.42 ms +1.49% -5.34% 490.61 ms +5.79% -5.95% 1.18%
wpMemoryUsage 12.70 MB +0% -0% 12.66 MB +0% -0% 0.3%
wpDbQueries 44 +2.27% -0% 44 +2.27% -0% 0%

73c9e55 Run

🏁 Flaky tests

Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

Regression: updating a specific option will only change its value and will not corrupt others in /test/e2e/specs/editor/various/core-settings.spec.js, passed after 1 failed attempt.
Error: expect(received).toStrictEqual(expected) // deep equality

- Expected  - 1
+ Received  + 1

  Array [
    "rewrite_rules",
-   "SERIALIZED DATA",
+   "",
  ]
    at forEach (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:46:26)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/core-settings.spec.js:43:35
drags a multi-selection from a block nested in a selected block in /test/e2e/specs/editor/various/draggable-blocks.spec.js, passed after 1 failed attempt.
TypeError: Cannot read properties of null (reading 'y')
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:989:57
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:988:3
refuses the drop and uploads nothing in /test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js, passed after 1 failed attempt.
Error: expect(received).toHaveLength(expected)

Expected length: 0
Received length: 1
Received array:  [{"_links": {"about": [{"href": "http://localhost:8889/wp-json/wp/v2/types/attachment"}], "author": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/users/1"}], "collection": [{"href": "http://localhost:8889/wp-json/wp/v2/media"}], "curies": [{"href": "https://api.w.org/{rel}", "name": "wp", "templated": true}], "replies": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/comments?post=223"}], "self": [{"href": "http://localhost:8889/wp-json/wp/v2/media/223", "targetHints": {"allow": ["GET", "POST", "PUT", "PATCH", "DELETE"]}}], "wp:attached-to": [{"embeddable": true, "href": "http://localhost:8889/wp-json/wp/v2/posts/222", "id": 222, "post_type": "post"}]}, "alt_text": "", "author": 1, "caption": {"rendered": ""}, "class_list": ["post-223", "attachment", "type-attachment", "status-inherit", "hentry", "entry"], "comment_status": "open", "date": "2026-10-21T01:10:16", "date_gmt": "2026-10-21T01:10:16", "description": {"rendered": "<p class=\"attachment\"><a href='http://localhost:8889/wp-content/uploads/2026/10/677cca2d-c0e4-4c31-baeb-c12dab798e3e.png'><img loading=\"lazy\" decoding=\"async\" width=\"10\" height=\"10\" src=\"http://localhost:8889/wp-content/uploads/2026/10/677cca2d-c0e4-4c31-baeb-c12dab798e3e.png\" class=\"attachment-medium size-medium\" alt=\"\" style=\"width:100%;height:100%;max-width:10px;\" /></a></p>
"}, "featured_media": 0, "filename": "677cca2d-c0e4-4c31-baeb-c12dab798e3e.png", "filesize": 80, "guid": {"rendered": "http://localhost:8889/wp-content/uploads/2026/10/677cca2d-c0e4-4c31-baeb-c12dab798e3e.png"}, "id": 223, "link": "http://localhost:8889/?attachment_id=223", "media_details": {"file": "2026/10/677cca2d-c0e4-4c31-baeb-c12dab798e3e.png", "filesize": 80, "height": 10, "image_meta": {"alt": "", "aperture": "0", "camera": "", "caption": "", "copyright": "", "created_timestamp": "0", "credit": "", "focal_length": "0", "iso": "0", "keywords": [], "orientation": "0", "shutter_speed": "0", "title": ""}, "sizes": {}, "width": 10}, "media_type": "image", "meta": [], "mime_type": "image/png", "modified": "2026-10-21T01:10:16", "modified_gmt": "2026-10-21T01:10:16", "ping_status": "closed", "post": 222, "slug": "677cca2d-c0e4-4c31-baeb-c12dab798e3e", "source_url": "http://localhost:8889/wp-content/uploads/2026/10/677cca2d-c0e4-4c31-baeb-c12dab798e3e.png", "status": "inherit", "template": "", "title": {"rendered": "677cca2d-c0e4-4c31-baeb-c12dab798e3e"}, "type": "attachment"}]
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js:71:45
should cut and paste individual blocks with collapsed selection in /test/e2e/specs/editor/various/copy-cut-paste.spec.js, passed after 1 failed attempt.
Error: expect(string).toMatchSnapshot(expected) failed

  @@ -1,3 +1,3 @@
   <!-- wp:paragraph -->
  -<p>2Cut - collapsed selection</p>
  +<p>2</p>
   <!-- /wp:paragraph -->


    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/copy-cut-paste.spec.js:45:49
should update the URL from the last navigation if only varies in the URL fragment in /test/e2e/specs/interactivity/router-navigate.spec.ts, passed after 1 failed attempt.
Error: expect(locator).toHaveText(expected) failed

Locator:  getByTestId('title')
Expected: "Link 1"
Received: "Main"
Timeout:  5000ms

Call log:
  - Expect "toHaveText" getByTestId('title') with timeout 5000ms
  - waiting for getByTestId('title')
    14 × locator resolved to <h2 data-testid="title">Main</h2>
       - unexpected value "Main"

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigate.spec.ts:160:25

73c9e55 Run

@aaronrobertshaw
aaronrobertshaw force-pushed the add/comments-pagination-numbers-border-support branch from 5da516e to 14ad1a1 Compare October 20, 2026 13:25
@aaronrobertshaw aaronrobertshaw added [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Oct 20, 2026
@aaronrobertshaw
aaronrobertshaw marked this pull request as ready for review October 20, 2026 14:15
Co-authored-by: Rinkal Pagdar <92097119+rinkalpagdar@users.noreply.github.com>
@ramonjd
ramonjd force-pushed the add/comments-pagination-numbers-border-support branch from 14ad1a1 to 73c9e55 Compare October 21, 2026 00:55

@ramonjd ramonjd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

LGTM

@aaronrobertshaw
aaronrobertshaw merged commit 8d7f4cf into trunk Oct 21, 2026
79 checks passed
@aaronrobertshaw
aaronrobertshaw deleted the add/comments-pagination-numbers-border-support branch October 21, 2026 03:48
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants