Bug Scrub Schedule for 5.4

Now that 5.4 has been officially kicked off, bug scrubs will happen weekly all the way up to the final release. Keep an eye on this schedule – it will change often to reflect the latest information.

  1. 1/21/2020 19:00 UTC
  2. 1/29/2020 23:00 UTC
  3. 2/7/2020 05:00 UTC (APAC-Friendly)
  4. 2/10/2020 16:00 UTC
  5. 2/18/2020 20:00 UTC
  6. 2/27/2020 23:00 UTC
  7. 3/2/2020 16:00 UTC
  8. 3/11/2020 TBD (If Necessary)
  9. 3/17/2020 TBD (If Necessary)
  10. 3/27/2020 TBD (If Necessary)
  11. 3/30/2020 TBD (If Necessary)

These scrubs are separate and in addition to the normal scrubbing and triage by individual components. Some of those sessions include:

Design Triage: Every Monday 17:30 UTC at #design
Gutenberg Design Triage: Every Tuesday 17:00 UTC at #design
Accessibility Scrub: Every Friday 14:00 UTC at #accessibility

Also, the ongoing APAC-friendly #core bug scrub session every Thursday at 06:00 UTC will continue during the cycle, alternating focus between core and editor.

Next, the Accessibility team has announced a few extra scrubs for the 5.4 cycle. You can read about those here.

Finally, a reminder that anyone — Yes, you! — can host a bug scrub at anytime. You can work through any tickets you’re comfortable with. In fact, if you plan one that’s 5.4-focused, we’ll add it to the schedule here along with your name. Finally, you’ll get well deserved props in the weekly Dev Chat, as well as in the #props Slack channel!

All open tickets for 5.4, in order of priority, can be found here. Tickets that haven’t seen any love in a while are in particular need. Those can be found in this query.

If you’d like to lead a bug scrub or have any questions or concerns about the schedule, please leave a comment or reach out to me directly.

#5-4, #bug-scrub

REST API Changes in 5.4

Taxonomy “OR” Relation Now Supported in Posts Controller

Querying for /wp/v2/posts?tags=1&categories=2 returns all posts assigned the tag with ID 1, AND assigned the category with ID 2. This AND relationship, where multiple taxonomies’ term relationships must all be satisfied, has been the only supported behavior in these collection endpoints since WordPress 4.7.

The REST API /wp/v2/posts endpoint, as well as custom post type endpoints extending from WP_REST_Posts_Controller (including custom post types specifying "show_in_rest" => true), now supports a new tax_relation parameter which can be used to return posts matching either taxonomy filter, rather than both.

As an example, in WordPress 5.4, the posts endpoint query

/wp/v2/posts?tags=1&categories=2&tax_relation=OR

will now return posts in either the tag ID 1 or the category with ID 2.

Selective Link Embedding

The REST API now supports returning a limited set of embedded objects using the _embed parameter. As an example, in WordPress 5.4, the following query only embeds the author information instead of including all the comments, media, etc…

/wp/v2/posts/?_embed=author

All embeds will be returned if a value for the _embed parameter is omitted, or set to true or 1.

WP_REST_Server method changes

WordPress 5.4 changes the signature of two methods in the WP_REST_Server class. Developers who are extending WP_REST_Server and overriding these methods should update their code to match the new signatures to avoid PHP warnings.

  1. The signature of WP_REST_Server::embed_links() is now embed_links( $data, $embed = true ). The new $embed paramter accepts an array of link relations (such as array( 'author', 'wp:term' )) and limits the embedded links in the response to those relations. The default of true maintains the previous behavior of embedding all links in the response. For more details, see #39696.
  2. The signature of WP_REST_Server::get_routes() is now get_routes( $namespace = '' ). The new $namespace parameter accepts a string and limits the returned routes to those whose namespace matches the string. Internally, WP_REST_Server uses this new parameter to improve the performance of WP_REST_Server::dispatch() by reducing the number of regex checks necessary to match a request to a registered route. For more details, see #48530.

For performance reasons, WP_REST_Server::embed_links() also now caches response data in memory. This cache is managed by WP_REST_Server::response_to_data(). Code calling the protected embed_links method being called directly may need to be updated to ensure stale data is not returned.

(Thank you to @dlh for authoring this section)

See the full list of REST API changes on Trac.

#5-4, #dev-notes, #rest-api

New @wordpress/create-block package for block scaffolding

Block scaffolding is a shorthand term that describes the supporting directory structure you need for WordPress to recognize a block. Typically that directory includes files like index.php, index.js, style.css and perhaps others—which in turn hold calls like register_block_type.

You’ve likely noticed a lot of tools that aim to automate the scaffolding build—or at least make it easier to build your own blocks. They’re nothing new in the WordPress ecosystem. And there’s even one in WP-CLI: the wp scaffold block command.

You’ve probably also noticed that some of those third-party tools get you up and running with just one npx command, while WP-CLI still needs a full WordPress installation to run. And WP-CLI doesn’t play well with advanced JavaScript tooling like code transpiling, linting or formatting.

Until now.

WordPress 5.4 brings you a brand-new, officially supported npm-based scaffolding package.

Create Block generates PHP, JS and CSS code—and everything else you need to start building your WordPress plugin. Its quick-start mode lets you pass it a slug that then becomes both the target location for the generated files AND the internal block name:

$ npm init @wordpress/block todo-list
wordpress-create-block

You don’t need to install or configure tools like webpack, Babel or ESLint yourself. They’re preconfigured and out of sight. So you can focus on the code.

Create Block also has an interactive mode that lets you customize several essential block options before code generation:

$ npm init @wordpress/block

Finally, despite its support for modern JavaScript tooling, Create Block also lets you to pick an ES5 template—and skip the transpiling tools that trigger ESNext and JSX support.

Note: If you’re concerned about backwards compatibility, the new tool comes straight from the existing WP-CLI implementation—and in particular, the optional ES5 template uses the existing ES5 code.

#5-4, #block-editor, #dev-notes

WP Notify weekly meeting agenda for Monday 2 March 2020

This is the agenda for the next WP Notify feature project meeting, to be held today, Monday, March 2, 2020, 14:00 UTC.

Agenda

  • Opening and welcome
  • Reviewing work done on Current Status with a view to mark it complete
  • Reviewing and updating the requirements document: Project Goal
  • Reviewing and updating the requirements document: Overall Description
  • Open floor

If you have anything else to propose for the agenda or specific items related to those listed above, please leave a comment below.

This meeting is held in the #feature-notifications channel , to join the meeting, you’ll need an account on the Making WordPress Slack.

#agenda, #feature-notifications

Block Collections

Collections allow specific block types to be grouped together for added visibility in the editor’s Inserter menu, regardless of their categories. For instance, a plugin such as CoBlocks may register a Map block of category Widgets and a Post Carousel block of category Layout. By registering a collection for the coblocks namespace, these blocks will appear in the Inserter under their respective categories but also grouped under a CoBlocks collection.

The Block Collections API thus aims to improve the relationship of block discovery between users and plugin authors without compromising the semantics of block types, notably around categories (e.g. formatting, layout, widget, embed).

registerBlockCollection( 'coblocks', {
	title: 'CoBlocks',
	icon: brandAssets.categoryIcon,
} );

#5-4, #block-editor, #dev-notes

Introduce block variations API

Just as you can declare a block’s style variations when you register a block, a block type can define block variations the user can pick from. The difference is that, beyond changing the look, this field offers a way to apply initial custom attributes and inner blocks at the point of insertion.

By default, all the variations will show up in the Inserter along with the regular block-type item. But you can set the isDefault flag for any of the listed variations—and in the process, you’ll override the regular block type in the Inserter.

variations: [
    {
        name: 'wordpress',
        isDefault: true,
        title: __( 'WordPress' ),
        description: __( 'Code is poetry!' ),
        icon: WordPressIcon,
        attributes: { service: 'wordpress' },
    },
    {
        name: 'google',
        title: __( 'Google' ),
        icon: GoogleIcon,
        attributes: { service: 'google' },
    },
    {
        name: 'twitter',
        title: __( 'Twitter' ),
        icon: TwitterIcon,
        attributes: { service: 'twitter' },
    },
],

An object describing a variation defined for the block type can contain these fields:

  • name (type string) – The unique and machine-readable name.
  • title (type string) – A human-readable variation title.
  • description (optional, type string) – A detailed variation description.
  • icon (optional, type String | Object) – An icon helping to visualize the variation. It can have the same shape as the block type.
  • isDefault (optional, type boolean) – Indicates whether the current variation is the default one. Defaults to false.
  • attributes (optional, type Object) – Values that override block attributes.
  • innerBlocks (optional, type Array[]) – Initial configuration of nested blocks.
  • example (optional, type Object) – Example provides structured data for the block preview. You can set to undefined to disable the preview shown for the block type.
  • scope (optional, type String[]) – the list of scopes where the variation is applicable. When not provided, it assumes all available scopes. Available options: block, inserter.

#5-4, #block-editor, #dev-notes

New Blocks in WordPress 5.4

Social Icons Block

This new block lets users link to social media and other popular websites by using those sites’ logos. Initially called Social Links, Social Icons were an experimental feature in Gutenberg 6.5 but held out of WordPress 5.3. Since then, the Block Variations API has progressed to the point that Social Icons in Gutenberg 7.5 are much simpler and more stable – and ready for merge in WordPress 5.4.

This reimplementation is a breaking change in the way Social Icons are saved (see details). Only sites that have run the Gutenberg plugin since September are potentially concerned. 

In WordPress 5.4, the core block editor will not recognize any Social Icons blocks built before Gutenberg 7.5.

There are two ways to deal with this:

  • (Recommended method) Manually migrate any content with old Social Icons. Here’s how: load a post in the block editor (Gutenberg 7.5 or higher) and save it. The block editor will automatically update its contents. 
  • Keep the Gutenberg plugin installed after upgrading to WordPress 5.4. The plugin will give you manual backwards compatibility for the old Social Icons.

Buttons Block

This new block is a collection of buttons, because authors often need to use several at a time (for instance: download and read more buttons).

The buttons block shows each button as an individual button-block child of the Buttons block. You won’t be able to insert a button block outside Buttons, but your existing button blocks will work the way they always have.

In case you were using the button block as part of a template or a system that automatically inserted a button block, you’ll want to use the Buttons block with a nested button instead.

Plus, here’s some good news: you won’t need to migrate your existing button blocks. They’ll just work — again, as they always have.

#5-4, #block-editor, #dev-notes

WP Notify Meeting Recap – February 24 2020

This is a recap of the WP Notify meeting held on Monday, February 24, 2020, 14:00 UTC. You can read the full meeting discussion here in Slack.

We focused on the next sections of the requirements document, Section 3 “Current Status”, and Section 4 “Project Goals”.

Section 3. Current Status

  • Finalized description of existing API features and limitations

Section 4. Project Goals

  • We continue refining the definitions of our MVP (minimum viable product) a.k.a. Version 1.0
  • We outlined important research the project should include
  • We noted importance of retaining backwards compatibility of notifications handling

At the close of the meeting, @hrmervin posed the question of how/if Gutenberg methods of notification handling can influence this project, either in short term or long term. 

Next Slack Meeting

Join us next week, where we’ll continue the discussion on the project goals, and system feature requirements. 

📅 Monday, March 2 @ 14:00 UTC

#admin, #feature-notifications, #notifications

Devchat summary: February 26, 2020

@francina facilitated the chat on this agenda.

@valentinbora took care of publishing the meeting summary with special thanks to @amykamala, @audrasjb, @Cenay and @marybaum.

Full Meeting transcript on Slack

This devchat marked week 7 of the 5.4 release cycle.

Announcements

Upcoming Releases

Release Candidate 1, scheduled for March 3rd (read more about the WordPress 5.4 Development Cycle)

WordPress Release Cycle

For background, please read:

@johnbillion got to the heart of the matter: should beta be for fixing bugs that predate the ones introduced during alpha?

@jeffpaul shared his experience since version 4.7: beta is for any bugs, but the release candidate is for regressions only, even though the handbook doesn’t specifically point one way or the other.

@johnbillion liked the idea that beta is for every bug, as long as it’s in the milestone. But he noted that could make things tough in shorter release cycles.

@jeffpaul pointed out that avoiding committing non-regression bugs during beta means Beta and RC wouldn’t be as clearly different from each other as they are now. Potentially, they could merge into a single term.

@johnbillion averred that bugs could still get fixed in beta, but RC should be the point where the Core team is happy to release.

@joemcgill confirmed the current release cadence is set to assume that bug fixes of all types happen during the beta period (with digression from committers about what is safe to commit).

@joemcgill @johnbillion @azaozz all liked the idea of branching earlier in the cycle — for instance, at beta 1 — so people can keep working in trunk, and @sergey confirmed things typically go pretty smoothly on that end. He also favors branching as soon as the current milestone is empty.

per @johnbillion, @matt has, in the past, preferred to keep focus on the current release. 

@joemcgill stressed that the core team needs more clarity on what types of fixes are appropriate to commit to the 5.4 release, pointing out that the discussion in chat echoes this proposal to review historical practices to improve the project and potentially speed up release cycles.

@francina referred the group to the Release Model Working Group Chat Summary: February 19th, 2020 for the latest on that proposal.

@joemcgill and @francina — with other voices chiming in from the group — confirmed that 5.4 will continue as planned, with no changes. Any changes the working group comes up with will be effective no sooner than with the 5.5 cycle.

Components Check-in

  • News from components
  • Components up for adoption (Filesystem API and Rewrite Rules)
  • Components that need help
  • Cross component collaboration

@francina proposed a change to the Components Check-in. 

Up to now it’s typically fallen towards the end of the chat, so it feels rushed and rarely leaves enough time to dig into topics the group might bring up. She offers two options:

  1. Schedule a weekly post in Make, where maintainers can leave a status update, like the one for Community deputies;
  2. Adopt a Slackbot that, once a week, asks maintainers for a status update. 

@francina also proposed that those updates — and other communications — live in a new #component-maintainers Slack channel. Core is getting very busy with automated updates like Trac and Travis bots, plus RSS.

@valentinbora observed he hasn’t seen many check-ins in past meetings. @francina surmised that maintainers might not have time [to meet], or that time zones and other commitments [could be sources of conflict].

@francina and @valentinbora agreed that going async [communicating asynchronously] could help.

@cenay was in favor of the Slackbot option.

Action items

  • @francina to collect all the different info streams about the development cycle, offer a window to comment and update documentation;
  • @audrasjb to get all dev notes by the end of the week and publish the Field Guide before RC1.

Next Meeting

Meetings for #devchat take place weekly in the #core channel. The next meeting is Wednesday, March 4, 2020, 21:00 UTC.

#5-4, #5-4-release-cycle, #component-maintainers, #core, #devchat, #meetings

What’s new in Gutenberg? (26 February)

Gutenberg 7.6 brings considerable progress on the full-site editing (FSE) front, including four new FSE blocks:

  • Post Featured Image
  • Post Tags
  • Comments Count
  • Comments Form

In addition, this release includes many enhancements and fixes to existing blocks and features.

Any help testing FSE work is much appreciated. So, if possible, please enable FSE in your testing environments and share your feedback.

Gutenberg 7.6 also brings a rotating list of tips that appear in the Block Inserter to provide useful information to users:

The release also comes with developer-focused enhancements to wp-env and wp-scripts, thus improving the experience of building with WordPress.

Last but not least, this release cycle has prioritized bug fixing, and as a result this release brings numerous fixes that were also included in Betas 2 and 3 of WordPress 5.4.

Read on for the full change log.

7.6 🇱🇹

Features

  • Add a rotating list of tips to the inserter help panel 20163

Experimental

  • New blocks:
    • Post Featured Image. 19875
    • Comments Count block. 19953
    • Comments Form block. 19954
    • Post Tags block. 19580
  • Add new features to the Post Excerpt block. 19715
  • Allow changing Site Title block heading level. 20361
  • Render the post comments form properly 20279
  • Add new features to the Post Date block. 19857
  • Add multiple template loading 19141
  • Show error when resolved block template is empty 20239

Enhancements

  • Improve find-ability for social/video embeds 20224

New APIs

  • Ensure packages-update wp-scripts command works with missing dependencies 20408
  • Add new option in dependencies webpack plugin to combine assets files into one file 20330
  • Environment:
    • Add custom port numbers to .wp-env.json 20158
    • Add support for local override files. 20341
    • Add debug mode. 20348

Bug Fixes

  • Overflowing LinkControl block editor component. 20154
  • Broken gallery to image transform and inconsistent types used in the gallery block 20084
  • Missing label on heading toolbar. 20248
  • Sidebar jumpiness. 20355
  • Fix wrong imports in PluginBlockSettingsMenuItem 20356
  • Color formatter appears when color choosing is not possible 20222
  • Crash when updating a post with the latest post block 20289
  • Inconsistency on Import from JSON button look 20416
  • Inline image width pop-up ‘wanders’ down page 20232
  • Styling problem on vertically aligned blocks 20368
  • Remove unnecessary aria-label from link formatter 18742
  • Make navigation button expand to fit longer nav link text 20230
  • Flow for gallery creation and editing 20287
  • Fix background color for dark themes on the spacer block 20296
  • Show metaboxes peeking in even on tiny screens. 20262
  • Add an edit state to media frames to fix an issue when opening a new tab. 17642

Documentation

Various

  • Create block: Add support for format:js to ESNext template 20335
  • Add check for minimum system requirements on create block 20398
  • Conditionally apply Editor Skeleton html element styles 20245
  • Environment:
    • Check for legacy installs and provide the option to delete them. 20340
    • Fix testsPath on local sources 20353
    • Use user with UID=33 to run WP CLI commands 20403
    • Fix issue where docker & wp had different URLs 20228
    • No longer show error message twice 20157
    • Support wp-config.php overrides. 20352
    • Support overwriting generated file directory with an environment variable 20253

Performance Benchmark

The following benchmark compares performance for a particularly sizeable post (~ 36000 words, ~ 1000 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.

Version Loading Time KeyPress event (typing)
Gutenberg 7.6.0 7.7s 48.59ms
Gutenberg 7.5.0 8.5s 55.45ms
WordPress 5.3 7.9s 77.23ms

#core-editor, #editor, #gutenberg

Editor chat summary: Wednesday, 26 February 2020

This post summarizes the latest weekly Editor meeting, held in the #core-editor Slack channel, on Wednesday, February 26, 2020, 14:00 UTC.

WordPress 5.4 Upcoming Release

Gutenberg 7.6.0

  • RC will be released on Monday.
  • The changelog can be checked on https://github.com/WordPress/gutenberg/releases/tag/v7.6.0-rc.1.
  • The FSE work evolved a lot, and Gutenberg 7.6 includes four new FSE blocks, besides many enhancements and fixes to the existing blocks and functionality.
  • Any help testing FSE work is much appreciated, enable FSE on your test/in development projects and share your feedback.
  • Enhancement to wp/env and wp-scripts to make the developer experience better.

Weekly Priorities

  • The first iteration of G2 (Block UI redesign) has been merged into master and will make it into Gutenberg 7.7.

Task Coordination

Note: Anyone reading this summary outside of the meeting, please drop a comment in the post summary, if you can/want to help with something.

@nosolosw

@youknowriad

  • Working on G2.
  • Starting a new project with @nrqsnchz about Block Patterns.
  • Help with G2 follow-ups.
  • Triaging old issues.

@joen

@mcsf

  • Followed up on items related to Social Icons.
  • Discussed block variations and patterns with @gzioloo.
  • Pitched in around dev notes for 5.4, and some reviews.
  • Exploring how to implement embeds as block variations.

@ellatrix

  • Continuing work on lightening the block DOM and allowing blocks to render the entire block and inner block wrappers, hopefully making it easier to style block for block and theme authors. 

@brentswisher

@gziolo

  • Paired with @azaozz to improve the build process for the editor’s JavaScript scripts in WordPress core.
  • A few bug fixes/enhancements for @wordpress/scripts and @wordpress/create-block packages.
  • Several reviews including SlotFill refactor.
  • Plan to work on the block features API proposed by @youknowriad.

@getdave

@itsjusteileen

  • Working on FSE and block templates from a user and theme creator perspective.

@andraganescu

Open Floor

Capitalization in strings used in the editor

Encouraging component maintainers to get involved with the non-editor parts of Gutenberg

  • @noisysocks some discussion around how to encourage Widget component maintainers to get involved with the experimental Block Widgets functionality. There’s a lot of expertise there that the Core Editor team could use.
  • @youknowriad suggested inviting component maintainers to the core editor channel.

Query Blocks

  • @andraganescu some discussion around reusability of query block https://github.com/WordPress/gutenberg/pull/20106
  • @revgeorge It’s working, but I’m working with @epiqueras to figure out how to best structure it’s de-duplication feature, or possibly going ahead without de-duplication at launch. It’s behind the FSE flag in the branch because it needs the post blocks to display results
  • @itsjusteileen from a plugin perspective, I’d love to see it with de-dupe
  • @revgeorge I can show you how I plan to use it with a plugin use case. The current plan for deduplication is to provide a container block that uses hooks to provide a way for blocks to get a list of displayed posts and add to that list, the container would be aware of the order the blocks are in and what they’ve displayed.
  • @gziolo what’s the difference between Query block and Latest Posts block?
  • @youknowriad Query block doesn’t have a fixed output based on attributes, it uses InnerBlocks to render each “post”. So you could combine PostTitle, post content, PostExcerpt, Post* blocks as a template for each “Post” entry in the Query block.

Semantic HTML inside the Group block

#meeting-notes, #core-editor, #editor, #gutenberg