Skip to content

Navigation: Edit links in a popover from the sidebar List View - #84005

Draft
jeryj wants to merge 1 commit into
trunkfrom
update/navigation-sidebar-link-popover
Draft

jeryj wants to merge 1 commit into
trunkfrom
update/navigation-sidebar-link-popover

Conversation

@jeryj

@jeryj jeryj commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

What?

Closes #77071

Selecting a navigation link or submenu in the sidebar List View opens the same content popover that content-only List View editing uses, so existing items can be edited without leaving the List View. This works in both the site editor sidebar and the extensible site editor. The item's Options menu also gets an "Edit" item that opens the popover.

Why?

The sidebar List View can add, move, and remove navigation items, but editing an existing item's text or link meant switching to the canvas. Content-only List View editing already solves this with a popover anchored to the selected row, so this reuses that instead of adding another way to edit links.

How?

  • block-editor: a new private setting, listViewContentPopoverKey, lets InspectorControlsFill route group="content" controls to the List View content popover outside of sections. A new contentPopoverProps prop on PrivateListView renders the existing ListViewContentPopover anchored to the selected row, and ListViewContentPopover accepts popoverProps to override its placement.
  • The navigation link and submenu blocks are unchanged. The popover shows their own content controls (Controls), exactly as content-only editing does.
  • Both sidebars enable the setting, pass the prop, open the popover on row selection, and add the Edit menu item.
  • Both sidebars switch from BlockEditorProvider to ExperimentalBlockEditorProvider. The public provider strips private settings, including symbol keys, so the setting never reached the store.

The popover shows every field the block's content controls show by default outside content-only mode, including Description and Rel.

Testing Instructions

  1. Create a navigation menu with a few links and a submenu.
  2. Open the site editor, go to Navigation, and open the menu.
  3. Click a link in the List View. The settings popover opens next to the row.
  4. Change the Text. The List View row updates.
  5. Open the Options menu for the submenu and choose Edit. The popover opens for the submenu.
  6. Add a new item with the appender. The link search still opens, and closing it without a URL still removes the empty item.
  7. Enable the "Extensible site editor" experiment and repeat in admin.php?page=site-editor-v2&p=/navigation.

Testing Instructions for Keyboard

  1. Tab into the List View and move to a link with the arrow keys.
  2. Press Enter. The popover opens.
  3. Tab to Text and change it.
  4. Press Escape. The popover closes and focus returns to the List View row.
  5. Tab to the row's Options button, press Enter, move to Edit, and press Enter. The popover opens.

Screenshots or screencast

Before After
Site editor
before-v1.mp4
after-v1.mp4
Extensible site editor
before-v2.mp4
after-v2.mp4

Use of AI Tools

This PR was written with Claude Code (Claude Opus 5.5), including the implementation, the e2e tests, and the screen recordings. I reviewed and tested the changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01E1o9yTAtStCTHxjhPHeg8P

Selecting a navigation link or submenu in the site editor sidebar List View
now opens the same content popover used by content-only List View editing,
in both the site editor and the extensible site editor. The Options menu
also gets an Edit item that opens it.

A private block editor setting lets InspectorControlsFill route content
controls to the List View popover outside of sections, and a
contentPopoverProps prop lets PrivateListView render that popover anchored
to the selected row. Both sidebars use ExperimentalBlockEditorProvider,
since the public provider strips private settings.

Closes #77071.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E1o9yTAtStCTHxjhPHeg8P
@jeryj
jeryj requested a review from ellatrix as a code owner October 1, 2026 20:44
@jeryj jeryj added [Type] Enhancement A suggestion for improvement. [Block] Navigation Affects the Navigation Block labels Oct 1, 2026
@github-actions github-actions Bot added [Package] Block editor /packages/block-editor [Package] Edit Site /packages/edit-site labels Oct 1, 2026
@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

🎉 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: jeryj <jeryj@git.wordpress.org>
Co-authored-by: yyppsk <pranjalpratapsingh@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: +175 B (0%)

Total Size: 8.25 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 516 kB +75 B (+0.01%)
build/scripts/edit-site/index.min.js 382 kB +100 B (+0.03%)

bee0830 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric 2b4845e trunk % Change
timeToFirstByte 56.5 ms +6.11% -3.01% 55.85 ms +19.07% -1.07% 1.16%
largestContentfulPaint 96 ms +4.17% -6.25% 92 ms +8.7% -4.35% 4.35%
lcpMinusTtfb 35.6 ms +21.63% -4.78% 33.95 ms +7.07% -3.53% 4.86%
wpBeforeTemplate 28.09 ms +7.65% -1.5% 27.77 ms +25.71% -0.43% 1.15%
wpTemplate 24.61 ms +1.63% -3.86% 24.55 ms +6.56% -3.18% 0.24%
wpTotal 52.82 ms +6.42% -2.57% 52.19 ms +18.3% -1.02% 1.21%
wpMemoryUsage 7.62 MB +0% -0% 7.59 MB +0% -0% 0.46%
wpDbQueries 17 +0% -0% 17 +0% -0% 0%

front-end-classic-theme

Metric 2b4845e trunk % Change
timeToFirstByte 47.85 ms +6.69% -1.57% 47 ms +10.96% -0.85% 1.81%
largestContentfulPaint 104 ms +3.85% -1.92% 104 ms +3.85% -3.85% 0%
lcpMinusTtfb 56.15 ms +0.89% -4.27% 54.95 ms +4.46% -3.09% 2.18%
wpBeforeTemplate 26.6 ms +8.61% -2.89% 25.9 ms +1.58% -1.62% 2.7%
wpTemplate 18.21 ms +3.19% -1.98% 18.24 ms +5.65% -2.74% -0.16%
wpTotal 44.79 ms +6.85% -1.88% 44.03 ms +10.86% -1.14% 1.73%
wpMemoryUsage 6.25 MB +0% -0% 6.20 MB +0% -0% 0.71%
wpDbQueries 14 +0% -0% 14 +0% -0% 0%

media-processing

Metric 2b4845e trunk % Change
mediaProcessingJpeg 398.03 ms +0.73% -0.53% 401.5 ms +1.11% -1.74% -0.86%
mediaProcessingAvif 6031.82 ms +0.27% -0.25% 6101.75 ms +0.16% -0.19% -1.15%
mediaProcessingJpegToAvif 4164.25 ms +0.22% -0.19% 4217.51 ms +0.41% -0.14% -1.26%

media-upload

Metric 2b4845e trunk % Change
jpegUploadProcessing 1454.84 ms +35.43% -1.7% 1423.68 ms +1.27% -0.86% 2.19%
pngUploadProcessing 224.98 ms +14.08% -18.36% 174.68 ms +32.03% -2.92% 28.8%
largeJpegUploadProcessing 1412.05 ms +0.33% -0.45% 1408.91 ms +0.67% -0.16% 0.22%
multipleImageUploadProcessing 1626.7 ms +27.62% -2.99% 1585.4 ms +1.62% -0.43% 2.61%

post-editor

Metric 2b4845e trunk % Change
serverResponse 490.41 ms +4.46% -2.19% 506.02 ms +4.2% -5.46% -3.08%
firstPaint 234.32 ms +15.78% -6.54% 219.96 ms +6.98% -15.93% 6.53%
domContentLoaded 1087.84 ms +1.94% -3.21% 1114.88 ms +1.53% -2.47% -2.43%
loaded 1089.06 ms +1.94% -3.2% 1116.21 ms +1.54% -2.5% -2.43%
firstContentfulPaint 437.39 ms +4.79% -1.04% 451.31 ms +1.87% -0.86% -3.08%
firstBlock 3266.29 ms +1.89% -0.24% 3307.34 ms +1.53% -1.55% -1.24%
type 18.87 ms +2.54% -2.6% 17.06 ms +6.15% -1.47% 10.61%
typeWithoutInspector 17.84 ms +7.57% -3.14% 17.85 ms +9.47% -6.72% -0.06%
typeWithTopToolbar 22.77 ms +2.72% -3.43% 22.69 ms +4.8% -3.44% 0.35%
typeContainer 8.78 ms +6.72% -8.2% 8.45 ms +3.08% -5.68% 3.91%
focus 75.57 ms +7.64% -6.47% 68.86 ms +18.97% -6.22% 9.74%
firstFocus 214.68 ms +0% -0% 189.08 ms +0% -0% 13.54%
selectAll 532.42 ms +4.17% -2.58% 546.25 ms +2.42% -5.42% -2.53%
listViewOpen 65.06 ms +5.07% -12.04% 61.15 ms +8.01% -11.68% 6.39%
inserterOpen 22.55 ms +6.03% -12.64% 22.16 ms +13.99% -12.09% 1.76%
inserterHover 2 ms +13% -7% 2.12 ms +10.85% -16.04% -5.66%
inserterSearch 7.85 ms +5.61% -4.2% 8.06 ms +12.53% -7.69% -2.61%
loadPatterns 605.11 ms +5.25% -1.57% 615.74 ms +1.75% -1.97% -1.73%
wpTotal 480.48 ms +4.65% -2.16% 495.99 ms +4.19% -5.5% -3.13%
wpMemoryUsage 13.17 MB +0% -0% 13.13 MB +0% -0% 0.28%
wpDbQueries 54 +0% -1.85% 54 +0% -1.85% 0%

site-editor

Metric 2b4845e trunk % Change
serverResponse 476.46 ms +3.09% -6.92% 493.69 ms +0.97% -3.02% -3.49%
firstPaint 242.49 ms +12% -8.25% 239.75 ms +4.56% -14.84% 1.14%
domContentLoaded 1109.13 ms +1.18% -1.35% 1112.93 ms +0.71% -0.76% -0.34%
loaded 1110.23 ms +1.18% -1.33% 1114.09 ms +0.71% -0.77% -0.35%
firstContentfulPaint 447.65 ms +1.15% -2.75% 440.36 ms +0.84% -1.83% 1.66%
firstBlock 4058.23 ms +1.64% -0.65% 4032.42 ms +0.65% -0.88% 0.64%
type 17.33 ms +4.21% -4.33% 16.2 ms +6.23% -4.88% 6.98%
navigate 112.75 ms +5.85% -5.84% 107.24 ms +2.61% -3.28% 5.14%
loadPatterns 1254.68 ms +9.77% -4.36% 1287.35 ms +14.21% -7.2% -2.54%
loadPages 1026.34 ms +1.15% -0.64% 1040.82 ms +0.27% -1.37% -1.39%
wpTotal 466.8 ms +3.22% -7% 484.41 ms +0.92% -3.15% -3.64%
wpMemoryUsage 12.14 MB +0% -0% 12.09 MB +0% -0% 0.41%
wpDbQueries 43.5 +1.15% -1.15% 43.5 +1.15% -1.15% 0%

bee0830 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.

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

bee0830 Run

@jeryj
jeryj marked this pull request as draft October 1, 2026 20:49

This branch has not been deployed

No deployments
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 editor /packages/block-editor [Package] Edit Site /packages/edit-site [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit navigation links in a popover from the Extensible Site Editor Sidebar

1 participant