Miscellaneous REST API improvements in WordPress 6.1

Search REST resources by ID across subtypes

WordPress 6.1 includes an enhancementenhancement Enhancements are simple improvements to WordPress, such as the addition of a hook, a new feature, or an improvement to an existing feature. to the search controller, #56546, which makes it possible to retrieve a term or post object over the 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/. without knowing anything but that resource’s ID and object type.

get_post can retrieve a post of any post type so long as you know the post’s numeric ID, and get_term can retrieve a term from any 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.. Because REST objects are segregated by post type-specific endpoints, however, there has not been a clear way to get a Post with ID 78 if you don’t know whether it is a page, post, or my-cpt.

The coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. /search endpoint now supports ?include and ?exclude parameters which take a list of IDs, and limit results to posts matching those IDs.

Examples:

  • To get post 78 when you don’t know its post type,
    • /wp/v2/search?include=78
  • To get posts 78 and 79 only if they are in the page post type,
    • /wp/v2/search?include=78,79&subtype=page
  • To search posts excluding post 78,
    • /wp/v2/search?exclude=78
  • To get term 87,
    • /wp/v2/search?type=term&include=78
  • To get term 87 only if it is a categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging.,
    • /wp/v2/search?type=term&include=78&subtype=category
  • To search terms excluding terms 87 and 88,
    • /wp/v2/search?exclude=87,88

The search endpoint supports the _embed metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. parameter, so developers can therefore use the search endpoint to retrieve a full post or term response object in one request knowing only those object’s IDs.

As an example of how this could be used, imagine a custom 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. which relates to a specific post. As of WordPress 6.1 developers can implement that block knowing only the related post’s ID, and could then create a hook to search for that post by ID and retrieve it using the Block Editor’s existing entity system:

/**
 * Dictionary of requested items: keep an in-memory list of the type (if known)
 * for each requested ID, to limit unnecessary API requests.
 */
const typeById = {};
​
/**
 * Query for a post entity resource without knowing its post type.
 *
 * @param {number} id Numeric ID of a post resource of unknown subtype.
 * @returns {object|undefined} The requested post object, if found and loaded.
 */
function usePostById( id ) {
    const type = typeById[ id ];
​
    useEffect( function() {
        if ( ! id || typeById[ id ] ) {
            return;
        }
​
        apiFetch( {
            path: `/wp/v2/search?type=post&include=${ id }&_fields=id,subtype`,
        } ).then( ( result ) => {
            if ( result.length ) {
                typeById[ id ] = result[0].subtype;
            }
        } );
    }, [ id ] );
​
    return useSelect( function( select ) {
        if ( ! id || ! type ) {
            return undefined;
        }
        return select( 'core' ).getEntityRecord( 'postType', type, id );
    }, [ id, type ] );
}

Pretty-printing REST endpoint 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. responses

WordPress 6.1 also introduces support for returning pre-formatted JSON from the REST API. #41998 lets developers request formatted JSON using a new _pretty query parameter or a 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., particularly useful when querying via curl or other tools which do not provide an option to format responses.

To format the JSON returned from a specific endpoint request, append the ?_pretty query parameter to the endpoint URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org.

To instruct WordPress to pretty-print all REST response bodies, a developer can use the rest_json_encode_options filter:

function myproject_pretty_print_rest_responses( $options ) {
        $options |= JSON_PRETTY_PRINT;
​
        return $options;
}
add_filter( 'rest_json_encode_options', 'myproject_pretty_print_rest_responses', 10 );

A developer or site owner may also disable pretty-printing globally using the same filter:

function myproject_disable_rest_pretty_printing( $options ) {
        $options &= ~JSON_PRETTY_PRINT;
​
        return $options;
}
add_filter( 'rest_json_encode_options', 'myproject_disable_rest_pretty_printing', 10 );

Filters are applied after, and can override, the _pretty query parameter.

Thanks to @spacedmonkey for peer review.

#core-restapi, #dev-notes, #dev-notes-6-1, #rest-api

Performance improvements to the REST API

WordPress 6.1 brings a number of key improvements to the 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/. to increase performance. These improvements decrease the number of database queries that are run on each REST API request. 

Avoid unnecessarily preparing item links

Prior to WordPress 6.1, the prepare_links method in the REST API was called in all controllers. If the _fields parameter is passed to the REST API request, it might mean that the links field is not requested and would never be returned in the response. This is wasteful, as prepare_links can contain database calls or other complex logic that would be run even if it never returned the response. 

In 6.1 prepare_links are only called if requested in the response, when links are requested in fields or the _embedded parameter is passed. As part of this work, the 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. and post type controllers have now been updated to implement said prepare_links method to bring them in line with other REST API controllers. 

This is the code example of implementing this change in custom REST API controllers.

Before

$response = rest_ensure_response( $data );
$links = $this->prepare_links( $post );
$response->add_links( $links );

return $response;

After

$response = rest_ensure_response( $data );

if ( rest_is_field_included( '_links', $fields ) || rest_is_field_included( '_embedded', $fields ) ) {
  $links = $this->prepare_links( $post );
  $response->add_links( $links );
}

