What’s new in Gutenberg 10.7? (26 May)

We are already at the end of May and, after making it through the WordPress 5.8 feature freeze, a new GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses ‘blocks’ to add richness rather than shortcodes, custom HTML etc. https://wordpress.org/gutenberg/ version is among us! Version 10.7 represents the last Gutenberg release that will be included in the upcoming WordPress 5.8, so efforts have been focused on bringing forward many of the features that will be included in it. Gutenberg 10.7 introduces new features like the persistent List View in the Post Editor, responsive navigation menus, many design tools for blocks, and enhancements to the top toolbar, as well as iterative performance improvements and a lot of bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. fixes.

Persistent List View in the Post Editor

Before Gutenberg 10.7, the List View available in the Post Editor was displayed in a popover and would close after focusing somewhere else on the page. Starting with Gutenberg 10.7, the persistent List View previously available in the Site Editor is enabled in the Post Editor as well, providing a sidebarSidebar A sidebar in WordPress is referred to a widget-ready area used by WordPress themes to display information that is not a part of the main content. It is not always a vertical column on the side. It can be a horizontal rectangle below or above the content area, footer, header, or any where in the theme. that displays a full post blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. tree. This List View also provides some visual cues as it highlights the currently selected block(s), as well as accents in the canvas the corresponding block when hovering over the list entries. Moreover, anchors added to blocks are displayed in the list, providing a comprehensive view of the post hierarchy and structure. All these improvements combined will make navigating complex content much easier!

Responsive Navigation block

This release introduces the first iteration of responsive menus in the Navigation block. By introducing the new “Enable responsive menu” block option, the Navigation block will collapse into a so-called “Hamburger menu” when displayed on smaller screens. This implementation also prioritizes accessibilityAccessibility Accessibility (commonly shortened to a11y) refers to the design of products, devices, services, or environments for people with disabilities. The concept of accessible design ensures both “direct access” (i.e. unassisted) and “indirect access” meaning compatibility with a person’s assistive technology (for example, computer screen readers). (https://en.wikipedia.org/wiki/Accessibility) by providing a fully keyboard-navigable menu.

More block design tools

Gutenberg 10.7 continues to bring us new design tools and to support existing ones in blocks.  This includes custom margin block support with configurable sides, supported by blocks like Site Title and Site Tagline.  The Query block had a special focus in this release with new design options in the form of supporting layout and color options along with the Column block, which now supports color and padding for individual columns.

Top toolbar enhancements

The “Top toolbar” mode’s behavior and placement have been refined in this release so that wider screens won’t display the editor bar and the block toolbar together anymore, improving the user experience. Now when enabled, the top toolbar has a fixed position stacked on top of the canvas, below the editor top bar, independent of the browser width. Furthermore, implementers will also benefit from this iteration unifying toolbar APIs under one simple <BlockTools /> component.

Loading patterns from the Pattern Directory

Working towards providing rich collections of block patterns from the inserter, patterns can now be inserted directly from the WordPress.org Pattern Directory, in a similar way blocks can. This integration opens the door to an exciting future full of beautiful patterns as the number of patterns available in the directory grows. If you want to know more, you can stay tuned for Block Pattern Directory updates and check the most recent design iterations for the Pattern Directory.

10.7

Enhancements

  • Block Editor:
    • Standardize block styles cursor on hover. (31188)
    • Support scripts in iframed editors. (31873)
  • Block Library:
    • Normalize theme block toolbars. (31952)
    • Buttons: Use column-gap for styling. (31386)
    • Column: Add color and padding support to individual column block. (31778)
    • Cover: Allow transforming from group block. (30890)
    • Media & Text: Add media width control. (31002)
    • Post Comments: Add basic CSSCSS Cascading Style Sheets. to the block. (30382)
    • Post ExcerptExcerpt An excerpt is the description of the blog post or page that will by default show on the blog archive page, in search results (SERPs), and on social media. With an SEO plugin, the excerpt may also be in that plugin’s metabox.: Update read more placeholder text. (30959)
    • Post Featured ImageFeatured image A featured image is the main image used on your blog archive page and is pulled when the post or page is shared on social media. The image can be used to display in widget areas on your site or in a summary list of posts.: Change wrapper element to figure. (31595)
    • Query:
      • Add layout and color support. (31833)
      • Update bundled patterns to have inherit:False. (31856)
      • Allow term addition from user case-insensitive input. (31301)
    • Site Logo: Add link toggle option. (31162)
    • Site Tagline:
      • Add margin block support. (31809)
      • Expand the site tagline block description. (31426)
    • Site Title:
      • Add additional text formatting options. (31734)
      • Add margin block support. (31728)
    • Social Links: Add some padding to the “click plus to add”. (31927)
  • Components
    • Add Spacer. (31509)
    • Improve display for multiple action buttons in notices. (31799)
    • Polish the switcher for horizontal blocks. (31645)
    • Promote Divider and use readable prop names. (31556)
    • Promote Grid. (31559)
    • Promote View. (31542)
    • Promote VStack and HStack. (31300)
    • UnitControl: Add support for unit step per unit type. (30376)
  • Design tools:
    • Add margin block support with configurable sides. (30608)
    • Add option to disable duotone. (32002)
    • Add reset button to Layout controls. (30828)
    • Add server-side support for margins. (31808)
  • Icons: Update icons. (31533)
  • List View:
    • Display block anchor in List View when set. (31992)
    • Enable persistent List View in the post editor. (31047)
  • Patterns: Load patterns from wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways.. (28800)
  • Template Editing Mode:
    • Add a welcome guide to the template editor. (31330) (32055)
    • Add a Delete template action. (31678)
  • Word count: Adjust to count numbers as words. (27288)

New APIs

  • Babel Preset Default: Configure @babel/preset-env preset to respect a local Browserslist configuration. (31898)
  • Blocks: Deprecate registerBlockTypeFromMetadata in favor of registerBlockType. (32030)
  • Global Styles: Rename and stabilize useEditorFeature as useSetting. (31587)
  • Stacked/unified block toolbar. (31134)
  • Babel Preset Default: Add polyfill for WordPress built from coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.-js. (31279)

Bug Fixes

  • Block Library:
    • Cover:
      • Remove fixed background when previewed in patterns list. (31640)
      • Show placeholder only if it has no inner blocks. (31402)
    • Gallery:
      • Fix focus caption prop for native. (32029)
      • Fix identical images getting duplicated when moving. (30555)
    • Image:
      • Remove figure margins consistently in image blocks. (31650)
      • Fix cover transform and excessive re-rendering. (32102)
    • Post Content: Apply the_content filterFilter Filters are one of the two types of Hooks https://codex.wordpress.org/Plugin_API/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. even if content is empty. (31997)
    • Post Comments Count: Fix attributes declaration. (31976)
    • Post Comment Form:
      • Fix stylesheet dependency. (31528)
      • Fix to allow post comment button to inherit button & global styles automatically. (31338)
    • Post Featured Image:
      • Fix non-interactive placeholder when outside of a post context. (31663)
      • Fix placeholder regressionregression A software bug that breaks or degrades something that previously worked. Regressions are often treated as critical bugs or blockers. Recent regressions may be given higher priorities. A "3.6 regression" would be a bug in 3.6 that worked as intended in 3.5.. (31709)
      • Fix selection scroll into view. (31835)
      • Fix image width for wide aligned Post featured image. (32070)
    • Site Logo:
      • Fix duplicate supports declaration. (31544)
      • Return nothing if logo is not set. (31513)
      • Only request media entity when a site logo has been chosen. (31673)
    • Template Part:
      • Don’t show the currently used template part as an option in the ‘replace’ flow. (31720)
      • Fix template part selection searches to use title/area instead of slug/theme. (31520)
      • Use label and icon per variation when displaying placeholders. (31721)
  • Block Editor:
    • Clear selection on iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the user’s browser. htmlHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. element click, fix bottom click redirect. (31385)
    • Fix block ref when multiple useBlockProps hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. are called. (31906)
    • Fix moving animation for nested blocks. (31945)
    • Fix selecting aligned blocks. (31904)
    • Fix scrolling to the inserted block issue in the iFramed block editor. (31448)
    • Prevent rendering self also when the wrapper block matches the inserted block. (31592)
    • Toolbar:
      • Fix showing toolbar when caret enters formatting (and extract as implementation detail for the block editor). (31664)
      • Fix toolbar in device preview. (31600)
  • Design tools:
    • BoxControl:
      • Filter out unit only values when checking values defined. (31779)
      • Fix tooltip display for unlinked box control inputs. (31741)
    • Color picker:
      • Fixes color picker segmented control rendering and scrolling issues. (30994)
      • Fix text. (30039)
    • Duotone:
      • Fix duotone transform not transferring settings between blocks. (31801)
      • Fix duotone padding crash. (31780)
    • Font-family: Fix typo in font-family supports for dynamic blocks. (31974)
    • Spacing Support:
      • Properly hide UIUI User interface for disabled properties. (31726)
      • Fix custom units for margin. (31776)
  • Inserter: Hide patterns tab if no patterns are available. (31687)
  • Patterns:
    • Check for allowed blocks recursively in patterns. (30366)
    • Fix unregister_block_pattern notices. (32025)
  • Post Editor: Fix template name displaying incorrectly. (32035)
  • Server Side Rendering: Re-enable passing post_id query arg (#31786). (31787)
  • Template Editing Mode: Fix wrapper block name for template mode. (31985)
  • Writing flow, multi-selection:
    • Fix caret placing when the target is out of view. (31506)
    • Gradually ‘select all’ layers of nested blocks. (31859)
  • Fix errors caused by commits to WordPress core. (32176) (32183) (32059)
  • Components: Fix the list of package dependencies. (32167)
  • Fix issue with customizerCustomizer Tool built into WordPress core that hooks into most modern themes. You can use it to preview and modify many of your site’s appearance settings. title overlapping block toolbar. (32140)
  • Correctly read rawRequest for frontend ESM. (31917)
  • Fix generation of presets classes per block. (32190)
  • WidgetWidget A WordPress Widget is a small block that performs a specific function. You can add these widgets in sidebars also known as widget-ready areas on your web page. WordPress widgets were originally created to provide a simple and easy-to-use way of giving design and structure control of the WordPress theme to the user. Screen:
    • Fix unsaved changes notification. (31757)
    • Fix call to undefined __experimentalRegisterExperimentalCoreBlocks. (32138)

Performance

  • Block editor styles: Memoize transform. (31553)
  • Block editor async mode: Enable only for blocks out of view. (30995)
  • Improve performance of term search. (31703)
  • Blocks package: Memoize getBlockVariations selector. (32120)

Experiments

  • Block Library: Hide the PostAuthor block behind the Gutenberg experimental flag. (31983)
  • Block-based Widgets:
    • API:
      • Improve get_merged_data API so it requires less knowledge from the consumer. (31552)
    • Customizer:
      • Add ‘more’ menu. (31970)
      • Add undo redo to Widgets Customizer. (31653)
      • Add Welcome messaging. (31968)
      • Clear selected block when focusing on element outside the editor. (31530)
      • Fix removing legacy widget not working in customizer. (31535)
      • Implement mobile responsive block toolbar. (31589)
      • Remove Widgets Customizer experimental flag. (31876)
    • Widgets Editor:
      • Add default notices support. (31578)
      • Add more menu. (31926)
      • Add Welcome Guide. (31925)
      • Remove widget screen empty link in adminadmin (and super admin). (31408)
      • Update toolbar and notice positioning. (31582)
  • Navigation Editor and Block:
    • Add home link block. (30926)
    • API:
      • Add locations to the menu response. (31656)
      • Change default to 100 menu items returned. (21243)
    • Allow space between on page list. (29771)
    • Bring implementations of convert nav menu items to blocks back into sync. (31602)
    • Editor:
      • “Add new pages” use menu entity. (31643)
      • Add padding for navigation screen. (31583)
      • Clear ‘stub’ navigation post edits on save. (31735)
      • Fix menu location assignment. (31594)
      • Fix editor margin. (31493)
      • On mobile viewports, reveal the block inspector when clicking the menu name button. (31220)
      • Update sidebar. (31821)
      • Warn the user about unsaved changes. (31197)
    • Enable justification for burger menu. (31877)
    • Extract Navigation Block data fetching and management to hook(s). (31825)
    • Fix nav block hover z index. (31929)
    • Fix nav placeholder colors and height. (31875)
    • Improve the navigation block setup state / placeholder. (31371)
    • Introduce useMenuEntityProp hook. (31132)
    • Normalize converting nav menu items to blocks between Editor and Block. (31606)
    • Responsive Navigation. (30047)
    • Submenus shouldn’t take space unless they’re actually open. (31881)
  • Global Styles
    • Block Supports: Allow skipping serialization of typography attributes. (30880)
    • Fix condition for global styles on mobile. (31844)
    • Fix global styles settings retrieval for REST. (31534)
    • Make core color classes and custom properties always available. (31669)
    • Remove color.link from valid styles and alphabetize the rest. (31516)
    • Return consolidated global styles in REST Request. (31762)
    • Use elements mechanism for link color instead of a CSS variable. (31524)
    • Use mobile context in settings request & global styles. (31819)
    • Use wp_theme taxonomyTaxonomy A taxonomy is a way to group things together. In WordPress, some common taxonomies are category, link, tag, or post format. https://codex.wordpress.org/Taxonomies#Default_Taxonomies. for wp_global_styles cpt. (31436)
    • Theme.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML.: Replace hardcoded CSS_UNITS and inherit units from theme.json. (31822)
  • Full Site Editing:
    • Template Loader: Make templates arg required. (31671)
    • Simplify template loader logic. (31604)

Documentation

  • Handbook:
    • Add dedicated Block Styles page under Block API directory. (31055)
    • Add info on how to connect to the WP ENV MySQLMySQL MySQL is a relational database management system. A database is a structured collection of data where content, configuration and other options are stored. https://www.mysql.com/. database. (31975)
    • Capitalize GitHubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the ‘pull request’ where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https://github.com/ properly in contributors README. (31549)
    • Clarify ‘Applying styles from a stylesheet’ how-to guide. (31824)
    • First pass at the documentation for the Widgets Block Editor. (31577)
    • Fix link to ESNext in callout. (31512)
    • Make the theme.json examples copy-pasteable. (32040)
    • Update Glossary with more FSE terminology. (31525)
  • Packages:
    • Add required “directory” prop to package.json template in packages documentation. (31570)
    • Fix typo: “packages” -> “package”. (32036)
    • Improve packages documentation – document root package json and public API knowledge. (31598)
    • Remove duplicate 1.52.0 changelog entry. (31659)
    • Scripts: Fix the CHANGELOG for @wordpress/scripts package. (31532)
    • Typo in edit-navigation layout translators note. (31541)

Code Quality

  • Block editor:
    • Block popover: Move scroll handling to block tools. (31611)
    • Log an error if styles are loaded through the compatibility layer. (31870)
  • Block Library:
    • Post Comments: Make CSS less specific. (31711)
    • Image/Gallery: Remove use of unstableOnFocus. (31796)
  • Linting:
    • Fix PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher lint issues. (32039)
    • Fix PHPCSPHP Code Sniffer PHP Code Sniffer, a popular tool for analyzing code quality. The WordPress Coding Standards rely on PHPCS. warning for alignment. (31931)
    • Fix lint issues. (31790)
    • Ignore data-no-store-string-literals rule for native files. (31936)
  • Components:
    • Add ToolbarDropdownMenu to render dropdown menus properly inside toolbars. (31460)
    • Don’t pass down index through context. (31852)
    • Remove color() utility function, use values directly. (31661)
    • Remove config() utility function, use values directly. (31646)
  • Compose:
    • Add types to withInstanceId and corresponding hook. (31341)
    • Add types useConstrainedTabbing. (31548)
    • Add types useAsyncList. (31523)
  • Docgen:
    • Replace assertions for getIntermediateRepresentation unit tests with snapshots. (31547)
    • Split getIntermediateRepresentation unit tests in smaller tests. (31468)
  • Inserter: Mark the inserter slot as unstable. (31417)
  • Multi-select:
    • Use ref callback for focus out, merge native selection hooks. (31618)
    • Use writing flow container for focus. (31572)
  • Rich text:
    • Build in isSelected check for children. (31802)
    • Consolidate applying from props. (31635)
    • Each hook should create its own ref. (31477)
    • Extract implementation-specific undo handling of automatic changes. (31676)
    • Extract internal delete handling. (31637)
    • Extract persistent change marking. (31760)
    • Extract splitValue to separate file. (31803)
    • Extract input and selection. (31631)
    • Extract indent list item on space. (31628)
    • Extract select object. (31627)
    • Extract paste handler. (31619)
    • Fix props on DOM element warnings. (31883)
    • Move autocomplete key handler to ref callback. (31770)
    • Move implementation specific attributes. (31674)
    • Move implementation specific delete and enter handling. (31644)
    • Remove avoiding setting selection on mount. (31788)
    • Remove dependency on block client ID. (31752)
    • Remove duplicate active formats state. (31771)
    • Remove old broken format prop. (31767)
    • Remove tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) name dependency. (31679)
    • Simplify with hooks. (31718)
  • Rename construct_wp_query_args to build_query_vars_from_query_block. (32041)
  • Theme.json:
    • Remove unused code. (31666)
    • Remove declarations so API has coherence. (31596)
    • Remove: Declarations parameter from compute_style_properties. (31573)
  • Writing flow:
    • Extract and simplify “select all”. (31855)
    • Extract arrow nav. (31851)
    • Extract tab behavior to hook. (31834)
  • REST APIREST API The REST API is an acronym for the RESTful Application Program Interface (API) that uses HTTP requests to GET, PUT, POST and DELETE data. It is how the front end of an application (think “phone app” or “website”) can communicate with the data store (think “database” or “file system”) https://developer.wordpress.org/rest-api/.: Use batch endpoint included in Core. (32174)
  • Prepare for adding the Widgets block editor to Core. (32136)
  • Remove gutenberg domain from core blocks. (32152)
  • Remove filter_var from blocks. (32046)
  • PluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party: Update block editor settings to work with context. (32159)

Tools

  • End-to-end tests:
    • Add template loader unit tests. (31498)
    • Fix end-to-end test inserting the cover block. (31866)
    • Fix flaky change detection tests causing intermittent failures. (31861)
    • Fix intermittent embeds failure. (31860)
    • Fix intermittent failure of rich text end-to-end test. (31864)
    • Increase test coverage for pattern transforms. (31689)
    • Navigation: Add unit tests for onChange handler and fix cases around custom links tags and post-format. (31259)
    • Remove i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill. filters performance test. (32028)
    • Skip unstable end-to-end tests. (32031)
    • Try stabilizing customize widgets end-to-end tests. (32023)
    • Update skip failing template mode end to end test. (32017)
    • Update tests for changes in core logic. (31982)
  • Gutenberg plugin: Update compatibility layer for loading separate core block assets. (31894)
  • Workflow:
    • Replace the Cancel workflow with native GitHub Action functionality. (32016)
    • Remove Custom Properties PostCSS plugin. (31715)

Performance Benchmark

The following benchmark compares performance for a particularly sizeable post (~36,000 words, ~1,000 blocks) over the last releases. Such a large post isn’t representative of the average editing experience but is adequate for spotting variations in performance.

VersionLoading TimeKeyPress Event (typing)
Gutenberg 10.75.28s28.4ms
Gutenberg 10.65.51s26.18ms
WordPress 5.75.35s29.19ms

Kudos to all the contributors that helped with this huge release! 👏

Thanks @youknowriad for managing the release.

#core-editor, #editor, #gutenberg, #gutenberg-new