Skip to content

Styles: Fix inconsistent 'Elements' tools panel heading level - #85247

Merged
talldan merged 2 commits into
trunkfrom
fix/element-panel-heading-level
Oct 21, 2026
Merged

talldan merged 2 commits into
trunkfrom
fix/element-panel-heading-level

Conversation

@talldan

@talldan talldan commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

What?

Fixes a small inconsistency with the 'Elements' tools panel heading level.

In trunk this was hard-coded as heading level 3, inconsistent with other panels. It was like that because previously it was rendered in a different location.

After it was moved, the heading level wasn't changed, and the 3 level ended up being inconsistent with every other tools panel, which uses heading level 2.

The result was an all-caps heading, and incorrect heading hierarchy.

How?

Delete the explicit heading panel. In the code this is a ColorToolsPanel. Despite the misleading name, my understanding is this has no impact on other panels.

Testing Instructions

Global styles

  1. Open the editor - either edit a post with 'Show template' on or a template in the site editor
  2. Opent the Global Styles sidebar
  3. Go to 'Blocks and Elements'
  4. Open the paragraph block
  5. Observe the elements tools panel no longer has an all caps title.

Unsynced patterns

  1. Create or insert an unsynced pattern with a paragraph inside it
  2. With the unsynced pattern selected, open the block inspector and switch to the styles tab
  3. Observe the elements tools panel no longer has an all caps title.

Screenshots or screencast

Before After
Screenshot 2026-10-21 at 11 36 53 am Screenshot 2026-10-21 at 11 47 11 am

Use of AI Tools

OpenCode / Gemini 3.8 Flash

@talldan talldan self-assigned this Oct 21, 2026
@talldan talldan added the [Type] Bug An existing feature does not function as intended label Oct 21, 2026
@talldan
talldan requested a review from ellatrix as a code owner October 21, 2026 04:07
@talldan talldan added Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Oct 21, 2026
@github-actions github-actions Bot added the [Package] Block editor /packages/block-editor label Oct 21, 2026
@github-actions

github-actions Bot commented Oct 21, 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: talldan <talldanwp@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@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.

📦 Bundle size

Size Change: -4 B (0%)

Total Size: 9.05 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 603 kB -4 B (0%)

c1013ef Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric e7c9824 trunk % Change
timeToFirstByte 54.95 ms +10.1% -6.64% 54.7 ms +10.42% -3.38% 0.46%
largestContentfulPaint 92 ms +8.7% -4.35% 92 ms +4.35% -4.35% 0%
lcpMinusTtfb 38.7 ms +6.33% -13.31% 38.05 ms +12.22% -11.7% 1.71%
wpBeforeTemplate 29.95 ms +10.82% -6.98% 28.8 ms +11.22% -1.84% 3.99%
wpTemplate 21.21 ms +3.82% -7.02% 21.36 ms +4.78% -4.4% -0.7%
wpTotal 51.25 ms +9.62% -6.85% 50.87 ms +10.05% -3.58% 0.75%
wpMemoryUsage 7.65 MB +0% -0% 7.61 MB +0% -0% 0.46%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric e7c9824 trunk % Change
timeToFirstByte 45 ms +6.22% -1.44% 46 ms +8.91% -1.09% -2.17%
largestContentfulPaint 100 ms +2% -4% 100 ms +6% -0% 0%
lcpMinusTtfb 54.4 ms +1.1% -4.5% 54.85 ms +2.37% -1% -0.82%
wpBeforeTemplate 26.13 ms +3.37% -0.92% 26.87 ms +7.74% -2.34% -2.75%
wpTemplate 15.7 ms +5.99% -1.08% 16.34 ms +3.55% -3.18% -3.92%
wpTotal 41.98 ms +5.88% -1.5% 43 ms +8.65% -1.7% -2.37%
wpMemoryUsage 6.34 MB +0% -0% 6.30 MB +0% -0% 0.57%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric e7c9824 trunk % Change
mediaProcessingJpeg 398.13 ms +1.09% -1.7% 405.4 ms +1.84% -0.64% -1.79%
mediaProcessingAvif 6105.17 ms +0.4% -0.34% 6121.09 ms +0.04% -0.14% -0.26%
mediaProcessingJpegToAvif 4205.79 ms +0.64% -0.29% 4235.8 ms +0.27% -0.46% -0.71%

media-upload

Metric e7c9824 trunk % Change
jpegUploadProcessing 1460.07 ms +33.77% -1.95% 1442.26 ms +1.42% -1.75% 1.23%
pngUploadProcessing 187.83 ms +9.28% -6.32% 216.57 ms +6.14% -17.92% -13.27%
largeJpegUploadProcessing 1430.58 ms +0.33% -1.62% 1421.84 ms +0.53% -0.85% 0.61%
multipleImageUploadProcessing 2029.68 ms +0.18% -6.75% 2036.64 ms +2.23% -19.82% -0.34%

post-editor

Metric e7c9824 trunk % Change
serverResponse 517.45 ms +5.9% -8.61% 523.7 ms +4.94% -7.45% -1.19%
firstPaint 377.6 ms +41.09% -37.66% 493.63 ms +7.2% -47.18% -23.51%
domContentLoaded 1226.53 ms +1.05% -1.66% 1231.53 ms +1.89% -2.84% -0.41%
loaded 1227.62 ms +1.05% -1.64% 1232.68 ms +1.91% -2.83% -0.41%
firstContentfulPaint 524.24 ms +3.69% -5.6% 529.52 ms +1.95% -1.37% -1%
firstBlock 3697.49 ms +1.74% -2.4% 3670.35 ms +2.74% -0.93% 0.74%
type 18.01 ms +3.22% -3.66% 17.86 ms +3.14% -2.18% 0.84%
typeWithoutInspector 18.09 ms +10.67% -6.08% 17.42 ms +5.74% -3.56% 3.85%
typeWithTopToolbar 25.34 ms +1.14% -8.25% 22.11 ms +6.83% -4.21% 14.61%
typeContainer 9.07 ms +5.07% -7.72% 8.49 ms +3.06% -6.95% 6.83%
focus 133.09 ms +3.54% -5.05% 127.01 ms +7.52% -5.24% 4.79%
firstFocus 244.77 ms +0% -0% 247.58 ms +0% -0% -1.13%
selectAll 671.7 ms +1.54% -2.65% 606.92 ms +2.93% -2.96% 10.67%
listViewOpen 85.61 ms +1.86% -3.53% 82.31 ms +12.1% -5.77% 4.01%
inserterOpen 40.79 ms +9.12% -9.05% 42.2 ms +5.59% -8.32% -3.34%
inserterHover 12.14 ms +6.51% -9.64% 12.29 ms +6.35% -8.3% -1.22%
inserterSearch 7.76 ms +6.19% -4.77% 8.51 ms +6.58% -11.16% -8.81%
loadPatterns 629.61 ms +1.36% -1.79% 641.98 ms +5.35% -1.89% -1.93%
wpTotal 506.52 ms +5.77% -8.55% 512.47 ms +4.84% -7.4% -1.16%
wpMemoryUsage 14.66 MB +0% -0% 14.63 MB +0% -0% 0.23%
wpDbQueries 55 +0% -1.82% 54.5 +0.92% -0.92% 0.92%

site-editor

Metric e7c9824 trunk % Change
serverResponse 308.87 ms +3.42% -3.52% 313.11 ms +1.68% -4.78% -1.35%
firstPaint 201.75 ms +27.79% -10.33% 195.09 ms +28.9% -3.64% 3.41%
domContentLoaded 982.62 ms +1.37% -0.66% 966.7 ms +1.58% -2.57% 1.65%
loaded 983.56 ms +1.37% -0.67% 967.78 ms +1.56% -2.61% 1.63%
firstContentfulPaint 410.1 ms +2.62% -2.82% 392.66 ms +1.71% -22.92% 4.44%
firstBlock 3600.87 ms +0.37% -0.91% 3542.44 ms +0.94% -1.16% 1.65%
type 16.3 ms +3.07% -3.99% 15.85 ms +3.03% -4.42% 2.84%
navigate 92.47 ms +9.04% -2.03% 92.75 ms +7.41% -3.89% -0.3%
loadPatterns 970.18 ms +6.43% -4.81% 991.73 ms +4.23% -3.83% -2.17%
loadPages 1048.77 ms +5.95% -1.86% 1036.89 ms +4% -0.62% 1.15%
wpTotal 300.85 ms +3.48% -3.72% 304.92 ms +1.84% -4.81% -1.33%
wpMemoryUsage 12.70 MB +0% -0% 12.66 MB +0% -0% 0.29%
wpDbQueries 44 +2.27% -0% 44 +2.27% -0% 0%

c1013ef 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
navigates forward, backward, and forward again correctly (Site Editor v2) in /test/e2e/specs/site-editor/dataviews-pagination.spec.js, passed after 1 failed attempt.
Error: apiRequestContext.get: socket hang up
Call log:
  - → GET http://localhost:8889/wp-admin/themes.php?action=activate&stylesheet=twentytwentyone&_wpnonce=17033730a7
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_23778236db82f19306f247e20a353a99=admin%7C1792728872%7CQc95ObDJ2ho1mtxw5etF8YOodEPlR53ltsfOKM8YCDe%7C6e8e700bf60d6c7766fd56dc9cbce82cd167f07cff410f969974ff4375b459da; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1792728872%7CQc95ObDJ2ho1mtxw5etF8YOodEPlR53ltsfOKM8YCDe%7Cdfe318de9916eb2fbfbe41ba16ddb33ee7a1dd34ec208a33dc8c63483c41087f; wp-settings-time-1=1792556136
  - ← 302 Found
    - date: Wed, 21 Oct 2026 04:15:36 GMT
    - server: Apache/2.4.68 (Debian)
    - x-powered-by: PHP/8.3.35
    - expires: Wed, 11 Jan 1984 05:00:00 GMT
    - cache-control: no-cache, must-revalidate, max-age=0, private
    - referrer-policy: strict-origin-when-cross-origin
    - x-frame-options: SAMEORIGIN
    - content-security-policy: frame-ancestors 'self';
    - x-redirect-by: WordPress
    - location: http://localhost:8889/wp-admin/themes.php?activated=true
    - server-timing: wpTotal;dur=31.08, wpMemoryUsage;dur=4908168, wpDbQueries;dur=42
    - content-length: 0
    - keep-alive: timeout=5, max=95
    - connection: Keep-Alive
    - content-type: text/html; charset=UTF-8
  - → GET http://localhost:8889/wp-admin/themes.php?activated=true
    - user-agent: Playwright/1.63.0 (x64; ubuntu 24.04) node/24.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - host: localhost:8889
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_23778236db82f19306f247e20a353a99=admin%7C1792728872%7CQc95ObDJ2ho1mtxw5etF8YOodEPlR53ltsfOKM8YCDe%7C6e8e700bf60d6c7766fd56dc9cbce82cd167f07cff410f969974ff4375b459da; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1792728872%7CQc95ObDJ2ho1mtxw5etF8YOodEPlR53ltsfOKM8YCDe%7Cdfe318de9916eb2fbfbe41ba16ddb33ee7a1dd34ec208a33dc8c63483c41087f; wp-settings-time-1=1792556136

    at RequestUtils.activateTheme (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/themes.ts:45:32)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/dataviews-pagination.spec.js:40: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-21T04:25:03", "date_gmt": "2026-10-21T04:25:03", "description": {"rendered": "<p class=\"attachment\"><a href='http://localhost:8889/wp-content/uploads/2026/10/89e13fe3-b85b-4776-85ed-6ff93cc96b6a.png'><img loading=\"lazy\" decoding=\"async\" width=\"10\" height=\"10\" src=\"http://localhost:8889/wp-content/uploads/2026/10/89e13fe3-b85b-4776-85ed-6ff93cc96b6a.png\" class=\"attachment-medium size-medium\" alt=\"\" style=\"width:100%;height:100%;max-width:10px;\" /></a></p>
"}, "featured_media": 0, "filename": "89e13fe3-b85b-4776-85ed-6ff93cc96b6a.png", "filesize": 80, "guid": {"rendered": "http://localhost:8889/wp-content/uploads/2026/10/89e13fe3-b85b-4776-85ed-6ff93cc96b6a.png"}, "id": 223, "link": "http://localhost:8889/?attachment_id=223", "media_details": {"file": "2026/10/89e13fe3-b85b-4776-85ed-6ff93cc96b6a.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-21T04:25:03", "modified_gmt": "2026-10-21T04:25:03", "ping_status": "closed", "post": 222, "slug": "89e13fe3-b85b-4776-85ed-6ff93cc96b6a", "source_url": "http://localhost:8889/wp-content/uploads/2026/10/89e13fe3-b85b-4776-85ed-6ff93cc96b6a.png", "status": "inherit", "template": "", "title": {"rendered": "89e13fe3-b85b-4776-85ed-6ff93cc96b6a"}, "type": "attachment"}]
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js:71:45
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 2 failed attempts.
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
TypeError: resolvers.pop(...) is not a function
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/interactivity/router-navigate.spec.ts:156:18
two users concurrently move list items (RTC WebSocket) in /test/e2e/specs/editor/collaboration/collaboration-stress.spec.ts, passed after 1 failed attempt.
Error: expect(received).toBeLessThan(expected)

Expected: < 3
Received:   4

Call Log:
- Timeout 10000ms exceeded while waiting on the predicate
    at assertMovedOrder (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/collaboration-stress.spec.ts:646:8)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/collaboration-stress.spec.ts:650:10

c1013ef Run

@talldan talldan 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 21, 2026

@andrewserong andrewserong 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.

Good catch!

Before After
Image Image

@talldan
talldan merged commit f6c2be0 into trunk Oct 21, 2026
126 checks passed
@talldan
talldan deleted the fix/element-panel-heading-level branch October 21, 2026 04:48
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 21, 2026
gutenbergplugin pushed a commit that referenced this pull request Oct 21, 2026
* Remove explicit heading level on ColorToolsPanel

* Changelog

----

Co-authored-by: talldan <talldanwp@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
@github-actions github-actions Bot added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Oct 21, 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: caad806

@talldan talldan added the Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) label Oct 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport to Gutenberg RC Pull request that needs to be backported to a Gutenberg release candidate (RC) Backported to WP Core Pull request that has been successfully merged into WP Core [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json [Package] Block editor /packages/block-editor [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants