Repository navigation
Conversation
Every row in a List View that shows appenders gets an appender cell before the options menu, so the columns line up. A row with inner blocks holds a button in it, which adds a block at the end of its inner blocks: "Add page" on a submenu, "Add Button" on a Buttons block. It reuses the Appender, so a new page link opens the Link UI as the top-level appender does, and adding to a collapsed row expands it. The button is visible at rest as a plain "+", so it can be found without hovering, and takes the filled appender style while the row, or a block inside it, is hovered, focused, or selected. Rows highlight the block they are on, so the highlight stands in for hover and focus. The subscription for that lives in a cell component rendered only for rows with inner blocks, so leaf rows stay as they were. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfD1eLDy2gFm7w4gPm4THb
The popover takes focus as it opens and could close the Link UI the appender opens, which made the test flaky late in a run. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WfD1eLDy2gFm7w4gPm4THb
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #85154. One of several attempts; see also #84866 (appender while selected) and #85226 (appender on hover).
What?
Adds an appender button to the row of any List View block that has inner blocks, in List Views that show appenders. On a submenu row it says "Add page" and opens the Link UI for the new item; on a Buttons row it says "Add Button". The button is visible at rest and takes the filled appender style while the row, or any block inside it, is hovered, focused, or selected.
Why?
The List View only offered a top-level appender, so adding to a submenu meant adding at the top level and dragging in. The earlier attempts put an appender row at the end of a nested list and showed it on selection (#84866) or hover (#85226). A hover-revealed row cannot be reached reliably, because the row appears in the space the pointer is heading for and whatever is there first takes the hover.
This attempt follows the tree view guidance from PatternFly, Primer, and Avaya: a row action lives on the row it acts on, is reachable by keyboard, has an accessible name, and is not hidden behind hover alone. Nothing mounts or unmounts, so rows never shift under the pointer.
How?
ListViewBranchpassesshowAppenderand the inner block count to each row.ListViewBlockrenders an appender cell in every row of such a List View, so the columns line up. A row with inner blocks rendersListViewRowAppenderCell, which holds theAppenderfor the row's block, at the next nesting level. Adding expands a collapsed row so the new block is visible.Appendermerges incomingtoggleProps, so the tree grid's roving tab index reaches the button, and forwardsonSelectOrClose.Accessibility notes
Testing Instructions
admin.php?page=site-editor-v2&p=/navigation.Use of AI Tools
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_01WfD1eLDy2gFm7w4gPm4THb