Editor Chat Agenda: 24th August 2022

Facilitator and notetaker: @zieladam.

This is the agenda for the weekly editor chat scheduled for Wednesday, August 24, 2022, at 03:00 PM GMT+1.

This meeting is held in the #core-editor channel in the Making WordPress SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/..

If you cannot attend the meeting, you are encouraged to share anything relevant to the discussion:

  • If you have an update for the main site editing projects, please feel free to share as a comment or come prepared for the meeting itself.
  • If you have anything to share for the Task Coordination section, please leave it as a comment on this post.
  • If you have anything to propose for the agenda or other specific items related to those listed above, please leave a comment below.

#agenda, #core-editor, #editor

A new system for simply and reliably updating HTML attributes

This call for feedback will be open until September 9th.

Let’s introduce a reliable tool WordPress could use to adjust the HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. 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. markup. The current practice of using basic replacements seems fine at a first glance but is easy to break. The system proposed here will help avoid these common pitfalls.

Consider this example of adding a style HTML attribute in the cover block:

preg_replace( '/class=\".*?\"/', '${0} style="' . $styles . '"', $html );

It assumes a specific HTML structure:

  • There is a class attribute
  • The style attribute isn’t already defined, as browsers ignore the repeated attributes.
  • There is no other attribute ending with the string class="", such as data-replace-class="…" or title='how to set the class="" attribute'
  • The existing class attribute uses double quotes and no single quotes or no quotes.
  • Regular HTML does not contain the class="" substring, for example in a post describing how to use the class attribute in an HTML document.

These assumptions are typically true, but only until they’re not. For example, applying a padding produces a markup such as below where the browsers ignore the second style attribute:

<!-- Formatting applied for clarity -->
<div
    class="wp-block-cover"
    style="background-image:url(/img.png);"
    style="padding-top:4px">

The original preg_replace could be patched, but eventually another assumption would break. The deeper, fundamental problem is that string replacements are not the right tool for updating HTML. They’re used out of necessity as WordPress does not provide any better tools. Well, let’s change it!

Let’s introduce a dedicated tool for reliably updating the HTML markup. It’s called WP_HTML_Walker:

$w = new WP_HTML_Walker( '<div></div>' );
$w->next_tag();
$w->set_attribute( 'style', $styles );
$updated_html = (string) $w
// <div style="display: block"></div>

Simple string replacements don’t account for nuances in HTML

The problem of updating HTML attributes frequently appears in block-related work. Recently @dmsnell and I (@zieladam) investigated how HTML attributes are typically updated in the WordPress codebase while exploring adding a CSS class to all Gutenberg blocks. We found the typical approach is to use string replacements similar to the one covered above.

Here are a few examples already in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. where we run into these nuanced problems:

The Site Logo block attempts to remove the href attribute:

// Remove the link.
preg_replace( '#<a.*?>(.*?)</a>#i', '\1', $custom_logo );

However, it also unintentionally removes all the attributes, including class and style.

The gallery block adds a CSSCSS Cascading Style Sheets. class:

preg_replace('/' . preg_quote( 'class="', '/' ) . '/', 'class="' . $class . ' ', $content, 1);

However, if there’s no existing class attribute, it will skip over the 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.) without adding the required class. The same technique is used in the duotone feature, and the block supports API.

As a side note, it’s easy to lean on the existing pattern of using more complicated functions such as preg_replace(). Calling preg_quote() in this example isn’t appropriate and the entire regular expression pattern does nothing more than a basic str_replace().

The block-supports 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. attempts to find the first HTML tag:

preg_match( '/<[^>]+>/', $block_content, $html_element_matches, PREG_OFFSET_CAPTURE );

However, it also matches non-tags like text hearts and mathematical expressions (<3, f(x) = {x, x<5; -1, x>=5}), DOCTYPE declarations, and HTML comments.

The media library adds the srcset attribute:

preg_replace( '/<img ([^>]+?)[\/ ]*>/', '<img $1' . $attr . ' />', $image );

However, a > character inside a tag attribute (e.g. title="why tacos > burritos")  would break the srcset functionality and potentially introduce a vector for injection attacks.

The list goes on, and it’s not just blocks.

Here’s an example from shortcodes:

if ( preg_match( '#((?:<a [^>]+>\s*)?<img [^>]+>(?:\s*</a>)?)(.*)#is', $content, $matches ) ) {

Media Embeds:

if ( preg_match_all( '#<(?P<tag>' . $tags . ')[^<]*?(?:>[\s\S]*?<\/(?P=tag)>|\s*\/>)#', $content, $matches ) ) {

Media Galleries:

preg_match_all( '#src=([\'"])(.+?)\1#is', $gallery, $src, PREG_SET_ORDER );

Twentynineteen:

preg_replace( '/<a\s.*?>/', $link, $item_output, 1 );

And many, many other places. The point is, this is how WordPress does it today.

Many features demand a more reliable way of updating HTML attributes. Block theming code, in particular, tends to modify block markup to apply visual styling:

The only way to reliably update HTML attributes is to follow the HTML specification. However, doing that from scratch every time a CSS class is added would only cloud the entire codebase with HTML parsing nuances and distract from the work being done. That’s why @dmsnell, @gziolo, and I (@zieladam) want to move this complexity into Core. It would be exposed as a tailored and restricted API that’s easy to use, hard to mess up, and easy to find.

The new system tokenizes HTML

WP_HTML_Walker (Pull Request 43268) recognizes HTML tags and updates their attributes. It’s reliable because it implements the same official HTML specification as WebKit, Chrome, Firefox, and other major browser engines.

Unlike full-fledged HTML parsers, the walker avoids handling malformed markup, semantic problems, and building a document tree. Any problems that are present on the input are passed on to the browser. The walker doesn’t fix HTML just as it won’t break HTML.

The tradeoff is that it only offers a simplified API to modify HTML attributes. If you want to replace an img tag with a full-fledged figure layout, this API won’t offer that functionality. Similarly, the walker won’t help you replace all the child nodes of a particular div with a completely new markup. This system is focused on finding specific HTML tags and adding, removing, or updating the attributes on those tags.

Remove the href attribute from an anchor tag:

$w = new WP_HTML_Walker( $html );
$w->next_tag( 'a' );
$w->remove_attribute( 'href' );

Add a style attribute to the first tag in the document:

$w = new WP_HTML_Walker( $html );
$w->next_tag();
$w->set_attribute( 'style', 'display: none' );

Add a CSS class to the first tag having the wp-block-media-text__content class:

$w = new WP_HTML_Walker( $html );
$w->next_tag(array(
    'class_name' => 'wp-block-media-text__content'
));
$w->add_class( 'wp-foo-bar' );

Add the srcset attribute to all image tags:

$w = new WP_HTML_Walker( $html );
while ( $w->next_tag() ) {
    if (
        isset( $w->get_attribute( 'src' ) ) &&
        ! isset( $w->get_attribute( 'srcset' )
    ) {
        $srcset = build_srcset( $w->get_attribute( 'src' ) );
        $w->set_attribute( 'srcset', $srcset );
    }
}

Processing HTML using this Core API could help avoid a broad array of mistakes that appear due to the oversimplification presented by the array of ad-hoc solutions. A common interface for operations on block markup would alleviate competition between changes. You can check the refactoring PR to see how this new API could improve code readability in the existing core blocks.

Why build a new API instead of using DOMDocument?

Using DOMDocument was extensively discussed. It’s not installed on every host so a polyfill would still be necessary. And even if it was available everywhere, it’s based on libxml2 designed to parse XML. Libxml2 does not implement the WHATWG HTML parsing spec, does not support HTML5, and brings with it a variety of parsing failures and quirks.

Like many DOM libraries, DOMDocument is a heavy interface that rewrites entire documents after several stages of transformation. In contrast, the walker exposes a focused interface closer to what string functions offer. For the kind of modifications occurring in WordPress this is a more natural and convenient approach.

If this resonates with you then please speak out before September 9th

This post will be open for feedback for the next three weeks until September 9th. After that @dmsnell, @gziolo, and @zieladam would like to merge the new API into the 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/ 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 to power adding CSS classes to Gutenberg blocks, block layout improvements, and changes in CSS style variations.

Also see the WP_HTML_Walker Pull Request.

Props to Dennis Snell (@dmsnell), Grzegorz Ziółkowski (@gziolo), Andrei Draganescu (@andraganescu), Carolina Nymark (@poena), and Ramon Dodd (@ramonopoly) for their reviews and help in putting this proposal together.
#core, #editor, #gutenberg, #proposal

Proposal: Stop merging experimental APIs from Gutenberg to WordPress Core

This call for feedback will be open for the next four weeks until September 7th.

I propose a way of harmonizing the process of merging new APIs from the 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/ 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 to the WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Right now, the two projects have very different policies, confusing contributors and sparking lively discussions on every major WordPress release. 

Today, experimental APIs are merged to Core and sometimes removed later

To date, 280 experimental APIs were merged from the Gutenberg plugin to WordPress Core. That’s problematic, and here’s why.

WordPress values backward compatibility. Upgrading to a new version should not break the plugins and themes, so WordPress public APIs these plugins and themes depend on are maintained across major versions. As the WordPress handbook states:

Historically, WordPress has been known for preserving backward compatibility across versions. 

The Gutenberg plugin values agility. It’s the safe space where new experiments are planted and grow into stable features without the same stability constraints. It is okay to ship a prototype, learn from it, and then start over again. New functions under active development often include the __experimental prefix in their name to indicate they may change at any point and shouldn’t be relied upon. Removing the obsolete code also makes the JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. bundle smaller and reduces the editor loading time. As the Gutenberg plugin handbook states:

Experimental and unstable APIs are temporary values exported from a module whose existence is either pending future revision or provides an immediate means to an end.

In the Gutenberg plugin, it’s fine to remove these experimental APIs. In WordPress, it’s not. Unfortunately, many have already been released with major WordPress versions.

Tomorrow, experimental APIs could be restricted to the Gutenberg plugin and never merged to Core

Let’s remove the experimental prefix before merging new APIs into WordPress Core.

This way:

  • Core can deliver the expected level of Backwards Compatibility
  • The Gutenberg plugin can retain the freedom to remove the experimental APIs as needed
  • The experimental APIs would get audits
  • It would make the release easier

Wouldn’t stabilizing every 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. before the release slow down new features?

The goal isn’t to stabilize. It’s to avoid adding public experimental APIs to WordPress core. Here’s two alternatives to stabilizing:

What if a stable feature depends on an experimental feature?

Then it isn’t actually stable. Let’s stabilize the dependencies first (or make them private).

What about the existing experimental APIs?

Most of those already merged to Core would get a stable alias. It would preserve BC and shouldn’t noticeably affect the bundle size. Some will need a different treatment; let’s discuss that case-by-case.

What if an existing experimental API already in Core needs to be removed?

Does it? If so, let’s consider that on a case-by-case basis. There are established Core practices like contacting plugin authors, writing make Core posts, preferring soft deprecations, and so on. I don’t expect to see many instances of this.

What if a future stable Gutenberg plugin API really needs to be removed after it’s released in Core?

Yes, it will happen. Let’s acknowledge and embrace it. Some good reasons were mentioned in the GitHub discussion, and the future will surprise us with many new ones. Again, let’s follow the established Core practices. For example, deprecated.php shows that removing a function body is sometimes okay as long as the name keeps working.

What are the downsides?

I can see three:

  • Some Gutenberg plugin features will get merged into the Core later that they currently would be. The total amount of the development work won’t change, but the merging timeline will. That could be a good thing. Using the Gutenberg plugin is the intended way of accessing the upcoming features early.
  • Refactoring Gutenberg plugin APIs will be difficult once they get shipped with Core. In reality, that’s already the case.
  • Risk: Surgically removing all the Gutenberg plugin work spanning multiple WordPress releases from pre-release merges may become too complex. It would halt the merges entirely. If this risk does materialize, the merge guidelines will need to be adjusted again.

If you see any other downsides, please speak out!

What alternatives have been considered?

  • Keep not acting on the problem.
  • Use the same Backwards Compatibility policy for both WordPress and the Gutenberg plugin – which would make both projects worse off.
  • Find a way to ship the experimental APIs with Core as “internal” and unavailable to plugin authors – which has been explored without a successful resolution.

Unfortunately, neither is viable, as explained in more detail in the GitHub discussion.

If this resonates with you, speak out before September 7th!

Policies don’t contribute to the Gutenberg plugin. People do. This proposal will only work if we, the contributors, believe it’s the right thing to do.

Please share your thoughts under this post or in the GitHub discussion – even if it’s just “I like it.” All opinions are welcome, especially if you are not convinced about this proposal.

This call for feedback will be open until September 7th.

Props to Birgit Pauli-Haack (@bph), Grzegorz Ziółkowski (@gziolo), and Hector Prieto (@priethor) for their help in putting this proposal together.

#editor #gutenberg #core #proposal

Editor chat summary: Wednesday, 03 August 2022

This post summarizes the latest weekly Editor meeting (agenda, slack transcript), held in the #core-editor SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel, on Wednesday, August 03, 2022, 14:00 UTC.

General Updates

Gutenberg v13.8.0 stable version was tagged and released today.

Thanks to @mamaduka for tackling this release!

Async key project updates

Read the latest updates directly from the following tracking issues:

@jorgefilipecosta

  • On the styles and style engine projects created a PR ready that outputs the presets specific to a section. It is ready for reviewWith it a group 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. e.g: used in a pattern can have its own presets e.g: its own color palette its own gradients etc 
  • A PR with an identical mechanism for descendent block styles is also available at.
  • On the site editor and templates project, I created a PR that allow the user to create a generic template from the site editor and another that allows creating templates for specific authors.
  • On the building with patterns project, I have a PR ready that allows one to limit the usage of its pattern to specific post types.

Task Coordination

@zieladam

@paaljoachim

@siobhan

  • From the mobile side, we recently worked to match the web’s support for List v2
  • We have tentative plans to upgrade the ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. Native version in the upcoming weeks/months

@annezazu

  • Working on a recap of the latest call for testing for the outreach program (and figuring out what the next one might look like).

Open Floor

@zieladam shared about way to update HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. markup from PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher

  • Could you use a better way of updating the HTML block markup from your PHP code? You’ll love this proposal of a canonical HTML-processing 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.:WP_HTML_Walker: Inject dynamic data to block HTML markup in PHP it can only move forward with your input! Please read, express your use-case and concerns, and review the code – it’s the only way to get it eventually merged.
  • The proposal will be shared via make post for better visibility and reach.

@wildworks

@sabernhardt

  • Suggested adding coordinate-with-gutenber to some tracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. tickets such as 56228 which involves editing both coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. files and the 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.

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.

Read complete transcript

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

Giving FSE a More User Friendly Name

tl;dr: The terms “full site editing” and “full site editor” (also abbreviated as FSE) were developed to easily refer to a collection of features and now that those features are integrated into our daily WordPress experience, how can we best update the wording to be more user friendly?

Not sure the difference between 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/, full site editing, and other terms here? Check out this post for high level definitions.

What I know

Many years ago when we started referring to some of the work going into Gutenberg’s Customization phase (Phase 2) as “full site editing” it was meant to differentiate from the work that had come out of Phase 1. Phase 1’s work was focused on bringing blocks to posts and much of the page surrounding posts, but Phase 2 was meant to move those blocks to the rest of the site editing experience—hence “full site editing”.

There are some issues with the term “full site editing”, though.

  • It was already possible to edit every part of a WordPress site using code. The term “full site editing” differentiated between phases of a project, rather than a new capabilitycapability capability is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on their role. For example, users who have the Author role usually have permission to edit their own posts (the “edit_posts” capability), but not permission to edit other users’ posts (the “edit_others_posts” capability). in the CMS.
  • To us, “full site editing” implies the use of blocks, but for new users there’s no reason for them to expect anything else. The term isn’t descriptive of what makes it unique.

As we continue the move toward a full-featured, true WYSIWYGWhat You See Is What You Get What You See Is What You Get. Most commonly used in relation to editors, where changes made in edit mode reflect exactly as they will translate to the published page. experience for WordPressers of all skill levels, we should have a way to refer to it that is immediately meaningful for new users of our software, while also being an easy to reference term for all of us building and supporting the software.

What I see 

There are a few existing conversations around renaming Full Site Editing (both from a UIUI User interface/UXUX User experience perspective as well as a development perspective). From what I have seen in my reading, there are two primary contexts from a big picture perspective: Users & Visitors of WordPress; Contributors & Extenders of WordPress. That leads me to think we have two primary use cases for terms as well.

  • Users & Visitors of WordPress: I’ve heard a lot of people outside of the WordPress ecosystem simply referring to this as “the WordPress editor”. That seems mostly applicable to folks building with WordPress, selling on WordPress, or otherwise not creating the CMS itself.
  • Contributors & Extenders of WordPress: I have primarily seen references to “the 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. editor” with the understanding that work toward Full Site Editing is a suite of tools from within the Block editor, a framework that originated in the Post Editor but is extending to all areas of WordPress like the Site Editor, hence most editing interfaces evolving into “the Block Editor”. This seems mostly applicable to folks working in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., on Themes/Plugins, and by extension, also Training, Design, and Documentation.

What other contexts do you think we need to be aware of as we look toward making this more user friendly?

What I need

As with any audacious journey, one of the things that will hinder our success is not knowing what stands in our way. I would love it if you’d share your thoughts on the following questions!

  1. We’ve referred to it this way for a long time. How can we tackle renaming this together?
  2. It’s in the codebase. How will we make sure people who aren’t regular contributors see this?
  3. And repeating the in-line question from above: What other contexts do you think we need to be aware of as we look toward how to refer to our collective work in the future?

#core-editor, #editor, #gutenberg

Editor chat summary: Wednesday, 06 July 2022

This post summarizes the latest weekly Editor meeting (agenda, slack transcript), held in the #core-editor SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/. channel, on Wednesday, July 06, 2022, 14:00 UTC.

General Updates

Async key project updates

Read the latest updates directly from the following tracking issues:

@jorgefilipecosta

  • On the styles and style engine projects created a PR ready that outputs the presets specific to a section. It is ready for reviewWith it a group 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. e.g: used in a pattern can have its own presets e.g: its own color palette its own gradients etc 
  • A PR with an identical mechanism for descendent block styles is also available at.
  • On the site editor and templates project, I created a PR that allow the user to create a generic template from the site editor and another that allows creating templates for specific authors.
  • On the building with patterns project, I have a PR ready that allows one to limit the usage of its pattern to specific post types.

Task Coordination

@zieladam

  • Focusing on merging the editor changes to WordPress 6.0.1 and also exploring add a .wp-block-heading CSS class to the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress./heading block – and perhaps other blocks as well?
  • Published another part of the WordPress data tutorial

@jorgefilipecosta

  • Worked on adding new templates to the UIUI User interface, outputting presets at the block level and descendent block styles, and the 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. that allows restricting patterns to specific post types.
  • Next week I plan to continue expanding the template creation with the UI supports, iterate and merge the current PR’s .
  • Pick a new task if we manage to finish the expansion of supported templates on the UI.

@fabiankaegy

  • I’d love to get a pair of eyes on this PR that a college prepared. It adds a setting to theme.json to allow developers to control whether the width control of the Core Buttons block gets shown to the user or not 

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.

Read complete transcript

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

Editor chat summary: Wednesday, 29 June 2022

This post summarizes the weekly editor chat meeting on Wednesday, 29 June 2022, 14:00 UTC held in Slack.

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/ 13.6 RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).

@jorgefilipecosta Released Gutenberg 13.6 RC today. The release could be downloaded at https://github.com/WordPress/gutenberg/releases/tag/v13.6.0-rc.1. The changelog could also be checked on the same link.

WordPress 6.0.X

Information related to future patchpatch A special text file that describes changes to code, by identifying the files and lines which are added, removed, and altered. It may also be referred to as a diff. A patch can be applied to a codebase for testing. releases of 6.0 can be checked on https://make.wordpress.org/core/2022/06/25/wordpress-6-0-x-release-team-and-6-0-1-schedule/.

On the editor side @zieladam is going to help with 6.0.1 for future releases there is an opening if someone is able to help.

WordPress 6.1

The planning post for WordPress 6.1 is available at https://make.wordpress.org/core/2022/06/23/wordpress-6-1-planning-roundup/. There are some positions opened on the release squad so if something interests feel free to volunteer in that post.

The BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 1 & Feature Freeze is scheduled for September 20, 2022.

Key project updates

Building with patterns & Styles

Now we have the ability to use start patterns on a modal on other post types besides pages https://github.com/WordPress/gutenberg/pull/41791. A much-requested feature.

@jorgefilipecosta proposed PR to target descend 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. styles in a block using s shape equivalent o 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. on https://github.com/WordPress/gutenberg/pull/41922. It allows more styling flexibility when building a pattern.

Task coordination

@get_dave

@jorgefilipecosta

  • Previously:
    • Proposed a mechanism to allow the usage of the start post pattern modal on other post types besides pages.
    • Added an 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. to allow a pattern to be restricted to some post types
    • Proposed an API to allow blocks to style their descendent blocks.
    • Multiple 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, code enhancements, and reviews.
  • Future:
    • Implement the rendering of block-level presets.
    • Help the effort to expand the templates that can be created on the site editor.

@mamaduka

Is looking for technical feedback/review for my new PR to allow locking inner blocks from the container block – https://github.com/WordPress/gutenberg/pull/41876.

Open Floor

Toolbar 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.

@get_dave said that the toolbar has suffered a regression whereby it now obstructs blocks that are at the top of the viewport. The Nav block is badly affected by this. If anyone is available to work on this that would be great. I know @talldanwp has also promised to give it some attention.

@jorgefilipecosta asked if already know the PR that caused the regression. @get_dave said the popover component upgrade is the probable cause and added @talldanwp is investigating.

Weekly bug scrub

@NickDiego shared in the meeting that now we are now holding weekly Editor Bug Scrubs at 1400 UTC on Tuesdays here in #core-editor he and @mamaduka held the first one this week. Everyone is encouraged to participate and help on the weekly bug scrubs.

Request for RTL testing

@poena said:

There is a PR for RTL styles that could use more testing by someone who uses an RTL language as their default for the editor:

https://github.com/WordPress/gutenberg/pull/41762

So if you usually use RTL language your help is greatly appreciated.

#agenda, #core-editor, #editor, #summary

Proposal: Better REST API handling in JavaScript

This call for feedback will be open for the next two weeks until July 18th.

I propose extending the useEntityRecord hook to support editing and deleting WordPress data. It should make building features and plugins on top of WordPress 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/. easier.

The hook is a part of @wordpress/core-data, a JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user’s browser. https://www.javascript.com/. package providing tools for interacting with the WordPress REST API. You may know coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.-data from Redux selectors, actions, and ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org/. 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. like  getEntityRecord, saveEntityRecords, useSelect.

Today, useEntityRecord enables easy access to data

The useEntityRecord hook enables fetching data with just a single line of code:

import { useEntityRecord } from '@wordpress/core-data';
 
// Inside of a React Component:
function PageTitle() {
    const { record, hasResolved } = 
        useEntityRecord( 'postType', 'page', 15);
    return hasResolved ? record.title : 'Loading...';
}

It was introduced to the 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/ repository in PR #38782 and will land in WordPress core in 6.1, the next major releasemajor release A release, identified by the first two numbers (3.6), which is the focus of a full release cycle and feature development. WordPress uses decimaling count for major release versions, so 2.8, 2.9, 3.0, and 3.1 are sequential and comparable in scope..

For comparison, achieving the same result without useEntityRecords requires much more knowledge about the Gutenberg internals:

import { useSelect } from '@wordpress/data';
import { store as coreDataStore } from '@wordpress/core-data';

// Inside of a React Component:
function PageTitle() {
	const { page, hasResolved } = useSelect(
		( select ) => {
			const selectorArgs = ['postType', 'page', 15];
			return {
				page: select( coreDataStore )
					.getEntityRecord( ...selectorArgs ),
				hasResolved: select( coreDataStore )
					.hasFinishedResolution(
						'getEntityRecord',
						selectorArgs
					),
			};
		},
		[]
	);
	return hasResolved ? page.title : 'Loading...';
}

Tomorrow, useEntityRecord could ease editing data

In PR #39595, I proposed taking useEntityRecord one step further to make editing WordPress data equally easy:

const { record, edit, editedRecord, hasEdits, save } =
	useEntityRecord( 'postType', 'page', pageId );

// edit({ title: “My new title” });
// save();

// After React re-render:
// console.log( record.title );
// "My new title"

In comparison, this is how it’s done today:

const {
	editEntityRecord,
	saveEditedEntityRecord,
} = useDispatch( coreStore );

const { record, editedRecord, hasEdits, isSaving, saveError } =
	useSelect(
		( select ) => {
			const args = [ kind, type, id ];

			return {
				editedRecord: select( coreStore )
					.getEditedEntityRecord( ...args ),
				hasEdits: select( coreStore )
					.hasEditsForEntityRecord( ...args ),
				isSaving: select( coreStore )
					.isSavingEntityRecord( ...args ),
				saveError: select( coreStore )
					.getLastEntitySaveError( ...args ),
			};
		},
		[ kind, type, id ]
	);

// editEntityRecord(kind, type, id, { title: “My new title” });
// saveEditedEntityRecord(kind, type, id);

// After React re-render:
// console.log( record.title );
// "My new title"

I combed through the WP Directory and found existing plugins that could already benefit from this pattern.

If this resonates with you, speak out before July 18th!

Introducing new APIs means having to maintain them indefinitely. Therefore, I would like to confirm this proposal offers an attractive solution to a real problem. This post attempts to do just that, and I would love to hear from you! All opinions are welcome, especially if:

  • Your JavaScript code interacts with the WordPress REST API
  • You’re maintaining code that leans on wordpress/core-data
  • You’ve struggled to learn how to use it
  • This new 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. would be helpful for you
  • You’re not convinced there’s a need to introduce such an API

I’m also interested in all the code samples related to editing and saving entity records that you are willing to share. It would be a great way to validate and exercise the proposed API.

This call for feedback will be open for the next two weeks until Jul 18, 2022.

Props to Anne McCarthy (@annezazu) and Grzegorz Ziółkowski (@gziolo) for their help in putting this proposal together.

#editor, #gutenberg, #proposal

Proposal: Editor Weekly Bug Scrubs

This post is a proposal to start weekly Editor Bug Scrubs in #core-editor the week of June 28th. The scrubs will have a singular focus on issues in the Gutenberg 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/ repository. If you have feedback, please comment by June 24th, 2022.

Overview

New in the WordPress 6.0 release cycle, the role of Editor Triage Lead triages 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/ issues in the release and, to that end, runs weekly 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. scrubs in #core-editor.

As the release progressed, it became clear just how valuable these weekly meetings were in moving issues forward. And as the launch drew near, George Mamadashvili (@mamaduka) suggested continuing the scrubs a weekly, regardless of the release schedule.

Gutenberg right now has more than 4,200 open issues, and the number grows faster by the month.

And that number, especially out of context, makes a fairly convenient data point for observers to cite as evidence the project is not production-ready. Now, the same records that show the issues also show that dozens of contributors regularly and actively triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. these issues.

But the process for working through any set of issues on GitHub or tickets on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. is informal — that is the nature of open sourceOpen Source Open Source denotes software for which the original source code is made freely available and may be redistributed and modified. Open Source **must be** delivered via a licensing model, see GPL.. Which also means, therefore, that the process utterly depends on the interests and skillsets of those contributors who show up and do the work.

The result is an ad-hoc process that has produced hundreds of stale issues. Many of those are no longer relevant, but they stay open because nobody formally closes them. And truly important issues are at a nontrivial risk of slipping through the cracks.

Weekly bug scrubs will not single-handedly solve these problems. But they will dedicate a solid hour every week when team members (including you, who are reading this now!) get together, review issues, and make concrete plans to resolve them.

And during release cycles, the structure will give Editor Triage Leads a ready structure and a team of contributors to get more done, and produce a better experience, with every new version of WordPress.

Proposal

  • What will happen? An Editor Weekly Bug Scrub meeting, in #core-editor SlackSlack Slack is a Collaborative Group Chat Platform https://slack.com/. The WordPress community has its own Slack Channel at https://make.wordpress.org/chat/., every Tuesday at 1400 UTC.
  • When will they start? The week of June 28, 2022.
  • How will people know they’re happening? The scrubs will be on the Meetings Calendar.
  • What will they cover? Bug scrubs will follow the normal process in the Handbook — but address only Gutenberg issues on GitHub. 
  • Who will run these scrubs? Members of the Gutenberg Triage Team. Nick Diego (@ndiego) and George Mamadashvili (@mamaduka) will run the first several. Then other team members will get onboarded for future sessions. 
  • How will they work with the release cycle?
    • As soon as the release squad has a designated Editor Triage Lead, that person will lead the meetings and tailor triage efforts to he release in progress. 
    • At launch, meeting leadership will go back to the Gutenberg Triage Team. Ideally, Editor Triage Leads will have come from the Gutenberg Triage Team, so that transition should be seamless.

Next Steps

So what do you think?

Please share your comments by June 24th. If the community agrees Editor Bug Scrubs would be a good thing, the first scrub will be Tuesday, June 28, 2022, at 1400 UTC.

Props to George Mamadashvili (@mamaduka), Justin Tadlock (@greenshady), Héctor Prieto (@priethor), and Birgit Pauli-Haack (@bph) for their help in putting this proposal together.

(Ed. note: Also, did you know that anyone can lead a bug scrub, for any reason? That means you! And you can focus your scrub on any tickets you like, or any Gutenberg issues. (The difference: most of CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. runs on Trac, which uses tickets and patches. The 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. editor runs on GitHub, which uses issues and pull requests. – @marybaum)

#bug-scrub, #editor, #gutenberg

Editor chat summary: Wednesday, 4 May 2022

This post summarizes the weekly editor chat meeting on Wednesday, 4 May 2022, 14:00 UTC held in Slack.

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/ 13.2 RCrelease candidate One of the final stages in the version release cycle, this version signals the potential to be a final release to the public. Also see alpha (beta).

George Hotelling is going to release Gutenberg 13.2 RC. The PR’s part of the release are available at https://github.com/WordPress/gutenberg/milestone/177. The release contains 154 PRs.

WordPress 6.0 Project board & WordPress 6.0 BetaBeta A pre-release of software that is given out to a large group of users to trial under real conditions. Beta versions have gone through alpha testing in-house and are generally fairly close in look, feel and function to the final product; however, design changes often occur as part of the process. 4 & WordPress 6.0 RC 1

WordPress 6.0 RC was released on the 3 of May. Everything is going according to the plan no critical or blocking issue has been found. There are still some tasks on the 6.0 board https://github.com/orgs/WordPress/projects/27, these tasks will probably be part of 6.0.1.

Help Wanted: Test WordPress 6.0

Any help testing the latest version and making sure there are no issues there can have a great impact. Please try your development website with the last RC. And in case you find any issue please report it so the team can fix it.

Key projects updates

Patterns & Styles

@jorgefilipecosta share the updates for patterns and styles as follows:

Right now, we have a style object on the blocks that follow a similar shape to the 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. styles, but they are not equivalent, and also, not everything theme.json supports is supported there. The idea is to have blocks support local settings and style objects @oandregal started the work on the settings part. On the styles front we had tremendous progress that makes the style theme.json object color and typography keys be supported https://github.com/WordPress/gutenberg/pull/40332. Thank you @ramonopoly!

In order to have settings with semantic meaning, a 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. instance needs to have a name and probably information related to the type of section keywords, etc. @jorgefilipecosta started and iterated on the work to implement the metadata infrastructure for these sections https://github.com/WordPress/gutenberg/pull/40393.

Comments

@santosguillamot said regarding comments he just published an update on the tracking issue of the PRs that have been merged and included later in the RC.

Task coordination

@jorgefilipecosta

Plans:

  • To merge the section’s metadata PR.
  • Help the exploded view PR get merged and the refactors it involved including the popover.
  •  Finish some tasks I have pending related to the list v2 block.

@paaljoachim

Has earlier been giving feedback through issues to various Comments block features and Going forward plans on testing WP 6.0 Beta/RC releases.

@mamaduka

Has worked on performance improvements for Navigation blocks and a few more last-minute fixes for the WordPress 6.0 release.

Open floor

UIUI User interface to create a single template

@jessica asked if there is a specific reason we can’t add single templates in the site editor?

@jorgefilipecosta said he thinks that the task is available for someone to pick.

@jessica submitted a PR fixing the issue after https://github.com/WordPress/gutenberg/pull/40830.

Wide alignments on nested blocks

@cbirdsong asked why when theme.json is enabled one can not use wide/full alignments on nested blocks liking to the issue https://github.com/WordPress/gutenberg/issues/33374. Adding that, This is the core reason my custom theme builds don’t use theme.json, and as more features are gated behind using it, he was wondering if there is any chance of some re-evaluation of disallowing nested wide/full alignments.

The team discussed this issue and concluded the issue could be divided into two parts:

  • First, the cover block is missing a layout panel.
  • The default for blocks is not “inherit default layout”.

@cbirdsong will follow up and create the two issues.

#agenda, #core-editor, #editor, #summary