Skip to content

Navigation: keep custom CSS off inner list containers (#84881) - #85367

Merged
ramonjd merged 1 commit into
wp/7.2from
fix/backport-84881-wp-7.2
Oct 22, 2026
Merged

ramonjd merged 1 commit into
wp/7.2from
fix/backport-84881-wp-7.2

Conversation

@ramonjd

@ramonjd ramonjd commented Oct 22, 2026

Copy link
Copy Markdown
Member

Cherry-pick of #84881 into wp/7.2, after the failed automatic cherry-pick.

The only conflict was in packages/block-library/CHANGELOG.md. I added the #84881 entry under Unreleased and left out the #85244 entry, which is not on this branch. The PHP changes are identical to trunk.

Use of AI Tools

Claude Code did the cherry-pick and resolved the changelog conflict.

Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
Co-authored-by: talldan <talldanwp@git.wordpress.org>
(cherry picked from commit 97f7da4)
@ramonjd
ramonjd requested a review from fabiankaegy as a code owner October 22, 2026 05:28
@ramonjd ramonjd added [Type] Bug An existing feature does not function as intended [Package] Block library /packages/block-library [Block] Navigation Affects the Navigation Block labels 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: ramonjd <ramonopoly@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.

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 1b0f7f3 wp/7.2 % Change
timeToFirstByte 56.7 ms +12.96% -3.62% 54.95 ms +7.55% -5% 3.18%
largestContentfulPaint 96 ms +4.17% -6.25% 92 ms +8.7% -4.35% 4.35%
lcpMinusTtfb 35.05 ms +9.56% -4.85% 38.45 ms +10.66% -13.65% -8.84%
wpBeforeTemplate 29.97 ms +13.18% -4.54% 28.99 ms +7.59% -2.41% 3.38%
wpTemplate 22.55 ms +4.97% -6.74% 21.81 ms +3.21% -6.46% 3.39%
wpTotal 52.75 ms +12.13% -3.79% 51.06 ms +8.09% -4.88% 3.31%
wpMemoryUsage 7.66 MB +0% -0% 7.63 MB +0% -0% 0.42%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric 1b0f7f3 wp/7.2 % Change
timeToFirstByte 42.55 ms +5.99% -2.47% 46.25 ms +7.03% -2.38% -8%
largestContentfulPaint 88 ms +4.55% -0% 100 ms +4% -0% -12%
lcpMinusTtfb 46.85 ms +3.95% -2.24% 53.9 ms +1.95% -2.5% -13.08%
wpBeforeTemplate 26.7 ms +1.01% -1.5% 26.57 ms +9.52% -2.11% 0.49%
wpTemplate 12.81 ms +2.5% -7.26% 16.7 ms +1.56% -4.61% -23.29%
wpTotal 39.46 ms +5.83% -1.85% 43.27 ms +7.42% -2.94% -8.81%
wpMemoryUsage 6.24 MB +0% -0% 6.32 MB +0% -0% -1.25%
wpDbQueries 9 +0% -0% 13 +0% -0% -30.77%

media-processing

Metric 1b0f7f3 wp/7.2 % Change
mediaProcessingJpeg 400.75 ms +1.81% -1.4% 403.97 ms +4.53% -0.49% -0.8%
mediaProcessingAvif 6133.13 ms +0.44% -0.03% 6129.7 ms +0.03% -0.25% 0.06%
mediaProcessingJpegToAvif 4240.6 ms +0.17% -0.26% 4225.02 ms +0.14% -0.07% 0.37%

media-upload

Metric 1b0f7f3 wp/7.2 % Change
jpegUploadProcessing 1930.98 ms +1.58% -0.87% 1919.87 ms +1.37% -0.23% 0.58%
pngUploadProcessing 171.52 ms +8.88% -3.98% 180.04 ms +38.35% -6.97% -4.73%
largeJpegUploadProcessing 1938.32 ms +0.71% -0.51% 1925.21 ms +0.19% -0.2% 0.68%
multipleImageUploadProcessing 2024.99 ms +0.99% -1.49% 2006.1 ms +0.87% -0.4% 0.94%

post-editor

Metric 1b0f7f3 wp/7.2 % Change
serverResponse 518.19 ms +7.26% -4.9% 492.02 ms +8.97% -1.17% 5.32%
firstPaint 527.95 ms +9.49% -40.79% 523.66 ms +4.37% -11.38% 0.82%
domContentLoaded 1292.56 ms +2.28% -2.41% 1246.45 ms +3.34% -1.26% 3.7%
loaded 1293.93 ms +2.25% -2.41% 1247.68 ms +3.33% -1.25% 3.71%
firstContentfulPaint 576.55 ms +1.36% -4.21% 542.87 ms +2.2% -4.42% 6.2%
firstBlock 4004 ms +0.73% -0.64% 3784.61 ms +6.77% -0.88% 5.8%
type 20.08 ms +6.57% -3.24% 20.27 ms +5.82% -8.73% -0.94%
typeWithoutInspector 21.14 ms +2.46% -1.47% 18.87 ms +6.68% -5.46% 12.03%
typeWithTopToolbar 27.95 ms +2.72% -3.83% 24.2 ms +4.34% -8.31% 15.5%
typeContainer 9.99 ms +3.3% -5.81% 9.32 ms +13.95% -1.5% 7.19%
focus 136.68 ms +5.22% -2.6% 117.44 ms +6.5% -7.2% 16.38%
firstFocus 265.97 ms +0% -0% 231.93 ms +0% -0% 14.68%
selectAll 603.77 ms +1.56% -2.16% 589.82 ms +3.11% -2.95% 2.37%
listViewOpen 84.34 ms +18.21% -3.01% 79.89 ms +9.78% -1.59% 5.57%
inserterOpen 44.42 ms +4.32% -8.33% 43.46 ms +1.93% -5.59% 2.21%
inserterHover 12.65 ms +4.03% -8.54% 12.02 ms +8.15% -11.23% 5.24%
inserterSearch 8.51 ms +7.76% -11.05% 7.86 ms +2.54% -5.09% 8.27%
loadPatterns 671.88 ms +1.05% -1.5% 615.96 ms +4.03% -2.5% 9.08%
wpTotal 508.17 ms +7.52% -4.95% 482.08 ms +8.81% -1.21% 5.41%
wpMemoryUsage 14.67 MB +0% -0% 14.64 MB +0% -0% 0.21%
wpDbQueries 54.5 +0.92% -0.92% 55 +0% -1.82% -0.91%

site-editor

Metric 1b0f7f3 wp/7.2 % Change
serverResponse 512.04 ms +3.61% -1% 504.61 ms +5.57% -2.66% 1.47%
firstPaint 287.79 ms +6.07% -15.05% 279.46 ms +11.13% -4.5% 2.98%
domContentLoaded 1286.7 ms +0.88% -0.72% 1329.11 ms +3.05% -0.58% -3.19%
loaded 1287.98 ms +0.86% -0.72% 1330.43 ms +3.1% -0.6% -3.19%
firstContentfulPaint 522.44 ms +0.96% -5.51% 549.65 ms +2.17% -7.18% -4.95%
firstBlock 4913.68 ms +0.7% -0.29% 5095.15 ms +1.63% -1.57% -3.56%
type 19.99 ms +8% -2.75% 19.68 ms +4.93% -3.1% 1.58%
navigate 126.78 ms +9.92% -11.07% 130.71 ms +5.98% -11.25% -3.01%
loadPatterns 1249.73 ms +4.42% -2.84% 1351.83 ms +2.18% -5.03% -7.55%
loadPages 1041.68 ms +2.77% -1.97% 1071.69 ms +4.78% -3.26% -2.8%
wpTotal 502.72 ms +3.6% -1.23% 495.14 ms +5.57% -2.77% 1.53%
wpMemoryUsage 12.71 MB +0% -0% 12.67 MB +0% -0% 0.27%
wpDbQueries 44 +2.27% -0% 44 +2.27% -0% 0%

084d597 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
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).toBeFocused() failed

