Skip to content

Move the appender into the block toolbar - #81668

Draft
ellatrix wants to merge 16 commits into
trunkfrom
try/toolbar-inserter-for-drag-button
Draft

ellatrix wants to merge 16 commits into
trunkfrom
try/toolbar-inserter-for-drag-button

Conversation

@ellatrix

@ellatrix ellatrix commented Aug 14, 2026 •

Copy link
Copy Markdown
Member

What?

Removes the appender from filled containers in the canvas and adds a plus button to the block toolbar instead, next to the options menu.

Why?

The corner appender sits in the content, moves as the content reflows, and blocks disagree about when to draw it. Some add their own "Add item" button to the toolbar instead. One control in one place.

How?

renderAppender is now only for empty blocks. A new BlockAppenderButton renders the quick inserter for the selected block, unless the parent selector already shows one. The button is for containers of items: a fixed child type (allowedBlocks in block.json) or a horizontal or grid layout. A freeform vertical box like a group, column or cover is a writing surface and shows none, in the parent selector too. Accordion, Navigation, Gallery and Playlist lose their own add buttons.

Testing Instructions

  1. Add a Buttons block with two buttons and select it.
  2. There is no appender after the last button; the toolbar has a plus before the options menu. Press it to add a third.
  3. Select one button: the parent selector shows the plus, the button's own toolbar does not.
  4. Repeat with Gallery, Playlist, Navigation, Accordion, Columns and a Row.
  5. A Group, Column, Cover, List or Quote has no plus, and no inserter in the parent selector of its children. Empty containers are unchanged.

Testing Instructions for Keyboard

Select a filled container, press Alt+F10, tab to the plus, press Enter.

Screenshots or screencast

The Buttons block selected, with the plus in its toolbar where the corner appender used to be:

The block toolbar of a selected Buttons block with a plus button before the options menu

Use of AI Tools

Written with Claude Code, reviewed and tested by me.

ellatrix and others added 10 commits August 13, 2026 22:34
Blocks are dragged directly on the canvas now, so the drag handle in
the block toolbar gives its spot to the same inserter button the
parent selector has. It adds a block after the selection, or after
the last block of a multi selection.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Blocks are dragged directly on the canvas now, so the drag handle
leaves the block toolbar. In its place a plus button appends a block
at the end of the selected block's own list, the job the appender in
the corner of a filled container does today. It shows for a single
selected block whose list is filled, unlocked, editable, not a
section, and does not grow by typing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
An appender now only fills an empty block list; a filled list grows
from the inserter in the block toolbar. This makes renderAppender a
setting for the empty state alone.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Both buttons add a block, one row apart. The rule that decides
whether the parent selector shows its inserter now lives in a hook
both components read.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The inserter in the block toolbar adds an item to any container, so
the accordion, tabs, navigation, gallery and playlist blocks no
longer need one of their own. The remove button of the tabs block
stays, as nothing generic replaces it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The tabs block locks its own list, and what a tab adds sits in the
nested tab panels block, so the inserter in the block toolbar cannot
stand in for it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions github-actions Bot added [Package] Block library /packages/block-library [Package] Block editor /packages/block-editor labels Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Size Change: +322 B (0%)

Total Size: 7.91 MB

📦 View Changed
Filename Size Change
build/scripts/block-editor/index.min.js 478 kB +220 B (+0.05%)
build/scripts/block-library/index.min.js 370 kB -153 B (-0.04%)
build/styles/block-editor/style-rtl.css 20.1 kB +70 B (+0.35%)
build/styles/block-editor/style-rtl.min.css 17.2 kB +57 B (+0.33%)
build/styles/block-editor/style.css 20.1 kB +73 B (+0.36%)
build/styles/block-editor/style.min.css 17.2 kB +55 B (+0.32%)

compressed-size-action

@github-actions

github-actions Bot commented Aug 15, 2026 •

Copy link
Copy Markdown

Flaky tests detected in 970bdd0.
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.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/32173652656
📝 Reported tests:

As a user I want to be able to add multiple close buttons so that users can close the overlay from different positions in /test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js, passed after 2 failed attempts.
Error: apiRequestContext.fetch: socket hang up
Call log:
  - → GET http://localhost:8889/wp-json/wp/v2/templates
    - user-agent: Playwright/1.62.1 (x64; ubuntu 24.04) node/20.20 CI/1
    - accept: */*
    - accept-encoding: gzip,deflate,br
    - X-WP-Nonce: 7c544ab4c4
    - cookie: wordpress_test_cookie=WP%20Cookie%20check; wordpress_logged_in_23778236db82f19306f247e20a353a99=admin%7C1787252396%7CeT2oIweII86SUXLdPJY5ZguTe3ybbn7cc9aYQicl75z%7Cff4ad2405cf69bb81f6a89f8c0b7d5eea202317965eac4c5e61a39b1820c56ae; wp-settings-time-1=1787080418

    at RequestUtils.rest (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/rest.ts:112:39)
    at RequestUtils.deleteAllTemplates (/home/runner/work/gutenberg/gutenberg/packages/e2e-test-utils-playwright/src/request-utils/templates.ts:35:31)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js:57:22
TimeoutError: locator.click: Timeout 10000ms exceeded.
Call log:
  - waiting for getByRole('button', { name: 'Create overlay', exact: true })

    at createNavigationOverlay (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js:44:28)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/site-editor/navigation-overlay-template-part.spec.js:113:4

@ellatrix ellatrix changed the title Add blocks to a filled container from the block toolbar Move the appender into the block toolbar Aug 17, 2026
ellatrix and others added 6 commits August 18, 2026 11:54
A freeform vertical box (group, column, cover, details) is a writing
surface and grows like one. The add button applies to a container with
a fixed child type (buttons, gallery) or a horizontal or grid
arrangement. The parent selector follows the same rule, so the two
buttons appear and disappear together.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…-for-drag-button

# Conflicts:
#	packages/block-library/src/gallery/edit.jsx
#	packages/block-library/src/playlist/edit.jsx
New React files must use the tsx extension since the extension
normalization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The restriction may be declared in block.json or passed to the block
list at render time, like the allowedBlocks attribute support or a
dynamic set from a plugin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The toolbar control the tests went through is gone; the placeholder
drop zone is the remaining media library path and uses the same
handler.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@jeryj

jeryj commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

I think for UX simplicity, the toolbar inserter should always appear in the same spot to the right of the block icon in the block toolbar. Having the inserter move locations feels like a bug, and I think most people won't care to understand the difference between "the parent container block is selected and this inserts inside the container" vs "the sibling is selected and this will insert next to it".

Ultimately, the block inserts into the same place either way, ie. "button is inserted in this container," so the mental model is still justified IMO.

@draganescu

Copy link
Copy Markdown
Contributor

I want to bring this in because the disappearing inserter is terrible for content composition. At least this fixed one appearing for any block that has inner blocks is there all the time.

Working on bringing over grid interactivity for drag and drop I found that on a canvas or pattern this is even more dearly felt: when the top most block is selected there is no apparent way to add more stuff. See this https://playground-usertest.view.fast/t/8swzmr3z5w for how it feels - select the parent grid, no way to add a block :)

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

[Package] Block editor /packages/block-editor [Package] Block library /packages/block-library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants