Skip to content

List View: Show an appender for a nested list while it is selected - #84866

Closed
jeryj wants to merge 2 commits into
trunkfrom
add/list-view-nested-appender
Closed

jeryj wants to merge 2 commits into
trunkfrom
add/list-view-nested-appender

Conversation

@jeryj

@jeryj jeryj commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Closes #85154

What?

Show an appender at the end of a nested list in the List View while that list's parent, or any block inside it, is selected. In the Navigation block's List View, selecting a submenu or one of its items shows an "Add page" row at the end of the submenu; selecting a Buttons block or its Button shows an "Add Button" row.

Why?

The List View appender only existed at the first level. To add an item to a submenu from the List View, the user had to add it at the top level and drag it in, or leave the List View for the canvas toolbar. The same applied to a Buttons block in a menu.

How?

ListViewBranch drops the level === 1 gate. A nested branch shows its appender when its parent is selected or the selection is anywhere inside the parent's subtree, so appenders follow the user down the tree without cluttering every expanded list. The first level keeps its appender at all times. The row count and aria-setsize include the extra row, and the nested branch now receives the showAppender prop, so List Views without an appender stay without one.

The appender takes its parent's insert settings as before: a submenu inserts a page link and the existing Link UI opens for it, a Buttons block inserts a Button directly. A collapsed container shows no appender until expanded, like its children.

Social Icons in a menu get an appender too, which opens the quick inserter as the canvas appender does. A picker listing every service is a follow-up.

Testing Instructions

  1. In the post editor, add a Navigation block with a menu that has a submenu and another top-level item, and open the List View panel in the block inspector. Only the top-level "Add page" row shows.
  2. Select the submenu. An "Add page" row appears at the end of its items, indented with them. Select one of its items: the row stays. Select the other top-level item: it goes.
  3. Click the submenu's "Add page". The Link UI opens; pick a page. The new link lands at the end of the submenu.
  4. Collapse the submenu while selected. Its appender goes; expand it and it returns.
  5. Put a Buttons block with one Button in the menu. Select the Buttons block or the Button. An "Add Button" row appears; clicking it adds a Button.
  6. Enable the "Extensible site editor" experiment and repeat steps 2 and 3 from admin.php?page=site-editor-v2&p=/navigation.
  7. Open the main List View beside the canvas. No appender anywhere, as before.

Testing Instructions for Keyboard

  1. Tab into the List View, arrow to a submenu row and press Enter to select it.
  2. Arrow down through its items. The last row is the "Add page" button; press Enter to add a link.

Use of AI Tools

This PR was written with Claude Code (Claude Fable 5.1), including the implementation and the e2e tests. I reviewed and tested the changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YY39mts89XNBXysaFcLtoa

A nested branch shows its appender when its parent, or any block inside
the parent, is selected, so a submenu or a Buttons block in a Navigation
menu can take new items from the List View. The first level keeps its
appender at all times, and the nested branch now receives `showAppender`
so List Views without one stay without one.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YY39mts89XNBXysaFcLtoa
@jeryj
jeryj requested a review from ellatrix as a code owner October 15, 2026 21:16
@jeryj jeryj added [Type] Enhancement A suggestion for improvement. [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Block] Navigation Affects the Navigation Block [Package] Block editor /packages/block-editor labels Oct 15, 2026
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YY39mts89XNBXysaFcLtoa
@github-actions

github-actions Bot commented Oct 15, 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: jeryj <jeryj@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.

jeryj added a commit that referenced this pull request Oct 19, 2026
…rch (#85122)

Some blocks, like Social Icons and Button Blocks are not able to be edited or added from the site editor sidebar. This is being worked on in #84866, #84860, and #84854. Those won't make the 7.2 cutoff, so we should exclude those blocks from the site editor block search rather than offer an incomplete experience.
---------

Co-authored-by: jeryj <jeryj@git.wordpress.org>
Co-authored-by: mikachan <mikachan@git.wordpress.org>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@jeryj jeryj closed this Nov 20, 2026
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 [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List View: Allow appending nested items

1 participant