Gutenberg 16.6 Introduces Block Hooks, Improvements to Toolbars on Nested Blocks

Gutenberg 16.6 is available with progress on a feature that was formerly called auto-inserting blocks but has now been renamed to block hooks.

In a previous release (16.4), Gutenberg introduced auto-inserting blocks as an experimental feature that allows plugin developers to specify a location in which the block will be automatically inserted, such as before or after a template. Users can then reposition the blocks after insertion using the editor tools.

Gutenberg lead architect Matias Ventura proposed renaming the feature to block hooks to help developers understand how they work.

“I’ve seen anecdotal feedback that autoInsert is not the clearest of descriptions,” Ventura said. “I’d like to propose renaming to the more familiar hooks terminology—and ‘block hooks’ in more general terms—to help folks understand the mechanics and purpose more rapidly.”

This release also adds an inspector panel for block hooks, tentatively named “Plugins,” that displays blocks available for auto-insertion. It includes toggles to insert or remove them. The updated version of the feature also includes block icons (not shown below) to help differentiate the toggles.

image source: Gutenberg repository PR #52969

Gutenberg 16.6 brings improvements to toolbars on nested blocks, where the toolbar now stays attached to the parent block. This change is part of a broader effort to improve nested block experiences. Previously, the toolbar would move around when clicking inside the nested blocks, but this change makes it stay in place for a less chaotic editing experience. The updated toolbar behavior has been rolled out to Navigation, List, and Quote blocks so far.

video credit: Gutenberg GitHub repository PR #53699

This release includes a new keyboard shortcut for duplicating blocks within the List View: (CMD+Shift+d). It enables users to do more from the keyboard while navigating around the List View, instead of having to jump back into the block settings menu or editor canvas. Users can now click twice on the selected (or focused) block or multiple blocks to quickly duplicate them all in one go.

video credit: Gutenberg GitHub repository PR #53559

These highlighted features and more will be landing in the upcoming WordPress 6.4 release. Check out the Gutenberg 16.6 release post for the full list of new features, enhancements, bug fixes, and improvements to performance and code quality.

3

3 responses to “Gutenberg 16.6 Introduces Block Hooks, Improvements to Toolbars on Nested Blocks”

  1. We amateurs are being left behind, it seems; only in a developer’s world is “hooks” more understandable than “auto-insert”—but I guess it would be developers who would be using it.

    And creating confusion with the term “plug-ins”, which we all know and use? Let’s rethink that!

    • I think they named it plugins because below it you will see the “hooks” that are made available by installed plugins.

      As a beginner level coder I find “hooks” more confusing because it’s already reserved for functionality within programming languages.

      Wouldn’t a React or PHP hook for a block also be a block hook somehow? It could make communication between devs more difficult.

      • so “plug-in hooks”?

        Looking back at the original post, I just got more confused:
        “This release also adds an inspector panel for block hooks, tentatively named “Plugins,” that displays blocks available for auto-insertion.”

        We are talking about a name for what they here call “block hooks”, right? So why not just use “block hooks”? (I presume, following strict grammatical rules, that this is not suggested as a name for the panel; if it were, it would be “which displays” not “that displays”).

        If I read your comment right, though, this use of hooks is not truly accurate, so I am now completely out of my depth.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Newsletter

Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Discover more from WP Tavern

Subscribe now to keep reading and get access to the full archive.

Continue reading