Skip to content

UI: Scale Spinner stroke width with its size - #85378

Merged
mirka merged 7 commits into
trunkfrom
ui-spinner-proportional-stroke
Oct 26, 2026
Merged

mirka merged 7 commits into
trunkfrom
ui-spinner-proportional-stroke

Conversation

@mirka

@mirka mirka commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

What?

Follow-up to the discussion in #84633.

Scale the @wordpress/ui Spinner stroke width with the spinner's rendered size, using the same proportions as the WordPress icons.

Why?

In the discussion on #84633, the small spinner looked heavy next to the thin plus and check icons. Spinner currently uses a 2px non-scaling stroke at every size, while icons draw a 1.5-unit stroke in a 24×24 viewBox and scale with their size. The suggestion there was for inline spinners to follow the same rules as icons.

How?

Use a 24×24 viewBox with a 1.5-unit stroke and remove vector-effect: non-scaling-stroke, so SVG scaling sets the rendered stroke width. The arc keeps its current geometry, a half-circle whose centerline sits on the edge of the box, so the shape, centering, overflow, and rotation are unchanged. Removing non-scaling-stroke from the previous 100×100 geometry alone would have given a stroke of 0.32px at 16px.

The rendered stroke is now the spinner size divided by 16:

Size Before After
8px 2px 0.5px
12px 2px 0.75px
16px (default) 2px 1px
20px 2px 1.25px
24px 2px 1.5px
40px 2px 2.5px

The default 16px spinner is thinner. Button loading spinners, sized to the button font size, go from 2px to about 1.49px at 13px. The validating spinner in form fields goes from 2px to 0.75px at 12px. Sizes above 32px are thicker than before. The color, forced-colors stroke, animation, role and focusable attributes, and sizing API are unchanged.

Button sets a heavier 2.75-unit stroke on its spinner, so the spinner matches the emphasized label weight. At the 13px button font size, this renders at about 1.49px, close to the 1.5px stroke that 24px icons have. The override lives in the Button stylesheet, in the compositions layer, so the Spinner default is unchanged. Without it, the Button spinner would be about 0.81px at 13px.

Testing Instructions

  1. In Storybook, open Components / @wordpress-ui / Spinner / Default. The arc should have a 1px stroke.
  2. Open Custom Size. The 40px arc should have a thicker 2.5px stroke.
  3. Open Components / @wordpress-ui / Button / Loading. The spinner should look slightly heavier than a standalone spinner of the same size, close to the weight of the button label.
  4. Repeat with Global CSS set to WordPress, and with forced colors emulated (DevTools → Rendering → Emulate CSS media feature forced-colors). The arc should stay visible and use the system text color.

Screenshots or screencast

Mode Before After
Font only Before: spinners at every size have the same 2px stroke, heavier than the icons at small sizes After: spinner strokes scale with size and match the icon stroke weight
WordPress global CSS Before, with WordPress global CSS: fixed 2px spinner strokes After, with WordPress global CSS: spinner strokes scale with size
WordPress global CSS, forced colors Before, in forced colors: fixed 2px spinner strokes in the system text color After, in forced colors: scaled spinner strokes remain visible in the system text color

Button loading spinner

The Button row in the table above predates the heavier Button stroke. Before uses the default 1.5-unit stroke, and after uses the 2.75-unit Button stroke. Idle labels are shown above the loading states for weight comparison, with a standalone 13px Spinner next to body text.

Mode Before After
Font only Before: Button loading spinners with a thin 0.81px stroke, lighter than the bold labels After: Button loading spinners with a heavier 1.49px stroke closer to the label weight, while the standalone spinner stays thin
WordPress global CSS Before, with WordPress global CSS: thin Button loading spinners After, with WordPress global CSS: heavier Button loading spinners
WordPress global CSS, forced colors Before, in forced colors: thin Button loading spinners in the button text color After, in forced colors: heavier Button loading spinners in the button text color

Use a 24-unit viewBox with a 1.5-unit stroke, the same proportions as
the icon library, and let SVG scaling set the rendered stroke width
instead of keeping a fixed 2px non-scaling stroke.
@mirka mirka added the [Type] Enhancement A suggestion for improvement. label Oct 22, 2026
@mirka mirka self-assigned this Oct 22, 2026
@github-actions github-actions Bot added the [Package] UI /packages/ui label Oct 22, 2026
@github-actions

github-actions Bot commented Oct 22, 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: mirka <0mirka00@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

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

📦 Bundle size

Size Change: -126 B (0%)

Total Size: 9.07 MB

📦 View Changed
Filename Size Change
build/modules/workflow/index.min.js 89.2 kB -20 B (-0.02%)
build/scripts/block-directory/index.min.js 55.5 kB -15 B (-0.03%)
build/scripts/block-editor/index.min.js 606 kB -10 B (0%)
build/scripts/block-library/index.min.js 449 kB -8 B (0%)
build/scripts/components/index.min.js 372 kB -16 B (0%)
build/scripts/customize-widgets/index.min.js 60.5 kB -14 B (-0.02%)
build/scripts/edit-site/index.min.js 424 kB -8 B (0%)
build/scripts/edit-widgets/index.min.js 67.4 kB -7 B (-0.01%)
build/scripts/editor/index.min.js 620 kB +15 B (0%)
build/scripts/format-library/index.min.js 90.1 kB -13 B (-0.01%)
build/scripts/media-utils/index.min.js 265 kB -14 B (-0.01%)
build/scripts/notices/index.min.js 52.8 kB -16 B (-0.03%)

1ae21a6 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 2b773f1 trunk % Change
timeToFirstByte 54.5 ms +6.51% -2.66% 54.75 ms +2.92% -3.11% -0.46%
largestContentfulPaint 88 ms +9.09% -0% 88 ms +6.82% -2.27% 0%
lcpMinusTtfb 35.6 ms +18.12% -7.02% 33.3 ms +10.81% -5.11% 6.91%
wpBeforeTemplate 29.65 ms +10.02% -2.5% 29.42 ms +6.53% -2.01% 0.78%
wpTemplate 21.22 ms +3.02% -2.87% 21.05 ms +4.7% -4.61% 0.81%
wpTotal 50.82 ms +7.24% -2.52% 50.97 ms +3.02% -2.96% -0.29%
wpMemoryUsage 7.68 MB +0% -0% 7.65 MB +0% -0% 0.43%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 2b773f1 trunk % Change
timeToFirstByte 46 ms +5.98% -1.3% 46.05 ms +4.23% -1.52% -0.11%
largestContentfulPaint 100 ms +2% -0% 100 ms +4% -0% 0%
lcpMinusTtfb 54.4 ms +0.55% -1.29% 54.55 ms +1.19% -1.19% -0.27%
wpBeforeTemplate 26.78 ms +3.7% -1.01% 26.59 ms +2.11% -1.62% 0.71%
wpTemplate 16.16 ms +1.36% -1.36% 16.11 ms +2.61% -1.86% 0.31%
wpTotal 42.94 ms +5.89% -1% 42.94 ms +4.35% -1.44% 0%
wpMemoryUsage 6.37 MB +0% -0% 6.34 MB +0% -0% 0.54%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric 2b773f1 trunk % Change
mediaProcessingJpeg 400.15 ms +0.31% -1.08% 402.28 ms +0.66% -1.24% -0.53%
mediaProcessingAvif 6081.81 ms +0.2% -0.03% 6081.62 ms +0.25% -0.11% 0%
mediaProcessingJpegToAvif 4213.83 ms +0.11% -0.47% 4224.71 ms +0.07% -0.29% -0.26%

media-upload

Metric 2b773f1 trunk % Change
jpegUploadProcessing 1463.52 ms +34.44% -2.16% 1430.04 ms +2.11% -0.78% 2.34%
pngUploadProcessing 203.25 ms +9.26% -16.33% 212.61 ms +18.83% -17.93% -4.4%
largeJpegUploadProcessing 1407.93 ms +0.96% -0.27% 1419.39 ms +0.75% -0.26% -0.81%
multipleImageUploadProcessing 1975.02 ms +8.29% -19.35% 1584.39 ms +8.08% -1.13% 24.65%

post-editor

Metric 2b773f1 trunk % Change
serverResponse 510.45 ms +3.47% -7.27% 489.36 ms +10.43% -1.87% 4.31%
firstPaint 288.76 ms +84.35% -12.03% 516.18 ms +7.91% -57.39% -44.06%
domContentLoaded 1218.7 ms +4.88% -1.02% 1218.27 ms +2.18% -1.19% 0.04%
loaded 1219.88 ms +4.87% -1.03% 1219.4 ms +2.18% -1.19% 0.04%
firstContentfulPaint 535.42 ms +3.03% -8.83% 539.73 ms +3.2% -4.47% -0.8%
firstBlock 3573.73 ms +1.67% -3.34% 3507.61 ms +3.06% -0.58% 1.89%
type 18.31 ms +7.92% -3.5% 18.61 ms +3.76% -5.91% -1.61%
typeWithoutInspector 18.92 ms +5.92% -2.8% 19.13 ms +4.13% -4.08% -1.1%
typeWithTopToolbar 24.27 ms +3.83% -4.57% 24.58 ms +4.96% -3.82% -1.26%
typeContainer 8.54 ms +8.2% -3.16% 8.6 ms +15.23% -7.56% -0.7%
focus 123.7 ms +9.26% -2.93% 123.11 ms +9.15% -2.15% 0.48%
firstFocus 232.25 ms +0% -0% 250.41 ms +0% -0% -7.25%
selectAll 581.72 ms +1.54% -1.91% 559.14 ms +1.06% -4.79% 4.04%
listViewOpen 82.61 ms +5.88% -4.16% 79.61 ms +6.63% -10.21% 3.77%
inserterOpen 44.25 ms +10.87% -4.97% 43.18 ms +6.58% -12.55% 2.48%
inserterHover 13.18 ms +3.57% -13.58% 11.58 ms +13.56% -6.56% 13.82%
inserterSearch 9.04 ms +5.2% -12.5% 7.85 ms +9.3% -7.39% 15.16%
loadPatterns 679.53 ms +5.92% -0.9% 653.76 ms +3.84% -1.58% 3.94%
wpTotal 500.58 ms +3.47% -7.39% 479.97 ms +10.52% -2.05% 4.29%
wpMemoryUsage 14.71 MB +0% -0% 14.68 MB +0% -0% 0.24%
wpDbQueries 55 +0% -1.82% 55 +0% -1.82% 0%

site-editor

Metric 2b773f1 trunk % Change
serverResponse 267.36 ms +2.38% -9.89% 251.34 ms +13.27% -2.26% 6.37%
firstPaint 231.06 ms +47.9% -25.5% 217.95 ms +26.28% -14.78% 6.02%
domContentLoaded 790.69 ms +5.06% -0.94% 853.38 ms +2.17% -2.64% -7.35%
loaded 791.62 ms +5.03% -0.92% 854.26 ms +2.21% -2.64% -7.33%
firstContentfulPaint 341.23 ms +5.33% -3.73% 374.58 ms +1.04% -10.75% -8.9%
firstBlock 2833.9 ms +2.21% -0.35% 2980.26 ms +1.62% -2.5% -4.91%
type 14.53 ms +4.13% -3.1% 15.99 ms +6.69% -1.38% -9.13%
navigate 88.75 ms +17.69% -8.74% 94.96 ms +14.51% -4.98% -6.54%
loadPatterns 959.75 ms +5.74% -14.09% 1061.15 ms +13.87% -10.05% -9.56%
loadPages 999.76 ms +0.64% -1.68% 1017.51 ms +2.78% -2.04% -1.74%
wpTotal 261.05 ms +2.46% -10.24% 244.77 ms +13.58% -2.28% 6.65%
wpMemoryUsage 12.73 MB +0% -0% 12.70 MB +0% -0% 0.24%
wpDbQueries 44 +2.27% -0% 44.5 +1.12% -1.12% -1.12%

1ae21a6 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.

Custom Completer: should allow newlines after multiple option completions in /test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js, passed after 1 failed attempt.
Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 3
+ Received  + 3

  <!-- wp:paragraph -->
  <p>🫐 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>~🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>~🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
- <p>🫐 test</p>
+ <p>~🍎 test</p>
  <!-- /wp:paragraph -->

  <!-- wp:paragraph -->
  <p></p>
  <!-- /wp:paragraph -->

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/autocomplete-and-mentions.spec.js:466:6
List in /test/e2e/specs/editor/blocks/query.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 22
+ Received  +  1

  Array [
    Object {
-     "innerBlocks": Array [
-       Object {
-         "innerBlocks": Array [
-           Object {
-             "name": "core/post-title",
-           },
-           Object {
-             "name": "core/post-featured-image",
-           },
-           Object {
-             "name": "core/post-excerpt",
-           },
-           Object {
-             "name": "core/separator",
-           },
-           Object {
-             "name": "core/post-date",
-           },
-         ],
-         "name": "core/post-template",
-       },
-     ],
+     "innerBlocks": Array [],
      "name": "core/query",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/query.spec.js:88:42
does not list blocks the Navigation does not allow in /test/e2e/specs/editor/blocks/navigation.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → DELETE http://localhost:8889/wp-json/wp/v2/pages/43?force=true
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: f39a3d6f50
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1793181023%7CxM8T7OEECbxiU0AsGaVCNT3KXeqOVkwBDsWdr0keXvU%7Caf5f412b469d50afaaf47dce03a58ea84b5b80375eb7bec1f0627e16908a68ef; wp-settings-time-1=1793008304

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:111:39)
    at RequestUtils.call (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/pages.ts:27:20)
    at map (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/pages.ts:56:37)
    at RequestUtils.deleteAllPages (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/pages.ts:56:9)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/navigation.spec.js:1017:4
does not select blocks in the canvas preview when editing from the sidebar (Site Editor v2) in /test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js, passed after 1 failed attempt.
Error: expect(locator).toBeVisible() failed

Locator: getByRole('listbox', { name: 'Search results' })
Expected: visible
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeVisible" getByRole('listbox', { name: 'Search results' }) with timeout 5000ms
  - waiting for getByRole('listbox', { name: 'Search results' })

    at LinkControl.useLinkControlSearch (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:396:33)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:179:3
inserts a block in proper place after having clicked `Browse All` from inline inserter in /test/e2e/specs/editor/various/inserting-blocks.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('button', { name: 'Add block' })
    - locator resolved to <button type="button" aria-pressed="false" aria-haspopup="true" aria-expanded="false" aria-label="Add block" class="components-button block-editor-inserter__toggle is-next-40px-default-size has-icon">…</button>
  - attempting click action
    - waiting for element to be visible, enabled and stable
  - element was detached from the DOM, retrying

    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/inserting-blocks.spec.js:557:5
should change the indented list type in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('role=toolbar[name="Block tools"i]').locator('role=button[name="Indent"]')
    - locator resolved to <button id="_r_1b_" type="button" tabindex="-1" aria-label="Indent" aria-disabled="true" data-toolbar-item="true" data-truly-disabled="false" aria-describedby="components-button__description-19" class="components-button components-toolbar-button is-compact has-icon">…</button>
  - attempting click action
    2 × waiting for element to be visible, enabled and stable
      - element is not enabled
    - retrying click action
    - waiting 20ms
    2 × waiting for element to be visible, enabled and stable
      - element is not enabled
    - retrying click action
      - waiting 100ms
    18 × waiting for element to be visible, enabled and stable
       - element is not enabled
     - retrying click action
       - waiting 500ms

    at Editor.clickBlockToolbarButton (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/editor/click-block-toolbar-button.ts:17:15)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:727:3
should copy and paste in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: should select all blocks after copying

should select all blocks after copying

expect(received).toEqual(expected) // deep equality

- Expected  -  1
+ Received  + 18

- Array []
+ Array [
+   Object {
+     "attributes": Object {
+       "content": "first paragraph",
+       "dropCap": false,
+     },
+     "innerBlocks": Array [],
+     "name": "core/paragraph",
+   },
+   Object {
+     "attributes": Object {
+       "content": "",
+       "dropCap": false,
+     },
+     "innerBlocks": Array [],
+     "name": "core/paragraph",
+   },
+ ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:612:5
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 gradually multi-select in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 3
+ Received  + 7

  Array [
    Object {
-     "name": "core/column",
+     "attributes": Object {
+       "content": "1",
+       "dropCap": false,
      },
-   Object {
-     "name": "core/column",
+     "clientId": "c262aa93-d4c7-4e07-a07a-6279a545e197",
+     "innerBlocks": Array [],
+     "isValid": true,
+     "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:1151:5
should indent and outdent level 2 in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for locator('role=toolbar[name="Block tools"i]').locator('role=button[name="Indent"]')
    - locator resolved to <button id="_r_1l_" type="button" tabindex="-1" aria-label="Indent" aria-disabled="true" data-toolbar-item="true" data-truly-disabled="false" aria-describedby="components-button__description-26" class="components-button components-toolbar-button is-compact has-icon">…</button>
  - attempting click action
    2 × waiting for element to be visible, enabled and stable
      - element is not enabled
    - retrying click action
    - waiting 20ms
    2 × waiting for element to be visible, enabled and stable
      - element is not enabled
    - retrying click action
      - waiting 100ms
    18 × waiting for element to be visible, enabled and stable
       - element is not enabled
     - retrying click action
       - waiting 500ms

    at Editor.clickBlockToolbarButton (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/editor/click-block-toolbar-button.ts:17:15)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:933:3
should keep correct selection when dragging outside block (-firefox) in /test/e2e/specs/editor/various/multi-block-selection.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 1
+ Received  + 1

  Array [
    Object {
      "attributes": Object {
-       "content": "1",
+       "content": "13",
      },
      "name": "core/paragraph",
    },
  ]

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/multi-block-selection.spec.js:786:41
should leave the rest of the list intact when merging into an empty list item in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  -  0
+ Received  + 13

@@ -5,27 +5,40 @@
          "attributes": Object {
            "content": "1",
          },
          "innerBlocks": Array [
            Object {
+             "attributes": Object {
+               "ordered": false,
+               "values": "",
+             },
              "innerBlocks": Array [
                Object {
                  "attributes": Object {
                    "content": "a",
                  },
+                 "innerBlocks": Array [],
                  "name": "core/list-item",
                },
                Object {
                  "attributes": Object {
                    "content": "b",
                  },
+                 "innerBlocks": Array [],
                  "name": "core/list-item",
                },
              ],
              "name": "core/list",
            },
          ],
+         "name": "core/list-item",
+       },
+       Object {
+         "attributes": Object {
+           "content": "",
+         },
+         "innerBlocks": Array [],
          "name": "core/list-item",
        },
      ],
      "name": "core/list",
    },
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:3118:38
should merge a following sibling list into the outermost list with Delete from a nested item (#77245) in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 2
+ Received  + 2

@@ -8,11 +8,11 @@
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {
                  "attributes": Object {
-                   "content": "b‸",
+                   "content": "b",
                  },
                  "name": "core/list-item",
                },
              ],
              "name": "core/list",
@@ -25,11 +25,11 @@
    },
    Object {
      "innerBlocks": Array [
        Object {
          "attributes": Object {
-           "content": "1",
+           "content": "‸1",
          },
          "innerBlocks": Array [
            Object {
              "innerBlocks": Array [
                Object {

Call Log:
- Timeout 5000ms exceeded while waiting on the predicate
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/blocks/list.spec.js:2854:41
should remove an anchored list when deleting its last item in /test/e2e/specs/editor/blocks/list.spec.js, passed after 1 failed attempt.
Error: expect(received).toMatchObject(expected)

- Expected  - 1
+ Received  + 1

Truncated. See the full report.

1ae21a6 Run

@mirka
mirka requested a review from a team October 22, 2026 14:16
@mirka
mirka marked this pull request as ready for review October 22, 2026 14:16
@mirka
mirka requested a review from a team as a code owner October 22, 2026 14:16
@jasmussen

Copy link
Copy Markdown
Contributor

I'll ultimately defer to @jameskoster and @ciampo on this, what works for the present state for icon scaling. But I'd like to revisit how we treat stroke width scaling above a certain size, I think there are aspects to the themeability that we can explore in the future.

@jameskoster

Copy link
Copy Markdown
Contributor

This is a bit tricky because if the principle is that the stroke-weight should make the spinner feel like part of the text adjacent, then in the button context this feels a little off because button label has emphasised weight. The spinner feels light in comparison. But next to body text this feels right.

Would it be too much to have an option for emphasised spinner stroke weight for these cases? Or perhaps that's just something the button should override.

@jasmussen

Copy link
Copy Markdown
Contributor

Would it be too much to have an option for emphasised spinner stroke weight for these cases? Or perhaps that's just something the button should override.

That's one of the things I was alluding to. I'd love to explore scaling the stroke-width according to the font-weight. So if you had a 60px font size at font-weight 100 (e.g. very thin), so would the stroke-width be thin, even if it was large.

mirka added 3 commits October 23, 2026 00:19
Match the emphasized label weight with a 1.5x stroke, set from the
Button stylesheet so the Spinner default stays unchanged.
@mirka

mirka commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

I've appended new screenshots to the description that show the button spinners adjusted ad hoc to a heavier weight that I thought looked ok.

For now I think the ad hoc weight is fine. If we find ourselves wanting this a lot, I'm thinking we could perhaps have inline and standalone variants on Spinner, where we can try out different weight logic.

Sound good?

@ciampo ciampo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM code-wise, altohough it will need a design blessing ✨

@mirka mirka added the Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 26, 2026
@mirka

mirka commented Oct 26, 2026

Copy link
Copy Markdown
Member Author

I'm going to merge this to unblock the rest of the fix that I want to get into 7.2. Design team, we can tweak the design details at any time.

@mirka
mirka merged commit 5cf74a7 into trunk Oct 26, 2026
89 checks passed
@mirka
mirka deleted the ui-spinner-proportional-stroke branch October 26, 2026 13:26
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 26, 2026
@github-actions github-actions Bot removed the Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Oct 26, 2026
gutenbergplugin pushed a commit that referenced this pull request Oct 26, 2026
* UI: Scale Spinner stroke width with its size

Use a 24-unit viewBox with a 1.5-unit stroke, the same proportions as
the icon library, and let SVG scaling set the rendered stroke width
instead of keeping a fixed 2px non-scaling stroke.

* Link Spinner changelog entry

* Describe Spinner stroke change without exact sizes

* Use a heavier spinner stroke in Button

Match the emphasized label weight with a 1.5x stroke, set from the
Button stylesheet so the Spinner default stays unchanged.

* Bring the Button spinner stroke closer to 1.5px

* Drop Button from the Spinner changelog entry

Co-authored-by: mirka <0mirka00@git.wordpress.org>
Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
@github-actions github-actions Bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Oct 26, 2026
@github-actions

Copy link
Copy Markdown

I just cherry-picked this PR to the wp/7.2 branch to get it included in the next release: e93004f

Comment on lines +229 to +232
/* Heavier than the Spinner default to match the emphasized label weight. */
> * {
stroke-width: 2.75;
}

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.

Minor, and pre-existing: This kind of * descendent targeting seems to be the same kind of external extension we try to discourage in downstream consumers (i.e. we're not "practicing what we preach"). Maybe it's more tolerable if we're the ones doing it, but at least one practical effect is that it implicitly ties these styles to the internal structure of the Spinner implementation. Not strictly necessary, but a small improvement we could do is apply properties on .spinner and rely on inheritence, which stroke-width (and stroke below) would.

wporg-sync pushed a commit to WordPress/wordpress-develop that referenced this pull request Oct 27, 2026
This updates the pinned commit hash of the Gutenberg repository from `be6a50be6834e922b9db12c75c9a2cd817b2db59` to `d72020a651eda64dcc53b5dbd5b9d5bd511c4cc9` (version 24.3.0-rc.1).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@be6a50b...d72020a

- BorderControl: Remove double focus outline (WordPress/gutenberg#85173)
- Snackbar: Use design system focus ring (WordPress/gutenberg#85168)
- SelectControl: Fix default options showing the `Select` placeholder (WordPress/gutenberg#85172)
- Actions API: Remove the unsupported `single` action context (WordPress/gutenberg#85186)
- Client-side media: Upgrade wasm-vips to 0.0.19 and raise memory budgets accordingly (WordPress/gutenberg#84980)
- Styles: Fix inconsistent 'Elements' tools panel heading level (WordPress/gutenberg#85247)
- `media-utils`/MediaEdit: use design system focus ring (WordPress/gutenberg#84940)
- Icons: Add new form based icons. (WordPress/gutenberg#84074) (WordPress/gutenberg#85360)
- Navigation: keep custom CSS off inner list containers (WordPress/gutenberg#84881) (WordPress/gutenberg#85367)
- Navigation: keep Global Styles custom CSS off inner list containers (WordPress/gutenberg#85366)
- Edit as HTML: Show design system focus ring on the HTML textarea (WordPress/gutenberg#85266) (WordPress/gutenberg#85359)
- Icons: Restore the missing speech bubble in postComments (WordPress/gutenberg#85275)
- Block Directory: Standardize downloadable block focus indicators (WordPress/gutenberg#85307)
- Global Styles: Add icons and tweak styling for element and block buttons (WordPress/gutenberg#85363) (WordPress/gutenberg#85414)
- Tests: Stop asserting Core lacks the core fields functions (WordPress/gutenberg#85201)
- Meta Boxes: Use the design system focus ring for the panel toggle (WordPress/gutenberg#85355) (WordPress/gutenberg#85410)
- DataViews: Use the design system focus ring for list items. (WordPress/gutenberg#85358) (WordPress/gutenberg#85435)
- Components: Standardize checkbox and radio focus outlines (WordPress/gutenberg#85379) (WordPress/gutenberg#85436)
- UI: Use solid brand highlights for popup items (WordPress/gutenberg#84087)
- Media: Preserve EXIF metadata when converting HEIC to JPEG client-side (WordPress/gutenberg#82040)
- Icons: Add error, info and postComments to the core-admin collection (WordPress/gutenberg#85452)
- UnitControl: Use the design system outline for the unit select focus ring (WordPress/gutenberg#85444)
- Page List: Keep pages visible in the Navigation sidebar in contentOnly (WordPress/gutenberg#85357)
- Icons: Add new asterisk icon (WordPress/gutenberg#85442) (WordPress/gutenberg#85498)
- wp-env: Keep Debian security updates in Bullseye-based images (WordPress/gutenberg#85469)
- Editor: Guard entity preload filters and share entity actions/fields logic (WordPress/gutenberg#85390) (WordPress/gutenberg#85499)
- UI: Scale Spinner stroke width with its size (WordPress/gutenberg#85378)
- [WP 7.2] Fix the block-library TypeScript test project (WordPress/gutenberg#85533)
- Editor: Vertically center the Categories loading spinner (WordPress/gutenberg#85563)
- DataViews: Render table bulk actions outside the table (WordPress/gutenberg#85250) (WordPress/gutenberg#85571)
- Record e2e traces only when a failed test is retried (WordPress/gutenberg#85428)
- Writing flow: fix triple click in a list item selecting the next item (WordPress/gutenberg#85569)
- Build: Limit concurrent wp-build builds (WordPress/gutenberg#79889)
- Icons: Promote Dashicon replacements to `core-admin` and map their Dashicons (WordPress/gutenberg#85541)
  
Props peterwilsoncc, mamaduka.
See #66340

git-svn-id: https://develop.svn.wordpress.org/trunk@64796 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Oct 27, 2026
This updates the pinned commit hash of the Gutenberg repository from `be6a50be6834e922b9db12c75c9a2cd817b2db59` to `d72020a651eda64dcc53b5dbd5b9d5bd511c4cc9` (version 24.3.0-rc.1).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@be6a50b...d72020a

- BorderControl: Remove double focus outline (WordPress/gutenberg#85173)
- Snackbar: Use design system focus ring (WordPress/gutenberg#85168)
- SelectControl: Fix default options showing the `Select` placeholder (WordPress/gutenberg#85172)
- Actions API: Remove the unsupported `single` action context (WordPress/gutenberg#85186)
- Client-side media: Upgrade wasm-vips to 0.0.19 and raise memory budgets accordingly (WordPress/gutenberg#84980)
- Styles: Fix inconsistent 'Elements' tools panel heading level (WordPress/gutenberg#85247)
- `media-utils`/MediaEdit: use design system focus ring (WordPress/gutenberg#84940)
- Icons: Add new form based icons. (WordPress/gutenberg#84074) (WordPress/gutenberg#85360)
- Navigation: keep custom CSS off inner list containers (WordPress/gutenberg#84881) (WordPress/gutenberg#85367)
- Navigation: keep Global Styles custom CSS off inner list containers (WordPress/gutenberg#85366)
- Edit as HTML: Show design system focus ring on the HTML textarea (WordPress/gutenberg#85266) (WordPress/gutenberg#85359)
- Icons: Restore the missing speech bubble in postComments (WordPress/gutenberg#85275)
- Block Directory: Standardize downloadable block focus indicators (WordPress/gutenberg#85307)
- Global Styles: Add icons and tweak styling for element and block buttons (WordPress/gutenberg#85363) (WordPress/gutenberg#85414)
- Tests: Stop asserting Core lacks the core fields functions (WordPress/gutenberg#85201)
- Meta Boxes: Use the design system focus ring for the panel toggle (WordPress/gutenberg#85355) (WordPress/gutenberg#85410)
- DataViews: Use the design system focus ring for list items. (WordPress/gutenberg#85358) (WordPress/gutenberg#85435)
- Components: Standardize checkbox and radio focus outlines (WordPress/gutenberg#85379) (WordPress/gutenberg#85436)
- UI: Use solid brand highlights for popup items (WordPress/gutenberg#84087)
- Media: Preserve EXIF metadata when converting HEIC to JPEG client-side (WordPress/gutenberg#82040)
- Icons: Add error, info and postComments to the core-admin collection (WordPress/gutenberg#85452)
- UnitControl: Use the design system outline for the unit select focus ring (WordPress/gutenberg#85444)
- Page List: Keep pages visible in the Navigation sidebar in contentOnly (WordPress/gutenberg#85357)
- Icons: Add new asterisk icon (WordPress/gutenberg#85442) (WordPress/gutenberg#85498)
- wp-env: Keep Debian security updates in Bullseye-based images (WordPress/gutenberg#85469)
- Editor: Guard entity preload filters and share entity actions/fields logic (WordPress/gutenberg#85390) (WordPress/gutenberg#85499)
- UI: Scale Spinner stroke width with its size (WordPress/gutenberg#85378)
- [WP 7.2] Fix the block-library TypeScript test project (WordPress/gutenberg#85533)
- Editor: Vertically center the Categories loading spinner (WordPress/gutenberg#85563)
- DataViews: Render table bulk actions outside the table (WordPress/gutenberg#85250) (WordPress/gutenberg#85571)
- Record e2e traces only when a failed test is retried (WordPress/gutenberg#85428)
- Writing flow: fix triple click in a list item selecting the next item (WordPress/gutenberg#85569)
- Build: Limit concurrent wp-build builds (WordPress/gutenberg#79889)
- Icons: Promote Dashicon replacements to `core-admin` and map their Dashicons (WordPress/gutenberg#85541)
  
Props peterwilsoncc, mamaduka.
See #66340
Built from https://develop.svn.wordpress.org/trunk@64796


git-svn-id: http://core.svn.wordpress.org/trunk@63946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
arshidkv12 pushed a commit to arshidkv12/wordpress-develop that referenced this pull request Nov 21, 2026
This updates the pinned commit hash of the Gutenberg repository from `be6a50be6834e922b9db12c75c9a2cd817b2db59` to `d72020a651eda64dcc53b5dbd5b9d5bd511c4cc9` (version 24.3.0-rc.1).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@be6a50b...d72020a

- BorderControl: Remove double focus outline (WordPress/gutenberg#85173)
- Snackbar: Use design system focus ring (WordPress/gutenberg#85168)
- SelectControl: Fix default options showing the `Select` placeholder (WordPress/gutenberg#85172)
- Actions API: Remove the unsupported `single` action context (WordPress/gutenberg#85186)
- Client-side media: Upgrade wasm-vips to 0.0.19 and raise memory budgets accordingly (WordPress/gutenberg#84980)
- Styles: Fix inconsistent 'Elements' tools panel heading level (WordPress/gutenberg#85247)
- `media-utils`/MediaEdit: use design system focus ring (WordPress/gutenberg#84940)
- Icons: Add new form based icons. (WordPress/gutenberg#84074) (WordPress/gutenberg#85360)
- Navigation: keep custom CSS off inner list containers (WordPress/gutenberg#84881) (WordPress/gutenberg#85367)
- Navigation: keep Global Styles custom CSS off inner list containers (WordPress/gutenberg#85366)
- Edit as HTML: Show design system focus ring on the HTML textarea (WordPress/gutenberg#85266) (WordPress/gutenberg#85359)
- Icons: Restore the missing speech bubble in postComments (WordPress/gutenberg#85275)
- Block Directory: Standardize downloadable block focus indicators (WordPress/gutenberg#85307)
- Global Styles: Add icons and tweak styling for element and block buttons (WordPress/gutenberg#85363) (WordPress/gutenberg#85414)
- Tests: Stop asserting Core lacks the core fields functions (WordPress/gutenberg#85201)
- Meta Boxes: Use the design system focus ring for the panel toggle (WordPress/gutenberg#85355) (WordPress/gutenberg#85410)
- DataViews: Use the design system focus ring for list items. (WordPress/gutenberg#85358) (WordPress/gutenberg#85435)
- Components: Standardize checkbox and radio focus outlines (WordPress/gutenberg#85379) (WordPress/gutenberg#85436)
- UI: Use solid brand highlights for popup items (WordPress/gutenberg#84087)
- Media: Preserve EXIF metadata when converting HEIC to JPEG client-side (WordPress/gutenberg#82040)
- Icons: Add error, info and postComments to the core-admin collection (WordPress/gutenberg#85452)
- UnitControl: Use the design system outline for the unit select focus ring (WordPress/gutenberg#85444)
- Page List: Keep pages visible in the Navigation sidebar in contentOnly (WordPress/gutenberg#85357)
- Icons: Add new asterisk icon (WordPress/gutenberg#85442) (WordPress/gutenberg#85498)
- wp-env: Keep Debian security updates in Bullseye-based images (WordPress/gutenberg#85469)
- Editor: Guard entity preload filters and share entity actions/fields logic (WordPress/gutenberg#85390) (WordPress/gutenberg#85499)
- UI: Scale Spinner stroke width with its size (WordPress/gutenberg#85378)
- [WP 7.2] Fix the block-library TypeScript test project (WordPress/gutenberg#85533)
- Editor: Vertically center the Categories loading spinner (WordPress/gutenberg#85563)
- DataViews: Render table bulk actions outside the table (WordPress/gutenberg#85250) (WordPress/gutenberg#85571)
- Record e2e traces only when a failed test is retried (WordPress/gutenberg#85428)
- Writing flow: fix triple click in a list item selecting the next item (WordPress/gutenberg#85569)
- Build: Limit concurrent wp-build builds (WordPress/gutenberg#79889)
- Icons: Promote Dashicon replacements to `core-admin` and map their Dashicons (WordPress/gutenberg#85541)
  
Props peterwilsoncc, mamaduka.
See #66340

git-svn-id: https://develop.svn.wordpress.org/trunk@64796 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported to WP Core Pull request that has been successfully merged into WP Core [Package] UI /packages/ui [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants