Skip to content

Page List: Keep pages visible in the Navigation sidebar - #85357

Merged
jeryj merged 4 commits into
WordPress:trunkfrom
drewmt:fix/page-list-navigation-sidebar
Oct 23, 2026
Merged

jeryj merged 4 commits into
WordPress:trunkfrom
drewmt:fix/page-list-navigation-sidebar

Conversation

@drewmt

@drewmt drewmt commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What?

Closes #85294.

Keep the pages generated by a Page List block visible in the Site Editor's Navigation sidebar, including nested pages.

Why?

The Navigation sidebar now uses content-only editing. The Page List block is marked as content, but its generated Page List Item blocks are not. List View therefore filters out those items. On a fresh Twenty Twenty-Five site, the canvas shows “Sample Page” while the sidebar contains no page rows.

How?

Declare the existing contentRole support for Page List Item, following the owning Page List block, and regenerate its public support references. No generic filtering or locking rules change, and no saved menu content is rewritten.

Add two integration cases using the real block metadata and block-editor registry: generated parent/child page items remain in the List View tree, and explicitly disabling a page item still hides it and its descendants. The change is in shared block metadata, not a separate implementation for one Site Editor screen.

Testing Instructions

  1. Build this branch and activate the Gutenberg plugin on WordPress 7.2 Beta 1 with Twenty Twenty-Five.
  2. Use an existing Navigation menu containing only a Page List block, or start with the theme's default menu. Keep at least one published page.
  3. Open Appearance → Editor → Navigation. Confirm the pages shown in the canvas also appear in the sidebar. With parent and child pages, confirm their hierarchy is retained.
  4. Select a generated page row. The existing “Detach Page List” confirmation should open. Cancel it. The menu should remain generated, with no unsaved change.

Local validation on Node 24.19.0/npm 12.0.2 at base 168e4f4a22dc3555415d74a4d448251706dd046f:

  • Fresh lockfile installation, normal prepare hooks, production build, scoped JavaScript lint, formatting, block-library typecheck and whitespace checks pass.
  • The hierarchy regression fails before the metadata change, receiving an empty tree; the explicit-disabled control passes. Both focused cases pass with the change. The final TypeScript cases were also checked against the unchanged production metadata.
  • The full block-library suite runs 775 tests: 772 pass and three Cover media-editor Undo cases fail with vi.mocked(...).mockResolvedValue is not a function. The same three failures reproduce on the unchanged production baseline, alongside the expected new Page List regression failure. No tests were skipped or weakened. This is not a fully passing suite claim.
  • Real Chrome verification in a disposable WordPress 7.2 Beta 1/PHP 8.3 fixture confirms the empty sidebar before the change and the restored “Sample Page” row after rebuilding. Mouse and Enter still open the detachment confirmation; Escape cancels and returns focus to the row. Detachment was not confirmed and no menu change was saved.
  • No local full monorepo test run, automated Site Editor E2E run, separate extensible-editor UI run, or manual screen-reader test is claimed. The initial upstream head passed the unit and E2E workflows. Static analysis exposed a missing dev TypeScript project, addressed in the follow-up; current-head upstream results are tracked in Checks.
  • Follow-up validation passes for the separate block-library build/dev TypeScript projects, both direct consumers (edit-site and the guidelines route), the repository tsconfig validator, production build, two focused regression cases, formatting and changelog validation requiring this PR's actual number. The source build configuration is preserved; test types stay in the dev project.

Testing Instructions for Keyboard

  1. Navigate to the restored page row in the Navigation sidebar using the keyboard.
  2. Press Enter. Confirm the “Detach Page List” dialog opens.
  3. Press Escape. Confirm the dialog closes, focus returns to the page row, and the menu remains unchanged. Do not activate Detach.

Screenshots or screencast

Before: “Sample Page” is rendered in the canvas, but no corresponding page row appears in the Navigation sidebar. After: the same page appears in both places. This was visually verified in Chrome with the built plugin.

@github-actions github-actions Bot added the [Package] Block library /packages/block-library 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: drewmt <linewebdigital@git.wordpress.org>
Co-authored-by: jeryj <jeryj@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: mmtr <mmtr86@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.

@github-actions github-actions Bot added the [Package] Edit Site /packages/edit-site label Oct 22, 2026
@github-actions github-actions Bot removed the [Package] Edit Site /packages/edit-site label Oct 23, 2026
@jeryj jeryj added [Type] Bug An existing feature does not function as intended [Block] Navigation Affects the Navigation Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Oct 23, 2026

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

Thanks for the quick fix! Adding a content role to the page list block looks like the correct fix here. Tested well.

@jeryj
jeryj enabled auto-merge (squash) October 23, 2026 16:09
@jeryj
jeryj merged commit 67f538a into WordPress:trunk Oct 23, 2026
106 checks passed
@github-actions github-actions Bot added this to the Gutenberg 24.4 milestone Oct 23, 2026
@t-hamano

Copy link
Copy Markdown
Contributor

This fixes a regression introduced in 7.2, so let's backport it.

@t-hamano t-hamano 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 24, 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 24, 2026
gutenbergplugin pushed a commit that referenced this pull request Oct 24, 2026
#85357)

Co-authored-by: drewmt <linewebdigital@git.wordpress.org>
Co-authored-by: jeryj <jeryj@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: mmtr <mmtr86@git.wordpress.org>
Co-authored-by: Jerry Jones <jones.jeremydavid@gmail.com>
@github-actions github-actions Bot added the Backported to WP Core Pull request that has been successfully merged into WP Core label Oct 24, 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: 73dc6aa

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.

Can this be tested via an e2e test instead of a unit test? LLMs like to suggest unit tests for everything, but in practice, they rarely catch regressions in similar cases.

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.

I had an e2e test written for it, but wasn't sure it was worth the weight. I can push what I had if you'd like. I think I still have the session open.

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 [Block] Navigation Affects the Navigation Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [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.

Site Editor: Navigation sidebar is empty when the menu uses a Page List block

4 participants