Devchat agenda, July 6, 2022

1. Welcome

Last week’s summary.

2. Announcements

WordPress 6.0.1 RC 1 has landed!

Got some announcements of your own? Please add them in the comments, or let @marybaum or @audrasjb know before the meeting.

3. Blogblog (versus network, site) posts of note

A Week in Core, July 4, 2022, from @audrasjb

Proposal: Better REST API handling in JavaScript, from @zieladam (Needs feedback; would like it by July 18)

Planning for WebP and other image formats, from @adamsilverstein

Exploration: Improving DevHub, from @tellyworth

Performance Chat summary, July 5, 2022, from @shetheliving (Ed. note: There’s so much here! Your friendly team repTeam Rep A Team Rep is a person who represents the Make WordPress team to the rest of the project, make sure issues are raised and addressed as needed, and coordinates cross-team efforts. isn’t going to post the summary every week, but has an idea it might be a good idea for every CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. contributor to keep up with what’s happening over on the performance playing field.)

4. Upcoming releases

The next major is WordPress 6.1.

Need help with something? Got something to report in on? This is your time>

The next minor is WordPress 6.0.1.

WordPress 6.0.1 RC 1 has landed! Look for the final to land July 12, barring all the usual caveats.

5. Open Floor

Tickets and components have priority, then the floor is yours.

Please list your item in the comments, especially if you are not able to join the chat in real time.

See you at devchat!

#agenda, #core, #dev-chat

X-post: Proposal for a WordPress plugin checker

X-comment from +make.wordpress.org/plugins: Comment on Proposal for a WordPress plugin checker

WordPress 6.0.1 RC 1 is now available

WordPress 6.0.1 Release Candidaterelease 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). 1 (RC1) is available for testing! Some ways you can help testing WordPress 6.0.1 RC1:

  • Use the WordPress Beta Tester 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
    • As this is a minor 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). release, select the Point ReleaseMinor Release A set of releases or versions having the same minor version number may be collectively referred to as .x , for example version 5.2.x to refer to versions 5.2, 5.2.1, 5.2.3, and all other versions in the 5.2 (five dot two) branch of that software. Minor Releases often make improvements to existing features and functionality. channel and the Nightlies stream. This is the latest build including the RC and potentially any subsequent commits in trunk.
  • Use WP-CLI to test: wp core update https://wordpress.org/wordpress-6.0.1-RC1.zip
  • Directly download the Beta/RC version.

What’s in this release candidate?

6.0.1 Release Candidate 1 features 11 bug fixes on Core, as well as 18 bug fixes (view PRs merged in June & July) 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. Editor.

The following coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. tickets from TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. are fixed:

  • #55668 – Build/Test Tools: Pass GitHubGitHub GitHub is a website that offers online implementation of git repositories that can 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 environment variables to the Docker container.
  • #55681 – Fix block-templates theme support not present in /themes 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/. endpoint
  • #55808 – About page: Replace video thumbnail image
  • #55837 – Resolve WP_Term_Query cache problem
  • #55890 – Fix caching issues in WP_Term_Query class.
  • #55997 – Remove meetupMeetup All local/regional gatherings that are officially a part of the WordPress world but are not WordCamps are organized through https://www.meetup.com/. A meetup is typically a chance for local WordPress users to get together and share new ideas and seek help from one another. Searching for ‘WordPress’ on meetup.com will help you find options in your area. from oembed allow list
  • #56093 – Register Comments Query 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. from metadata to enable title and description translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization..
  • #56097 – Themes: Revert the change of theme preview width on Add Themes screen.
  • #56126 – Block Patterns: Update the value used for keywords.
  • #55810 – Bundled Themes: Revert the Twenty Ten theme version to 3.6.

The following block editor issues from GitHub are fixed:

  • #41423 – Lower the priority of the gallery gap css so it loads after the block layout css
  • #41487 – Add utility classnames back to blocks that have layout attributes specified
  • #41354 – Block Library: Fix JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. Error in 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. Block
  • #40329 – Media & Text: Remove font size declaration from template
  • #41631 – Comment Author and Date blocks: aligned editor markup with the frontend
  • #41328 – Handle no variation case in the block transform menu
  • #40710 – Fix/block 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. icon prop errors
  • #40593 – Prevent opening the links in editor for Latest Posts
  • #40671 – Navigation block “Open on click”: Inherit font style and font weight
  • #41627 – Comments Block: fixed issue with custom font sizes and links color
  • #40560 – Reuse code of the editor placeholder across Post Comments and Post Comments Form
  • #40563 – Improve the logic for warnings for Post Comments Form placeholder
  • #41603 – Post Comments Form: Add button that enables commenting to warning
  • #40799 – Ensure only the main query is modified when resolving template for new posts
  • #40859 – Strip whitespaces in render_block_core_cover before injecting the 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..
  • #41827 – Post Template: Ensure layout classnames are not attached to inner li elements
  • #41907 – Pasting: Fix performance 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. due to removeWindowsFragments
  • #42131 – Post Comments Form: Fix warning i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.

What’s next?

The dev-reviewed workflow (double committercommitter A developer with commit access. WordPress has five lead developers and four permanent core developers with commit access. Additionally, the project usually has a few guest or component committers - a developer receiving commit access, generally for a single release cycle (sometimes renewed) and/or for a specific component. sign-off) is now in effect when making changes to the 6.0 branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a "branch", such as "the 4.0 branch"..

As per the proposed WordPress 6.0.1 schedule, the final release is expected on Tuesday, July 12th, 2022. Please note that this date can change depending on possible issues after RC1 is released. Coordination will happen in the WordPress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https://wordpress.org/ 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/. #6-0-release-leads channel.

A special thanks to everyone who helped test, raised issues, and helped to fix tickets. With this release candidate, testing continues, so please help test!

The WordPress 6.0.1 release is led by @sergeybiryukov @zieladam.

#6-0, #6-0-1, #minor-releases, #releases

Editor Chat Agenda: 6th July 2022

Facilitator and notetaker: @ajitbohra.

This is the agenda for the weekly editor chat scheduled for Wednesday, July 6th, 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#core-editor-agenda#meeting

Performance team meeting summary 5 July 2022

Meeting agenda here and the full chat log is available beginning here on Slack.

Focus group updates

Images

@adamsilverstein @mikeschroder

GitHub project

Feedback requested

Object Cache

@tillkruess @spacedmonkey

GitHub project

Feedback requested

Site Health

N/A

GitHub project

Feedback requested

Measurement

N/A

GitHub project

  • We’re seeking 1-2 POCs for this group; if you’re interested, please comment here or ping in Slack
  • @flixos90: Blogblog (versus network, site) post for Make about the plugin checker proposal should go live this week

Feedback requested

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

@aristath @sergiomdgomes

GitHub project

  • No updates

Feedback requested

Infrastructure

@flixos90

GitHub project

Feedback requested

Open floor

Help wanted

#core-js, #core-media, #performance, #performance-chat, #summary

#hosting-community, #tide

A Week in Core – July 4, 2022

Welcome back to a new issue of Week in CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. Let’s take a look at what changed on TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. between June 27 and July 4, 2022.

  • 32 commits
  • 34 contributors
  • 63 tickets created
  • 5 tickets reopened
  • 52 tickets closed

The Core team is currently working on 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., WP 6.1 and on the next minor, WP 6.0.1 🛠

Ticketticket Created for both bug reports and feature development on the bug tracker. numbers are based on the Trac timeline for the period above. The following is a summary of commits, organized by component and/or focus.

Code changes

Build/Test Tools

  • Add support for WP_Error in the test suite’s wp_die() handlers – #55652
  • Correct some GitHubGitHub GitHub is a website that offers online implementation of git repositories that can 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/ Action workflow inline documentation – #55652
  • Enable loopback requests to work on the local development environment – #52708
  • Include the actual _doing_it_wrong() message or deprecation notice in the output – #55652
  • Remove an unused build configuration file – #52604
  • Remove the workflow_run event from the 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/. notification workflow – #56095
  • Run the PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher container with PID > 1 so Ctrl+C works correctly – #55702
  • Update 3rd party GitHub Actions – #55652
  • Update NPM devDependencies to their latest versions – #55652
  • Update the actions/cache action – #55652

Bundled Themes

  • Twenty Eleven: Replace deprecated function calls on theme options page – #54833

Coding Standards

  • Escape the home URLURL A specific web address of a website or web page on the Internet, such as a website’s URL www.wordpress.org in the “Background updated. Visit your site” message – #56133
  • Escape the home URL in the “HeaderHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor’s opinion about your content and you/ your organization’s brand. It may also look different on different screen sizes. updated. Visit your site” message – #56132

Comments

  • Use more appropriate escaping functions in class WP_Comments_List_Table#56101

Docs

  • Add @since tags for _doing_it_wrong() and deprecation notice handlers in the PHPUnit test suite – #55652, #55646
  • Add @since tags for wp_die() handlers in the PHPUnit test suite – #55652, #55646
  • Add missing docblockdocblock (phpdoc, xref, inline docs) description for install_themes_upload()#55646
  • Adjust some DocBlocks in wpdb per the documentation standards – #52506, #55646
  • Misc fixes in ShortcodeShortcode A shortcode is a placeholder used within a WordPress post, page, or widget to insert a form or function generated by a plugin in a specific location on your site. 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. function and hook descriptions, as per documentation standards – #55646
  • Update the version in which Meetup.com was removed as an oEmbed source – #55997
  • Use third-person singular verbs for function descriptions in WP_Comments_List_Table class, as per docblock standards – #55646

Editor

  • Alphabetize 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. lists in various places – #56131
  • Ensure only the main query is modified when resolving template for new posts – #56058
  • Register the Comments Query 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 from metadata – #56093, #55809
  • Update block editor packages for WordPress 6.0.1 – #56058

General

  • Revert an earlier define of the WPINC constant in src/index.php#54233

Help/About

  • Add help tab info for available row actions in the Media Library – #55800
  • Typo correction in the Media Library help tab text – #55800

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

  • Add missing options to the settings endpoint – #56058
  • Use the integer type for page_on_front and page_for_posts options – #56058

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.

  • Pass the $args parameter to all actions and filters in wp_insert_term() and wp_update_term()#55441

Widgets

  • Add a comment in WP_Nav_Menu_Widget::form() to clarify the esc_attr() usage – #56128

Props

Thanks to the 34 people who contributed to WordPress Core on Trac last week: @SergeyBiryukov (5), @costdev (4), @hztyfoon (3), @gziolo (3), @zieladam (2), @Mamaduka (2), @kebbet (2), @mukesh27 (2), @audrasjb (2), @rudlinkon (2), @peterwilsoncc (2), @viralsampat (1), @jameskoster (1), @spacedmonkey (1), @manfcarlo (1), @sajjad67 (1), @ndiego (1), @poena (1), @petitphp (1), @sabernhardt (1), @tomjdv (1), @cu121 (1), @afragen (1), @Presskopp (1), @mboynes (1), @jakariaistauk (1), @robinwpdeveloper (1), @chintan1896 (1), @adamziel (1), @bernhard-reiter (1), @cbravobernal (1), @hasanuzzamanshamim (1), @sandrasanzdev (1), and @aristath (1).

Congrats and welcome to our 7 new contributors of the week: @hztyfoon, @petitphp, @tomjdv, @cu121, @jakariaistauk, @robinwpdeveloper, @sandrasanzdev ♥️

Core committers: @sergeybiryukov (17), @audrasjb (6), @desrosj (5), and @johnbillion (4).

#6-1, #core, #week-in-core

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

Performance Chat Agenda: 5 July 2022

Here is the agenda for next week’s performance team meeting scheduled for July 5, 2022, at 15:00 UTC.


This meeting happens in the #performance channel. To join the meeting, you’ll need an account on the Making WordPress Slack.

#agenda, #meeting, #performance, #performance-chat

X-post: Exploration: improving DevHub

X-post from +make.wordpress.org/meta: Exploration: improving DevHub