return $response;

This logic conditionally calls prepare_links only if _links or _embedded is requested. This logic only applies when using the _fields query parameter. When not using _fields, links are included in the response as normal. 

For more info see TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. ticketticket Created for both bug reports and feature development on the bug tracker.: #52992, #56019, #56020

Improvement to the Posts controller

When running profiling tools against the responses of REST API requests, it was discovered that post controllers request a lot of linked data to each post. For example, when returning a post in a REST API response, linked data such as author (user), 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., and parent post were all requested. As these linked items were not primed in caches, it could mean that for each post in the REST API response there would be 3 separate database queries: one for the user, one for the featured image, and another for the parent post. 

In WordPress 6.1 all the caches are primed in a single database query and there are new helper functions to enable this:

update_post_author_caches

Takes an array of posts and primes users caches in a single query. 

update_post_parent_caches

Takes an array of posts and primes post parents in a single query. 

update_menu_item_cache

Takes an array of posts and primes post / terms link to menu items single query. 

The existing function update_post_thumbnail_cache was used to prime featured image caches. These functions are also being rolled out to other parts of the coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. that can benefit from priming caches in a single place. 

For more info see Trac tickets: #55592, #55593, #55620    

Improvements to other controllers

The comments and user controllers have also been improved: User controller now primes user metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress. in a single query and the comments controller now primes the linked post cache in a single query. Improvements were made to the post search controller to improve database performance along with the media controller. 

For more info see Trac tickets: #55674, #56272, #55677, #55716

Props to @flixos90 and @milana_cap for peer review and @mxbclang and @webcommsat for proofreading.

#6-1, #core-restapi, #dev-notes, #dev-notes-6-1, #performance, #rest-api

Agenda: Office Hours 19 August 2020 at 18:00 UTC

@paaljoachim has asked what the UI needs to look like for a Privacy screen in Core. You can read the conversation here: https://wordpress.slack.com/archives/C9695RJBW/p1597418745430800 (a Slack account is needed)

  • Site-level privacy
    Initiatives: 1.) Disclosures and Permissions Tab; 2.) Local AvatarAvatar An avatar is an image or illustration that specifically refers to a character that represents an online user. It’s usually a square box that appears next to the user’s name. Project (in collaboration with the #core-media team)

    The DPT would require writing a 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. schema, as well as a coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. function to validate it (hopefully in collaboration with the #core-restapi team).
    The UIUI User interface would most likely be under Settings -> Privacy.
    This interface should help site owners / admins understand what information their site collects (by means of individual plugins, themes, as well as Core), where it is stored and where it is sent.
    Ideally, this would provide a mechanism for the site owner to prevent data from being transmitted off-site / make choices with regards to third party access.

    Part of the Local Avatar Project would overlap with site-level privacy in the following areas: Settings, Permissions and Library.
    There is currently still a discussion as to whether a fully-fledged library is needed (defined as that image metaMeta Meta is a term that refers to the inside workings of a group. For us, this is the team that works on internal WordPress sites like WordCamp Central and Make WordPress.-data needs to be edit-able).
  • Website-visitor level privacy
    Initiatives: 1.) Consent 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.; 2.) Local Avatar User Upload Screen

    The Consent API in its current form is not intended to have any UI.
    This is due to the fact that website visitors who are not registered / not logged in still need to be able to exercise privacy choices.
    However, it may be nice to allow logged-in users to save their privacy choices on a more permanent basis, perhaps by making use of user_meta. In this case, there would need to be a UI on the user’s profile screen to support this.
    There would presumably still be no UI for users who are not logged in. A UI could be provided by means of a consent management 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.

    Additionally, the Team needs to discuss which filters / functions may be necessary in Core in order to convert the Consent API feature pluginFeature Plugin A plugin that was created with the intention of eventually being proposed for inclusion in WordPress Core. See Features as Plugins. into a more fully-fledged API, e.g. wp_set_cookie();

    Part of the Local Avatar Project would overlap with website-visitor level privacy. This would mainly be in the following area(s): User Profiles. For example, users may want to indicate that they do not wish for their avatars to be indexed by search engines.

Please join us for this week’s office hours to discuss what these solutions may look like!

#consent-api, #core-privacy, #disclosures-tab, #local-avatar-project, #privacy

Editor chat Summary: 1st July, 2020

This post summarizes the weekly editor chat meeting agenda here. Held on Wednesday, 1st July 2020 held in Slack. Moderated by @andraganescu.

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 8.4.0

Gutenberg version 8.4.0 was released.
A huge thank you to @noisysocks for helping for tackling the huge release.

Here is the nice release post.  It was a packed release with the Image Editing as highlight.

WordPress 5.5.

@ellatrix is maintaining a project board for 5.5 of issues/PRs that need to go into the next release.

Monday Gutenberg 8.5 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). will be released, which is the last Gutenberg release going into WP 5.5, so all features and enhancements that need to go in WP 5.5 must be (ready) in this release. After that, we ideally only backportbackport A port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. regressions or limited 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 for new things. 

It’s also time to start thinking about dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase.. Anybody can help by writing a dev notedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase. for any of these features doing their best to cover:

  • explaining the change
  • why it was done
  • and, if it’s an impacting change, how to update the third-party code

Monthly Plan

The monthly plan for June. A plan for July is in the works by @annezazu

Task Coordination

@zeb

My PR to move reusable blocks to their own tab in the inserter is nearly ready, but there is one remaining end-to-end test failure that I need help to resolve. Remember, this is on the WP 5.5 must-have list: PR:23296

I’ve made some great improvements to the Heading 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. heading level checker PR. If feedback is positive, it should be good to merge: PR:22650

I have a PR to add color controls to the List block. A lot of users have asked for this feature, and some contributors have suggested that we get this in soon for WP 5.5. However, there are some big editor style conflicts that I think need resolving first. I need help to get this one to progress any further. Once it is resolved, it will open the door to other list-based blocks getting color controls: PR:21387

My PR to lighten the editor DOM of the Buttons block is still stuck. I need technical help to resolve it. I consider this PR vital to fixing the current confusing/broken state of the Buttons block’s alignment controls. My plans to fix the block rely on this initial task being completed first. I would really like to get this done before WP 5.5: PR:23222

I have a PR to polish the Custom HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. block which needs design feedback and a code review: PR: 21711

I have a PR to update several usages of Lodash.includes to the vanilla Array.prototype.includes. I’ve double and triple checked this PR to avoid errors. All I need is a review before I can merge: PR: 21063

While rebasing that PR, I discovered a bug in a unit testunit test Code written to test a small piece of code or functionality within a larger application. Everything from themes to WordPress core have a series of unit tests. Also see regression. which I have fixed in a separate PR that needs a review: PR: 23599

My PR to convert ReusableBlockEditPanel to a function component and add type info is still waiting for reviews: PR: 21181

I have a PR to convert PostSavedState to a functional component. It also awaits reviews: PR: 23038

@gziolo

I’m backporting changes to WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. from Gutenberg and helping in general to have everything sorted out for 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

@annezazu

@joen

I’d love eyes on this one, which tightens up the 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. controls: PR: 23578

@ajlende

I’ve been continuing work with the image editor. I have two open bug fix PRs: WordPress/gutenberg#23432 and WordPress/gutenberg#23569 (which also paves the way for re-adding flip controls) which could use review. And I simplified the scope of my batch 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. PR mentioned last week WordPress/gutenberg#23369. If we intend to release the API not under an experimental flag, I’d like to get this change into 5.5 since I think it’s a much nicer API to use.

@itsjusteileen

I’ve been testing in Full Site Editing and reviewing docs for the Block Directory

@nrqsnchz

 I’ve been helping with designing flows for template creation in FSE, and reviewing/testing PRs for a11yAccessibility 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) and design. Also started looking into updating .org Gutenberg preview

Nik Tsekouras

I’ve worked on merged PR that adds unlink support in Buttons Block PR: 23445

PR for enabling add row/column in Table block, after having added one — needs review PR: 23508

I have a PR for allowing the Pullquote to have the same transforms with Quote block — needs review PR: 23562

@mapk

I’m focusing on 5.5 to help review and test where needed.

@youknowriad

  • I’ve worked on our CI setup and used 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/ Actions instead of Travis.
  • I’ve been working on the iterations to the inserter
  • Trying to help cleaning the patterns to include to Core
  • I’m also working on a job to run Gutenberg e2e tests on Core to ensure the editor is stable on Core too: PR: 356
  • Reviewing different PRs here and there

@paaljoachim

 I am helping to get the dev environment tips and tricks in place to help any user for migrationMigration Moving the code, database and media files for a website site from one server to another. Most typically done when changing hosting companies. to various node and npm versions.

@michaelarestad

We’re working on flows to create new templates and would love your feedback on initial needs/ideas here.

Open Floor

@noah

For those that use the WordPress Figma libraries, updates are on the way to incorporate the new block editor patterns, as well as some general cleaning to make these more relevant. In the Components and Patterns files, there’s a page called “In Progress” where I’m building out the new elements. Once those are approved, we’ll migrate them to the main pages.


Arpit G Shah

How can we manage to work with the new contributors?

@andraganescu

Myself and a bunch of other folks who have been working on a new, block-based, menus page (nav-menus.php) in wp-adminadmin (and super admin) will host a weekly chat in #core every Wednesday, 2020, 07:00 AM UTC, starting next week, on Jul 8th.

In general it will be a triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. around issues in GitHub labeled with either `[Feature] Navigation screen` or `[Block] Navigation` but also completely open to exploring any subject around improving the navigation creation process in WordPress, increasing compatibility with the incoming FSE and also maintaining backwards compatibility.

#core-editor, #core-editor-summary, #core-restapi, #gutenberg

Editor chat Summary: 24th June, 2020

This post summarizes the weekly editor chat meeting agenda here. Held on Wednesday, 24th June 2020 held in Slack. Moderated by @paaljoachim.

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 8.4.0 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). 2

Gutenberg version 8.4 RC 2 was released today.
A huge thank you to @noisysocks for helping for tackling the huge release.

The next Gutenberg release 8.5 to be released on the 6th of July and will be included in 5.5. 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. will be on the 7th of July.

Project board for WordPress 5.5.

@ellatrix is maintaining a project board for 5.5 of issues/PRs that need to go into the next release.
@youknowriad is already satisfied with what has already been added to 5.5.
@michael-arestad there are a few issues he would like to see added. Such as PR: Try: Don’t show a clone when dragging.
@ellatrix We should begin polishing what we have now for the next release.
@mcsf we need to backport a lot of PHP changes to core and begin thinking about compiling dev notesdev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase..

Monthly Plan

The monthly plan for June.

Task Coordination

@zebulan
I’ve been working on moving reusable blocks to their own tab in the inserter.
I’ve also been working on various PRs to fix cases where useSelect calls were missing dependency arrays or had incorrect dependency arrays.
BlockSettingsMenuControlsSlot: add missing useSelect dependency
useDisplayBlockControls: add missing useSelect dependency
Optimize useSelect calls (batch 1)
Technical issues in this PR blocking future improvements: Buttons block: lighten editor DOM even more. Once that PR is unblocked, I can resume work on this one: Buttons block: overhaul alignment/justification controls If anyone could help figure this out so we could try and get this done before WP 5.5, that would be much appreciated. Right now the Buttons 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. alignment controls are confusing and broken.

@ntsekouras
I’m working on adding keyboard support for moving blocks.
Associated. Prototype: move blocks between levels with keyboard

@poena
Because this feature that introduces descriptions to block patterns would require changes to existing block patterns, a decision is needed so that it may be included in 5.5. We probably don’t want to make breaking changes after patterns are available in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..

@michael-arestad
We’re starting in on the “Create a new template” flow
If you have any thoughts or ideas, let me know.

@youknowriad
I worked a lot on end 2 end tests lately, hopefully they are more stable now
Finally landed the quick inserter PR.
I’ll focus in on 5.5 related tasks (backports, tests on Core…)
Polish and 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 on Gutenberg side.

@annezazu
I’m continuing to do triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. on needs-testing and unlabeled alongside officially placing docs about the FSE Outreach Program here. There are more to come that are being drafted and shared for feedback in #fse-outreach-experiment including a general FAQ.

@joen
I’ve been sheparding this drag and drop improvement along, and it’s looking like it can land, so I would just highlight it for your eyes once again.

@itsjonq
Continue efforts under the “Design Tools” label.
More recently, helping out with the drag/drop experience @joen and @michaelarestad mentioned.

@itsjusteileen
I’ve been testing in Full Site Editing (FSE) and helping @annezazu over in #fse-outreach-experiment. I also helped get Add reusable block tab to inserter moving and on the Project Board for 5.5. I also added Discussion: Should theme.json support conditional logic like theme supports and looking for input.

@ellatrix
I’ve been helping out with 5.5 🙂

@ajlende
Image editing tools.
Working on Image Editor Batch API for updating the 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/..
Discussion about in #core-restapi channel.
Outside of Gutenberg land: Add option for flipping the image to the crop view which can be re-added in a future Gutenberg PR after it was removed in Image editing: batch editing in cropper component.

@noisysocks
Regarding task coordination, this week I’m: Releasing Gutenberg 8.4.
Working on allowing Search to be added to the Navigation screen.

Open Floor

@Kiril Zhelyazkov
I need eyes on Block icons are reordered when adding new blocks. There are different suggestions for how it should be handled and I can’t decide which is the right way to solve it.
–> No replies yet.

@chrisvanpatten
I’m not sure if I’ll be able to attend the meeting this week but I want to call attention to this issue: Patterns should not display if their blocks are not allowed.
@youknowriad
Plans to take a closer look at the issue.

@mrwweb
Use .has-background to indicate any type of background. Introduce second class for type of background.
The Block-based Themes team agreed it makes sense and we’ve since done additional research and gotten feedback that seems to confirm this is a positive change. Because it is an issue that involves changing front-end CSSCSS Cascading Style Sheets. classes, it feels like this needs to get into the soonest release possible to avoid causing disruption. At this time, the general consensus is that the risk of adding it is very low, but that will obviously increase over time.
@zebulan
Comment: A has-background class sounds like a good idea to me.

@itsjusteileen
Eileen is asking for comments to this issue:
Discussion: Should theme.json support conditional logic like theme supports
@youknowriad
Comment: I don’t think we need to add condition logic to 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. aside block vs global specific settings but the editor settings are filterable whether they come from theme.json or not, so conditional logic is possible there.

@MrMark
Before I submit a ticketticket Created for both bug reports and feature development on the bug tracker., wondering if anyone knows the reasoning behind having a bottom margin on wp-block-columns and wp-block-column so that when you have columns within columns, it creates large margins below that grouping, etc.
@michael-arestad
Comment: I think it’s worth a ticket/issue. If anything, we could add some conditional CSS to remove the bottom margin from child column blocks. Or just remove the margin.
@jonoalderson
Comment: https://every-layout.dev/layouts/stack/ is handy for this sort of thing. Much cleaner than conditionals for parent-child structures.

@joyously
We need either more knowledgeable people or a document (user docs for editor) to send users who ask questions in the Gutenberg plugin support forums.

@paaljoachim
Having a buddy buddy system where developers can help and review each others PRs. Reach out to other developers through a polite direct message and ask for advice. We are all here to also help each other along our paths.

#core-editor, #core-editor-summary, #gutenberg, #summary

Shipping Experimental Endpoints in Core: REST API Meeting Summary June 11, 2020

This post summarizes the #core-restapi meeting for Thursday June 11, 2020. The focus of this meeting was discussing the possibility of shipping __experimental 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/. routes in WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Read the Slack archive, account required.

Background

Part of the REST API team’s role is to help ensure that enhancements to the REST API follow Core’s established patterns and that the interface is sufficiently forward compatible.

The Problem

WordPress 5.5 is shaping up to have a number of new and improved REST API endpoints to support the latest 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/ features: #40878 and #50244 for Navigation, #50321 and #48654 for 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. Directory, #47620 for Block Registration, etc…

Another Gutenberg feature currently slated for 5.5 is Image Editing. This feature utilizes the REST API and existing WP_Image_Editor 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 persist the image edits. This feature took the REST API team a bit off guard, and the team is worried about providing an adequate review of the feature in time for WordPress 5.5 given the other tickets in progress.

This feature is currently listed as a Gutenberg Experiment. The hope is to promote it from an experiment by the next Gutenberg release.

Potential Solution

While the current server side code supporting Image Editing requires changes, it is likely that the Editor and/or Media team will be able to resolve these issues in time for 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. The question then becomes if the REST API team will have the bandwidth to do a review. Additionally, will the API have had a long enough soak time to reduce the possibility of a design error necessitating a breaking change.

In the weekly #core-editor meeting, the possibility of including the required REST API endpoints in the __experimental namespace was briefly discussed. This would allow us to ship the Image Editing feature in WordPress 5.5. If breaking API changes were necessitated those could be made when the endpoint is promoted to the wp/v2 endpoint.

Note: This is distinct from the feature being marked as an “experiment” in the Gutenberg settings page. The goal is to ship this as a feature in WordPress 5.5; the 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 would not be required to use the feature.

Experimental APIs

Nearly all APIs in WordPress are “public” and backwards compatibility is maintained. Some APIs are explicitly marked as @access private, most notably the List Table API. Despite being private, when responsive list tables (#32395) were introduced, great lengths were made to ensure that the changes were backwards compatible with custom list tables.

Gutenberg introduced the idea of “experimental” and “unstable” APIs.

There is no support commitment for experimental and unstable APIs. They can and will be removed or changed without advance warning, including as part of a minor or 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. release. As an external consumer, you should avoid these APIs.

An experimental API is one which is planned for eventual public availability, but is subject to further experimentation, testing, and discussion.
An unstable API is one which serves as a means to an end. It is not desired to ever be converted into a public API.

The Gutenberg Coding Guidlines

The version of Gutenberg that ships with WordPress Core utilizes a number of __experimental and __unstable APIs. But so far this has been limited to only 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/. APIs.

REST API endpoints introduced in the Gutenberg plugin are currently introduced in the __experimental namespace, but are transitioned to wp/v2 before being merged to WordPress Core. Because the namespace changes, this process in itself is breaking, even if no other API changes were made.

Discussion

Editorial Note: Part of this discussion focused on the current state of the endpoint which has a number of functional and design issues. These have been flagged in the various issues and tickets and I won’t be summarizing these issues here. We would not ship an endpoint in WordPress Core, even as a proposed __experimental one, if it was broken.

@timothyblynjacobs main concern is that if there are security issues with the endpoint, or any other “fatal flaws” it being __experimental doesn’t protect us in anyway.

@spacedmonkey is concerned that once a feature is in Core, developers will start using it and it can never be removed. WordPress hasn’t shipped features in Core before they are ready and shipping an __experimental endpoint like this would break that pattern. If the feature isn’t ready, we should wait until 5.6.

@earnjam thinks that if it’s something useful, people will use it regardless of any flag/prefix applied. Then it’s a question of if we’re comfortable breaking stuff because we warned them.

To me the insistence on full backward compatibility is one of WP’s biggest assets. We’ve been drifting away from that to an extent in Gutenberg and I think it undermines a core element of what makes WordPress what it is. I think in core we had moved away from shipping private APIs for a while for this very reason, they’re going to get used whether we want them to or not. To me, that’s the whole point of doing feature plugins. It allows you to iterate and break things in the plugin, but not core. IMO the Gutenberg plugin is an experimental flag. Only the stuff that is truly ready should be brought over.

I’m ok with the experimental stuff in the Gutenberg plugin because that is opting in. I don’t know that I’m comfortable with it in core.

From @earnjam.

@jamesburke asked if the __experimental approach been a success with Gutenberg? If so, it’d be a useful pattern to implement (regardless of whether the editing endpoint is ready for this).

IMO, if you mark it as experimental, then break whatever needs to get broken. I’ve worked on production projects that heavily utilize Gutenberg experimental functionality, and it’s always nice to have early access to things. In my experience, the opportunity to use functionality in the wild and apply it to real world problems greatly outweighs the attention/effort needed to upgrade if/when something breaks on the experiment. 

From @jamesburke.

@carike points out that lot of non-technical users won’t even know that the feature exists and are not in the same position to mitigate the associated risks – particularly in use cases that are not traditional publishing, e.g. e-commerce.

@chrisvanpatten thinks that more experimentation is absolutely a good thing, but is not sure Core is the right venue for that. Gutenberg is able to play a bit fast and loose with backwards compatibility, but that has been isolated from Core to a degree. He tends to believe that __experimental APIs landing in Core has been a mistake, even as someone who has leveraged experimental JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. APIs before.

@ajlende thinks there have been good arguments for holding off too. When he pushed the initial image editing feature, the intention was for people to start trying it out to let people use it and adjust. If Core is looking for more stable things, then he’d agree it isn’t ready.

@joemcgill mentioned that if the API is shipping in Core, even as __experimental, it absolutely will get used, so backwards compatibility must be a consideration.

@sageshilling suggested offering a quick way to turn it off the feature for sites that don’t want the image editing options. @ajlende indicated that the current code is behind a feature flag. Supporting an opt-out if the feature was included in Core would therefore likely be possible.

Next Steps

@joemcgill is fully +1 on the existence of a REST API replacement to the AJAX callbacks currently in core which is used by the image editor in the media modal and is happy to help this if it’s a priority.

@mikeschroder is completely agreed that a REST API endpoint to replace the existing AJAX is awesome.

Tickets/Issues

#49096, #44405. GB-22959, GB-21024, GB-22579.

Questions

This post is a solicitation for feedback as much as a meeting summary. Some potential questions to ponder.

  1. Have experimental APIs been a success in Gutenberg? How often are __experimental APIs transitioned to stable APIs? Is this a fast process, or do the APIs stay as __experimental for a long time? What sort of changes are discovered that necessitate breaking changes?
  2. Should we be comfortable breaking backwards compatibility because developers were explicitly warned that the feature was an experiment?

The next REST API meeting is this Thursday June 18th at 18:00 UTC.

#5-5, #gutenberg, #rest-api

Editor chat summary: 8 April 2020

This post summarizes the latest weekly Editor meeting, held in the #core-editor Slack channel, on Wednesday, April 8, 2020, 14:00 UTC. These meetings coordinate collaboration in the development evolution of 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/ project. You can find today’s agenda here.

First an update on Gutenberg 7.9 which was pushed one week. Progress has been good so far and release is on track for next week

WordPress 5.4 was released last week. Issue/PR’s are being kept track of using “Backportbackport A port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. to WP CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.” label. A 5.4.1 release is not scheduled yet.

Monthly Plan 

It’s early in the month, but the plan looks to be on a good track. The priorities are still the same though and available here 

Task Coordination

@isabel_brison

  • working on Navigation 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.-related tasks, I realized that currently submenus in that block are almost unusable on mobile devices. 
  • I have created PR  21471 to fix them.

@nosolosw

  • I’ve been mostly helping Riad with the refactor of some block properties related to styles, including font-size for paragraph and heading.
  • Pushed a bit to the target block selectors for Global Styles proposal (still work to do).

@youknowriad

  • I have been mostly focused on the Color and gradient support for different blocks and consolidating the way we support these in different blocks. (Also thinking in relation to Global styles)
  • I’m planning to do more work on the inserter and patterns UIUI User interface on the next days

@nfmohit

  • I’m working on adding a vertical style to the Buttons block.
  • PR 20160

@brentswisher

  • I’ve been looking into ways to make Storybook easier to work with, comments/opinions appreciated here
  • Continuing to add stories for missing components
  • Follow up on some old issues/PR’s that have resurfaced

@andraganescu

  • still working on the experimental navigation screen

@pbrocks

  • Reviewed some PRs this past week

@gziolo

  • I’m working on Jest, JSDom, Babel and ESLint upgrades for Gutenberg contributors and wordpress/scripts users 

@itsjonq

  • I’m continuing work on Design Tools
  • Focused specifically on improving the Cover block.
  • I have a PR for inner content alignment
  • Currently focusing on adding padding support!

@michaelarestad 

  • prototype to connect the various designs/functions around Full Site Editing and an iteration of multi-entity saving

@kirilzh

PRs and Issues for Review and Comments

  • PR 20954 Scheduled post does not show correct url on preview
  • PR 21440 Copy/cut input values copying entire block/removing block
    PR 21359 Latest Posts: Fix selected categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. on existing blocks
  • Issue 21391 Comments and review for the Drag & Drop feature
  • Issue 11681 Looking for input into possible changes for block templates 

Open Floor

Global Styles and Theme/Block Color Palettes

There seems to be a lot of (potential) crossover between Global Styles and Theme/Block Color Palettes. Is this something there’s been discussion about?

The focus currently has been on the foundational pieces for Global Styles, but that’s definitely something that we should look at shortly. There may be the possibility to use 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. to define the palettes and the Global styles UI to potentially allow editing them/choosing colors based on them.

Possible Additions for 5.4.1

  • PR 17413 Add Block Transform to transform Embed blocks into Paragraph blocks.
  • PR 21410 Scheduled posts display the correct url

Today embeds do not function really well. There are cumbersome work arounds if a link wants to embed and one does not want to embed it, as in add a dot then the text link. Or add some text and then a link. Then remove the text again etc. The issue could use additional feedback.

Dynamic content in HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. files from Block-Based Themes Issue 20966 

One potentially native solution would be to allow some php in these templates but more thought is needed.

Adding skip to content link and aria labels for FSE
An issue needs to be added to 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/ to add skip link support for theme authors in FSE. Skip links are one of the most fundamental things for a11yAccessibility 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) on a site which needs to be hidden to normal users and only visible on keyboard-navigation (tabbing) and screen-readers. The link needs to be the 1st thing on a page, and it needs to link to the main content of the site.

All theme developers add a skip link. It usually points to the <main> element of the page (which 99% of the time has id=”main”). If the template in FSE contains a “content” block, then we could add an ID to it and automatically add the skip-link. If there is no content block, then the skip-link would point to the loopLoop The Loop is PHP code used by WordPress to display posts. Using The Loop, WordPress processes each post to be displayed on the current page, and formats it according to how it matches specified criteria within The Loop tags. Any HTML or PHP code in the Loop will be processed on each post. https://codex.wordpress.org/The_Loop. block. If there is no loop-block either, then make an educated guess and point to the 1st title or p block. This is a possible solution but more discussion should be directed to a GitHub issue.

PR 21410
Is it possible to generate the permalink as the link property of a scheduled post in the 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/., as is the case for published posts now? The answer might be related to the fact that the slug might be already used by the time the post gets published but this is best asked in the #core-restapi channel.

PR 19436 Selection Behaviors with Reusable Blocks

This relates to some funky selection behaviors with reusable blocks, or really any instance of nested Block Editors, where you can have blocks selected in the upper and lower editors at once. RichText buttons are absorbed into the parent, etc,  When experimenting with nested block editors to persist block data to unconventional data stores this problem arises quite a bit. 

Nested block editors may not be a great idea, but potential options could be:

  • The nested block editor should live in a modal or a separate page (link)
  • Use the controlled “InnerBlocks” approach we’re experimenting for template parts (and multi-entity save flow). This approach is not stable 100% yet but seems promising.

#core-editor-summary

REST API Chat Summary: November 14

This post summarizes the weekly 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/. chat meeting for November 7, 2019. (Slack transcriptAgenda). Weekly REST API component office hours are held every Thursday at 18:00 UTC in the #core-restapi room in the Make 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/..

Authentication

A new wp-api/authentication GitHub repository was created last week to facilitate the design & development of a REST API authentication solution for WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress..

We continue to be in the information gathering stage. For all interested in contributing to this effort, we will be using part of our weekly REST API office hours each Thursday at 18:00 UTC (Thursday, November 14, 2019, 01:00 PM EST) as a weekly standup to coordinate work.

We also invite you to log issues describing use cases the authentication solution should support.

Registered 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. Types REST API

#47620 aims to create REST API routes to discover the list of registered block types. It is based off the Gutenberg Block Type Registration RFC. @spacedmonkey worked on a 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. and is in the process of soliciting feedback 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/ team, Mobile team, and other members of the REST API team.

A particular point of concern @spacedmonkey brought up was the difficulties about handling the asset fields ( editorScript, script, editorStyle and style ). The RFC defines the fields as either absolute URLs or relative paths to the source files. However the WP_Block_Type class defines those fields as asset handles.

Further the asset URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org or handle is not sufficient to make the asset functional. The list of dependencies, inline scripts, translations, and localized data are all necessary for the script to work.

@timothyblynjacobs mentioned that the RFC discusses statically discovering that information from an associated .asset.json file located “next” to the script file. @aduth mentioned that section is slightly out of date since @wordpress/scripts now outputs a .php file instead of a 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. file.

The participants discussed whether it would be better to include this additional information inline in the Block Type response, or to develop a separate wp/v2/dependencies 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..

@timothyblynjacobs suggested that including this information inline would be simpler. @spacedmonkey pointed out that then we’d be including full data from a separate resource within the block type response. Elsewhere in the REST API that would be handled by creating a separate API and linking to it.

Additionally, @timothyblynjacobs pointed out that just exposing the list of dependencies isn’t sufficient. The client needs access to the entire dependency graph to ensure each dependency’s dependencies are loaded, and that all scripts are loaded in the correct order.

This all points to a dedicated REST API endpoint being a better solution. The team then discussed the potential privacy and security ramifications about retrieving this information about any registered asset.

A developer may include sensitive data in a wp_localize_script or wp_add_inline_script after registering the script with wp_register_script. Currently, this data would only be exposed when the script is enqueued, which may be protected by a current_user_can or $hook-suffix check. If the REST API allowed returning information about an arbitrary asset handle, this data may be exposed.

Additionally, a developer may conditionally registers asset based on a 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’s settings. By allowing a user to check if a handle is registered via the REST API, it may be possible to determine the setting configuration of a plugin. This may not be desirable for security or privacy related plugins.

@kadamwhite mentioned that historically the REST API has been pretty conservative about what data is exposed. If possible, he’d like to continue along that path. Or theoretically authentication could be required for some pieces of the API since the use case seems to mostly be for editorial interfaces which would require auth anyway. @spacedmonkey also suggested a capability check.

@spacedmonkey and @timothyblynjacobs proposed limiting the assets exposed to ones registered via WP_Block_Type and all WordPress Core assets. Additional assets could be exposed via a registration flag of some kind, like show_in_rest.

Both @aduth and @youknowriad mentioned that this functionality would not just be useful for blocks. As WordPress moves more and more to JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. powered interfaces, the ability to lazy load assets will become increasingly important. The problem here could be generalized to “retrieve all the information necessary to properly load a handle”.

@youknowriad opened a ticketticket Created for both bug reports and feature development on the bug tracker., #48654, to continue the discussion on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress..

Agenda for November 21

The next REST API meeting is happening in #core-restapi at Thursday, November 21 at 18:00 UTC. Agenda:

  • REST API Authentication project weekly meeting
  • Menus API discussion
  • WP Dependencies API
  • Review open tickets which should be provisionally milestoned for 5.4
  • Open floor

#meeting-notes, #rest-api

Editor chat summary: 18 September 2019

This post summarizes the weekly editor chat meeting on Wednesday, 18 September 2019 at 1300 UTC held in Slack.

The agenda can be found here.

Many folks were in transit, which made this a less busy meeting than usual.

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/ 6.5 Release

Releasing shortly. You can see the RC here.

This will be the last release that goes completely into WordPress 5.3.

This is released now!

Weekly Priorities

Help test the 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).!

Now released and in trunk — Please help test!

Task Coordination

  • @nadir is working with @joen on improvements to the Separator 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. (may end up as new Divider block), and looking into making the Stylelint config more strict.

Open Floor

@paaljoachim wanted to bring attention to a couple tickets:

@mikeschroder brought up https://github.com/WordPress/gutenberg/issues/6652, which is in regards to adding height and width attributes back to images in Gutenberg.

This ticketticket Created for both bug reports and feature development on the bug tracker. had conversation that started on Twitter with a tweet from Jen Simmons. There is a WICG recommendation that Mozilla is testing (and sounds like Chrome is planning as well) that makes rendering faster if height and width attributes are provided for images.

@desaiuditd is looking for feedback on https://github.com/WordPress/gutenberg/pull/17311, specifically regarding details on how the proposed useFilter would work.


Note: If you’re reading this summary outside of the meeting, please leave a comment if you can/want to help with something.

The next meeting is on 25 August 2019 at 13:00 UTC.

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

Editor chat summary: 14 August 2019

This post summarizes for the weekly editor chat meeting on Wednesday, August 14, 2019 at 1300 UTC held in Slack.

The agenda can be found here.

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/ 6.3 

  • @riad noted that this release is a very important release in terms of 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) because it introduces the Navigation Mode

Priorities for next week

Please don’t hesitate to help there. Provide a11yAccessibility 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) and design feedback. Help with tests… Let’s move these forward.

Task Coordination

  • @swissspidy is on non-consecutive block selection and improving the eslint-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 (16789)
  • @mapk helps testing the 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. screens, is working on the grid system, replace image interaction and helps issues with Tips
  • @youknowriad is  fixing experiments settings 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. 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. adding a caption to the gallery block.
  • @karmatosed is keeping the triagetriage The act of evaluating and sorting bug reports, in order to decide priority, severity, and other factors. fires burning
  • @brentswisher needs some eyes on https://github.com/WordPress/gutenberg/pull/15757
  • @danr is working on table block’s keyboard navigation, now ready for review (https://github.com/WordPress/gutenberg/pull/16957) and also looked a bit into issues with 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/ actions, have made some quick fixes (https://github.com/WordPress/gutenberg/pull/17002).
  • @getdave has been working on implementing standardised UIs for I’ve been working on implementing standardised UIs for responsive controls https://github.com/WordPress/gutenberg/pull/16790 and dimension (aka “spacing”) controls https://github.com/WordPress/gutenberg/pull/16791
  • @andraganescu works on the media flow component, improving the inserter for inner blocks, unifying the heading toolbar controls
  • @gziolo spent a big chunk of time working on improvements around packages  

Based on the links in Task Coordination, Riad extracted a list of PRs where feedback is needed:

Open Floor

There was a discussion about new coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. blocks being developed. The central idea is that some ideas, while good, are low priority, for example the gists block or the multi select dropdown.

Riad explained that the ideas for the blocks themselves are good but “we added components as we needed them in Core and Core blocks. Doesn’t mean we can’t add components for third-party authors if they prove to be useful for a lot of persons but we’d need contributors to champion these”

There is also a list of new blocks that are high priority and considered “blessed tasks” and the list includes: icons, menu, social icons, divider and other Full site editing related blocks (site title, post title, post categories).


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

The agenda for the next meeting, 21 August 2019 13:00 UTC is here, please add anything you want to discuss.

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