Locator: getByRole('combobox', { name: 'Search or type URL' })
Expected: focused
Timeout: 5000ms
Error: element(s) not found

Call log:
  - Expect "toBeFocused" getByRole('combobox', { name: 'Search or type URL' }) with timeout 5000ms
  - waiting for getByRole('combobox', { name: 'Search or type URL' })

    at LinkControl.useLinkControlSearch (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:389:47)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-sidebar-list-view.spec.js:179:21
drags a multi-selection from anywhere inside it in /test/e2e/specs/editor/various/draggable-blocks.spec.js, passed after 2 failed attempts.
TypeError: Cannot read properties of null (reading 'y')
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:824:57
    at dragSelectionBelowLanding (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:823:3)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:844:3
TypeError: Cannot read properties of null (reading 'y')
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:824:57
    at dragSelectionBelowLanding (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:823:3)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/draggable-blocks.spec.js:844: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-22T05:47:00", "date_gmt": "2026-10-22T05:47:00", "description": {"rendered": "<p class=\"attachment\"><a href='http://localhost:8889/wp-content/uploads/2026/10/64548495-804c-4236-93f8-d5f6bf475783.png'><img loading=\"lazy\" decoding=\"async\" width=\"10\" height=\"10\" src=\"http://localhost:8889/wp-content/uploads/2026/10/64548495-804c-4236-93f8-d5f6bf475783.png\" class=\"attachment-medium size-medium\" alt=\"\" style=\"width:100%;height:100%;max-width:10px;\" /></a></p>
"}, "featured_media": 0, "filename": "64548495-804c-4236-93f8-d5f6bf475783.png", "filesize": 80, "guid": {"rendered": "http://localhost:8889/wp-content/uploads/2026/10/64548495-804c-4236-93f8-d5f6bf475783.png"}, "id": 223, "link": "http://localhost:8889/?attachment_id=223", "media_details": {"file": "2026/10/64548495-804c-4236-93f8-d5f6bf475783.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-22T05:47:00", "modified_gmt": "2026-10-22T05:47:00", "ping_status": "closed", "post": 222, "slug": "64548495-804c-4236-93f8-d5f6bf475783", "source_url": "http://localhost:8889/wp-content/uploads/2026/10/64548495-804c-4236-93f8-d5f6bf475783.png", "status": "inherit", "template": "", "title": {"rendered": "64548495-804c-4236-93f8-d5f6bf475783"}, "type": "attachment"}]
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/various/single-file-placeholder-drop.spec.js:71:45

084d597 Run

@ramonjd

ramonjd commented Oct 22, 2026

Copy link
Copy Markdown
Member Author

This failing test is unrelated and failing on all committed branches to wp/7.0

https://github.com/WordPress/gutenberg/commits/wp/7.2/

1) Tests_Entity_Fields_API::test_the_core_collections_are_registered_at_priority_zero
The Gutenberg build prefixes the function.
Failed asserting that true is false.

/var/www/html/wp-content/plugins/gutenberg/phpunit/entity-fields-api-test.php:708
phpvfscomposer:///var/www/html/wp-content/plugins/gutenberg/vendor/phpunit/phpunit/phpunit:106

--

Copilot AI 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.

🟢 Approval recommended

The focused rendering change has regression coverage and no identified blocking issues; tests were not executed during this review.

No open issues 🎉

What changed in this PR

Backports the Navigation custom CSS fix to wp/7.2, keeping Additional CSS on the outer wrapper rather than duplicating it on inner lists.

Changes:

  • Removes the outer Navigation block’s generated custom CSS class from its local list containers.
  • Adds a regression test verifying wrapper-only application.
  • Records the fix under the block-library changelog’s Unreleased section.
File Description
phpunit/​blocks/​render-block-navigation-test.php Adds regression coverage for wrapper-only custom CSS.
packages/​block-library/​src/​navigation/​index.php Removes the duplicated custom CSS class from inner containers.
packages/​block-library/​CHANGELOG.md Documents the Navigation fix.

Review effort: Balanced

@ramonjd
ramonjd merged commit f4f6423 into wp/7.2 Oct 22, 2026
119 of 125 checks passed
@ramonjd
ramonjd deleted the fix/backport-84881-wp-7.2 branch October 22, 2026 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Navigation Affects the Navigation Block [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants