Summary of the Developer Blog editorial meeting on 7 November 2024

Summary of the WordPress Developer Blogblog (versus network, site) meeting, which took place in the ย #core-dev-blog channel on 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/. Start of the meeting in Slack.

Attendees: @greenshady @oglekler @milana_cap @ndiego (async) and @bph (facilitator).

Last meeting notes: Last meeting: Dev Blog editorial meeting summary, October 3, 2024 โ€“ Thanks to @webcommsat for putting these notes together.



Updates on the site

We started a new Content post type called Snippet. The first snippet was published and is available here.ย  Snippet: Conditionally unregister patterns it also has two additional taxonomies: 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. and Coding language, here: Patterns and PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher.ย 

Thank you to @welcher who wrote the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https://wordpress.org/plugins/ or can be cost-based plugin from a third-party. to enable the CPTs. It also includes the Video CPT that will be used for original Video content as well as Developer Hours posts, we discussed in earlier meetings.ย 

For the short Snippets, a more streamlined approval process was suggested to test later this month: ย 

  • Thereโ€™ll be a short async meeting every other week with a list of potential snippets.
  • Voting will be open for two days from Wednesday morning UTC and until Thursday late afternoon UTC.
  • Snippets approval meeting is scheduled for November 20, 2024.

Our 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 by the repository owner. https://github.com/ process going from topic discussion to issue is temporarily broken due to GitHub 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. Testing a new Issues module. They are aware of it and estimate that it will be fixed in a few weeks.ย Current work-around: copy/paste from discussion to new issue.

On the blog we also updated the the Educational Resources on the front page to the new Learning Path courses from the training team!

๐Ÿ“ฃ We will move the January meeting to Jan. 9th, 2025 at 13:00 UTC, due to Holiday season.

Newly published posts since last meeting

Since the last meeting, we published the following articles

Huge Thank You to the writer and reviewers!ย 

Project status

The project board for Developer Blog content is on GitHub.

In review

In progress

On the to-do-list, assigned to writers

We have approved topics that still require a writer:

If you know someone who could tackle any of those topics, please comment on the particular issue

New topics approved

@greenshady commented in regard to Extending the Query Loop default fields: โ€œJust an extra discussion point to consider: we already have two posts that dive into this:ย Building a book review grid with a Query Loop block variationย andย Building a book review site with Block Bindings, part 2: Queries, patterns, and templates. The big difference is in the examples themselves. Thereโ€™s nothing wrong with additional examples, though, if someone really wants to write it out. Plus, I know this proposal came as more of a support request fromย #outreach.In general, Iโ€™m good withย ๐ŸŸขย on this but just wanted to mention the above. โ€œ

Next meeting: December 5th, 2024, at 13:00 UTC in the #core-dev-blog channel

Props to @greenshady for the review of the post.

#meeting, #summary

Getting ready for PHP 8.4: some code changes landing in 6.7

Earlier in the 6.7 cycle, @hellofromtonya and @jrf made a number of commits to get the codebase ready for PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 8.4.

Here are a few of the most notable, starting with PR #7376:

Fix trigger_error() with E_USER_ERROR deprecation in wp_trigger_error().

PHP 8.4 deprecates the use ofย trigger_errror()ย withย E_USER_ERRORย as the error level, because this way of creating aย Fatal Error brings its own set of pitfalls (finallyย blocks not executing, destructors not executing). instead, the recommendation is to use an exception or do a hardย exit.

WP has its ownย wp_trigger_error()ย function, which under the hood callsย trigger_error(). If the WP version of the function passesย E_USER_ERRORย as theย $error_level, it too will hit the PHP 8.4 deprecation.

Now, there were basically three options:

  • Silence the deprecation until PHP 9.0 and solve this properly then. But that wouldnโ€™t even really buy time, let alone solve the problem. Thatโ€™s because before PHP 8.0, error silencing goes too far, applying to all errors. And starting with PHP 8.0, silencing doesnโ€™t apply to fatal errors.
  • Useย exit($status)ย whenย wp_trigger_error()ย is called withย E_USER_ERROR. But that would make the code untestable. It would also disable handling of these errors with custom error handlers. Neither of those are acceptable outcomes.
  • Throw an exception whenย wp_trigger_error()ย is called withย E_USER_ERROR. This is a fairly elegant solution, and it carries the least BC-breaking impact. There is some chance the error gets caught in aย try-catch, but thatโ€™s not actually a bad thing. Itโ€™s likely to only happen for errors that can be worked aroundโ€”and thatโ€™s actually an unexpected bonus.

This commit implements the third option, which:

  • Introduces a newย WP_Exceptionย class.
  • Starts usingย WP_Exceptionย in theย wp_trigger_error()ย function when theย $error_levelย is set toย E_USER_ERROR.

This change is covered by pre-existing tests, which have been updated to expect the exception instead of a PHP error.

Why not useย WP_Error?

Well, for one, this would lead to completely different behavior (BC).

WP_Errorย doesnโ€™t extendย Exception. So the program would not stop. Instead, it would keep running, which is a much bigger breaking change and carries security risks.ย WP_Errorย also doesnโ€™t natively trigger displaying/logging of the error message, so it would still need anย exitย with the error message, bringing us back to point 2 above.

Introducingย WP_Exceptionย delivers (essentially) the same behavior. It retains the fatal error and error message displaying/logging behaviors. Plus it introduces a base Exception class, which future exception classes can extend over time.

References:

Follow-up toย [56530].

Several other commits, fromย #62061, also help get the codebase ready for 8.4. You can find them after an exhaustive introduction to the changes coming to the new PHP.

Hereโ€™s the list, by GH pull request:

PR #7369 WP_HTML_Processor: fix implicitly nullable parameterย [1] in theย WP_HTML_Processorย class.

PR #7370ย fixes the deprecation of ย xml_set_object()ย for theย TestXMLParserย helper utility.

PR #7371ย fixes the same deprecation for theย IXR_Message::parse()ย method.

PR #7372ย  fixes the deprecation for theย AtomParser::parse()ย method.

PR #7373 fixes it for the ย MagpieRSS::__construct()ย method.

PR #7374ย replaces the call to the deprecatedย mysqli_ping()ย with theย DO 1ย query.

PR #7375ย adds a simple test for theย Text_Diff::_check()ย methodโ€”and fixes the 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. that test finds!

PR #7377ย adds testing for PR #7376.

PR #7379ย Build/Test Tools: Enable running all the tests on PHP 8.4 once thereโ€™s a stable release of Xdebug 3.4.0.

Propsย @hellofromtonyaย for the commit message that formed the basis of this 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. and to @peterwilsoncc for review and collaboration.

#6-7, #dev-notes, #field-guide

Whatโ€™s new in Gutenberg 19.6? (6 Nov)

โ€œWhatโ€™s new in 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/โ€ฆโ€ posts (labeled with the #gutenberg-new tag) are posted following every Gutenberg release on a biweekly basis, showcasing new features included in each release. As a reminder, hereโ€™s an overview of different ways to keep up with Gutenberg and the Site Editor project (formerly called Full Site Editing).


Gutenberg 19.6 has been released and is available for download!

This release includes 193 PRs from 55 contributors, and includes one really exciting experimental feature, inline comments!

Experimental inline comments

Experimental inline comments are available as an experimental feature inย  Gutenberg. Users will be able to comment on top of blocks, only in non-published posts. In order to activate them, go to Gutenberg > Experiments and enable 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. Comments checkbox.

Example of experimental inline comments feature.

Code quality, 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 and build tooling

The release includes some improvements on the overall site editing experience:ย  a keyboard shortcut for zoom out (66400), a cleaner layout (66255), and a new color tab (65692) for the style book.

The client-side media processing work has started (64845), but keep in mind that this new package is private and experimental.

Also, a few ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org Compiler errors have been fixed and packages now use npm workspaces (65681).

Changelog

Enhancements

Components

  • Add elevation tokens to storybook. (66122)
  • Add foundations:Elevation to storybook. (66124)
  • Add radius foundation and tokens to storybook. (66219)
  • Combobox, FormTokenField: Show message when no matches found. (66142)
  • Storybook: Organizes components under โ€˜Utilitiesโ€™. (66210)
  • Tabs: Expose active tab item props, use ariakit prop types. (66223)
  • Tabs: Remove custom logic. (66097)
  • DropdownMenuV2: Rename to Menu. (66289)

Block Library

  • Add Transformation from Separator to Spacer. (66230)
  • Add lightbox option in gallery block link control. (64014)
  • Archives: Add border block support. (63400)
  • Border support added to comments. (66354)
  • Cover Block: Add Image Resolution options. (62926)
  • HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. Block: Force HTML preview in view mode. (66440)

Zoom Out

  • Add keyboard shortcut in editor. (66400)
  • Iterate zoom out shuffle into a more visual control. (66194)
  • Use the zoom-level value to scale the iframeiframe iFrame is an acronym for an inline frame. An iFrame is used inside a webpage to load another HTML document and render it. This HTML document may also contain JavaScript and/or CSS which is loaded at the time when iframe tag is parsed by the userโ€™s browser.. (66280)

Site Editor

  • Remove synchronization of canvas mode into store. (66213)
  • Style Book: Clean up layout. (66255)
  • Update site icon and title position. (66171)
  • Editor Interface: Remove small 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. from global styles/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. 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.. (64474)
  • Remove purple coloring from DocumentBar and PostCard. (66451)
  • CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. Data: Add the โ€˜getEntitiesConfigโ€™ resolver. (65871)
  • BlockGroupToolbar: Better 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. context for toolbar labels. (66211)
  • Set ResizableEditor height based on border-box. (66342)
  • Add align-item related icons. (66242)
  • Stabilize isPreviewMode flag. (66149)

Data Views

  • Fix alignment of action items in list layout. (66273)
  • Templates: Hide media field in list view. (66573)

Global Styles

  • 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.: Caching of global styles for blocks from core. (66349)
  • Style Book: Add color tab. (65692)

Real-time Collaboration

  • Inline Commenting: Disable comments on published posts for now. (66583)

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/

  • Backport from WordPress core: Improvements for the post format 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 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.. (66037)

Build Tooling

  • Create Block: Adds --target-dir flag to allow the tool to target where to scaffold. (53781)
  • Scripts: Add build-blocks-manifest command. (65866)
  • Scripts: Add BlueOak-1.0.0 license to GPL2 compatible. (66139)
  • WP Scripts: Add a --root-folder argument to the plugin-zip command. (61375)

Bug Fixes

Zoom Out

  • Disable zoom out toggle button when Style Book is open. (66228)
  • Donโ€™t switch editor mode when changing entities. (66452)
  • Fix scaling animation for device previews. (66132)
  • Fix zoom out not persisting while switching between editor and code editor. (65932)
  • Fix zoom out shortcut on Windows. (66506)
  • Fix: Activate zoom out on large viewport. (66308)
  • Hide slots and grouping buttons. (66243)
  • Remove zoom-out toolbar. (66039)
  • Resets the Zoom on viewed/edited entity change. (66232)
  • Revise zoom layout shift fix. (66390)
  • Zoom Out: Rely on zoom-level instead of zoom-out mode. (66141)
  • Zoom Out: Fix bouncy drop zones. (66399)

Block Editor

  • Block inserter: Prevent editor from crashing if blockType.parent is a string. (66234)
  • Block toolbar: Account for scrollable blocks that affect the position of the block toolbar. (66188)
  • Fix extra scrollbar appearing when searching in the inserter. (66229)
  • Fix: Show paragraph block variations in rich text inserter. (66318)
  • Group: Fix padding select. (65857)
  • Link Shortcut: Only trigger the link shortcut if thereโ€™s a text selection. (66056)
  • Remove relative position from sidebar tabpanel. (66267)
  • Rich text: Remove empty file. (66553)
  • Block editor: Self nesting and circular nesting block fix. (66121)
  • Post Editor: Set the default value of the editorTool to edit. (66636)

Components

  • ColorPalette: Prevent overflow of custom color button background. (66152)
  • Fix: Text overflow in Patterns filter. (66504)
  • RadioGroup: Fix arrow key navigation in RTL. (66202)
  • Tabs and TabPanel: Fix arrow key navigation in RTL. (66201)
  • Tabs and ToggleGroupControl: Round indicator size. (66426)
  • Tabs: Fix animation timings. (66198)
  • Tabs: Override tablistโ€™s tabindex only when necessary. (66209)
  • Tabs: Restore vertical alignment for tabs content. (66215)
  • Tabs: Update indicator more reactively. (66207)
  • SpacingSizesControl: Use generic label for linked button. (66304)

i18n

  • Miscellaneous i18n fixes. (66510)
  • Remove most of the occurrences of the verb toggle. (66371)

Post Editor

  • Always force iframe in pattern editor. (65887)
  • Editor: Multi-entity saving: Show correct count of entities to be saved. (66482)
  • Fix : โ€œSet 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.โ€ button border flashes on focus. (66092)
  • Fix Parent Check Condition in buildTermsTree. (66006)
  • Fix: Improve the DocumentBar post type label for the Homepage and Posts Page cases. (66355)
  • PostTaxonomiesFlatTermSelector: Restore space between tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.) list and most used tags. (66566)
  • Typo metaboxMetabox A post metabox is a draggable box shown on the post editing screen. Its purpose is to allow the user to select or enter information in addition to the main post content. This information should be related to the post in some way. pane is a 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. box panel. (66502)

Block Library

  • Block registration: Normalize blockType.parent to array. (66250)
  • Button Block: Apply Stretch Styles Correctly. (64770)
  • Buttons: Fix the initial white space in nofollow rel. (66303)
  • Fix โ€“ Image block: Aspect ratio not responding when dimensions are not set. (66217)
  • Navigation block: Fix block appender size. (66153)
  • Fix the navigation issue inside cover blocks. (66093)

Site Editor

  • Edit Site: Fix canvasMode var. (66316)
  • Fix button hover style in sidebar navigation screen. (66505)
  • Remove toggle verb from post list data views โ€˜Toggle details panelโ€™. (66334)
  • Revert 66431 (Site editor: Remove โ€œdefaultโ€ adminadmin (and super admin) CSSCSS Cascading Style Sheets.). (66540)
  • Restore block-library editor.css outside canvas. (66556)
  • Fix extraneous scrollbar in device previews. (66494)
  • Global styles: Move preload paths filter to 6.7 (previously 6.8). (66543)
  • Fix comment output in styles. (66439)
  • Site editor: Fix save shortcut. (66423)
  • Preload: Fix multiple regressions around global styles. (66468)

Build tooling

  • Create block: Ensure $slug is replaced with passed slug. (66528)

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)

Post Editor

  • Add featured image alt text. (66189)
  • Fix : Badge Color contrast. (66360)

Block Editor

  • ImageSizeControls: Replace ButtonGroup with ToggleGroupControl. (65386)
  • Improve the link preview accessibility and labels. (60908)

Block Library

  • Search: Replace ButtonGroup usage with ToggleGroupControl. (65340)
  • Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. (66147)

Global Styles

  • Global styles menu: Avoid visible labels and accessible names mismatch. (65124)

Site Editor

  • Fix Global styles panel header buttons text overlap for โ€˜Show button text labelsโ€™. (63243)
  • Update the speak messages when switching editor modes. (66278)

Performance

Site Editor

  • Remove โ€œdefaultโ€ admin CSS. (66431)
  • Remove content styles outside canvas. (66432)
  • Block Style Variations: Reuse block metadata in WP_Theme_JSON::Get_valid_block_style_variations() for better performance. (66539)
  • Block Bindings: Use getEntityConfig instead of getPostTypes to get available slugs. (66101)

Build Tooling

  • Fix/compare performance with correct 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".. (66196)

Experiments

  • Add Inline comment experimental flag. (60622)
  • QuickEdit: Add slug field control. (65196)

Data Views

  • Quick Edit: Fix JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. error when bulk editing pages. (66358)
  • QuickEdit: Add Featured Image Control. (64496)
  • QuickEdit: Add Parent field. (66527)

Documentation

  • BaseControl: Auto-generate readme. (66500)
  • Components: Prevent generated readmes duplicating h1 elements when published. (66180)
  • Correct documentation on display type in flow layouts. (66224)
  • Docs: Interactivity 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. โ€“ Add documentation for getServerState() and getServerContext(). (66104)
  • Fix undo/redo Button size in Storybook playground. (66538)
  • Fix: 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 Docgen doesnโ€™t work on Windows OS. (66414)
  • ItemGroup: Improve stories to default to bordered and separated. (66191)
  • README: Add Storybook badge. (66529)
  • Remove meetings that no longer occur from Contributor Guide. (66421)
  • Site editor routes: Add documentation for areas and prevent edit area from rendering when canvas is edit. (66309)
  • Update documentation about build process changes. (66428)
  • Docs: Example for getSelectedBlock. (66108)

Code Quality

Block Editor

  • ESLint: Remove explicit react-hooks/exhaustive-deps disabling. (66461)
  • ESLint: Remove various React Compiler mutation violations. (66327)
  • Fix โ€˜useInstanceIdโ€™ hook reference. (66406)
  • Fix React Compiler error for Duotone. (66492)
  • Fix React Complier error for โ€˜useEventListenersโ€™. (66495)
  • Import only the actually used PostCSS exports. (66379)
  • No need to unlock public actions. (66260)
  • Remove patterns UIUI User interface stylesheet from iframe. (66306)
  • Remove unnecessary Tooltip component from radius control linked button. (66274)
  • Rich Text: Fix React Complier error for โ€˜useEventListenersโ€™. (66460)
  • Storybook: Add BlockPatternsList story. (66227)
  • Block editor: Remove reusable blocks stylesheet from iframe. (66285)

Components

  • BorderBoxControl: Deprecate 36px default size. (65752)
  • BorderControl: Deprecate 36px default size. (65755)
  • DrodownMenuV2: Rename folder to menu. (66473)
  • ESLint: Stop disabling react-hooks/exhaustive-deps rule. (66324)
  • Fix React Compiler error for โ€˜useAutocompleteโ€™. (66496)
  • PaletteEdit: Use ItemGroup and Item, and avoid custom styles. (66164)
  • TabPanel: Add 40px size prop to tab Button. (66557)
  • Tabs: Align to standard compound components structure. (66225)
  • Tabs: Simplify styled components code. (66208)

Compose

  • Compose: Fix React Complier error for โ€˜useCopyToClipboardโ€™. (66444)
  • Composer: Fix React Compiler errors for โ€˜useDropZoneโ€™. (66469)

Dataviews

  • Fields: Fix React Compiler mutation errors. (66464)
  • Fields: Update a few function definitions. (66315)

Interface

  • Interface: Remove duplicate โ€˜withComplementaryAreaContextโ€™ file. (66348)
  • Interface: Remove unused private API support. (66565)
  • Interface: Use plugin context hook instead of HoC. (66362)

Zoom Out

  • Bundle behavior in block-editor and add story. (66240)
  • Editor: Handle zoom out state via the โ€˜switchEditorModeโ€™ action. (66262)
  • Fix/html scale code quality. (66181)
  • Make useZoomOut hook private. (66374)
  • Remove double click to exit hook from the block-editor package. (66335)
  • Remove viewport check from useZoomOut hook. (66341)

Post Editor

  • Editor: No need to reset mode when changing device preview types. (66261)
  • Editor: Use plugin context hook in โ€˜PluginMoreMenuItemโ€™. (66351)
  • Editor: Use plugin context hook in โ€˜PluginPreviewMenuItemโ€™. (66350)
  • Fix typo after #63669. (66396)
  • Remove leftover JS code from 66451. (66472)

Block Library

  • Cleanup unnecessary notice removal. (66409)
  • ESLint: Fix a couple of React Compiler reassignment errors. (66331)
  • Footnotes: Remove extra callback when parsing content. (66370)
  • Gallery: Fix React Compiler reassignment error. (66408)
  • Table Block: Remove hasArrowIndicator prop. (66204)

Style Book

  • Avoid state/effect combo when generating values. (66446)
  • Fix React Compiler error. (66445)

Global Styles

  • Clean up: Adjust reusable-blocks dependencies. (66302)
  • Fix React Compiler variable mutation error. (66410)
  • Theme JSON: Get_block_nodes โ€“ relocate $selectors assignment. (66265)

Interactivity API

  • Interactivity API: Add comments to the deepMerge() function. (66220)
  • Interactivity API: Add tests for handling arrays in deepMerge(). (66218)
  • Interactivity API: Delay block hydration to allow interactive block stores to initialize. ([66772])(https://github.com/WordPress/gutenberg/pull/66772)

Site Editor

  • Prepare route registration by refactoring the site editor router. (66030)
  • Navigation: Improve trigger for fallback navigation. (66478)

Build Tooling

  • Scripts: Refactor to extract license logic. (66179)
  • Plugins: Deprecate โ€˜withPluginContextโ€™ HOC. (66363)

Tools

Testing

  • Fix [Flaky Test] Entering zoomed out mode zooms the canvas. (66212)
  • Fix end-to-end test for padding appender. (66080)
  • Upgrade Playwright to v1.48. (66296)

Build Tooling

  • Add new private vips package. (64845)
  • Revert โ€œUse npm workspaces for packagesโ€. (66270)
  • Add theme type to the bug report issue template. (63851)
  • Pull request automation: Use full npm install. (66314)
  • Use npm workspaces for packages (second attempt). (66272)

First-time contributors

The following PRs were merged by first-time contributors:

  • @AhmarZaidi: Remove toggle verb from post list data views โ€˜Toggle details panelโ€™. (66334)
  • @mediaformat: Remove clip & -webkit-clip-path for downloadable-block-list-item style.scss. (66147)
  • @nicolasgalvez: WP Scripts: Add a --root-folder argument to the plugin-zip command. (61375)
  • @poojabhimani12: Add Inline comment experimental flag. (60622)
  • @rinkalpagdar: Border support added to comments. (66354)
  • @rudrakshi-gupta: Add Transformation from Separator to Spacer. (66230)
  • @SH4LIN: GH-66090: Self nesting and circular nesting block fix. (66121)

Contributors

The following contributors merged PRs in this release:

@aaronrobertshaw @afercia @AhmarZaidi @akasunil @andrewserong @arthur791004 @carolinan @cbravobernal @ciampo @dhruvang21 @ellatrix @getdave @gigitux @hbhalodia @jameskoster @jeryj @jsnajdr @juanfra @madhusudhand @MaggieCabrera @Mamaduka @mattrwalker @mcsf @mediaformat @michalczaplinski @mirka @mreishus @ndiego @nicolasgalvez @ntsekouras @oandregal @PARTHVATALIYA @peterwilsoncc @poojabhimani12 @prajapatisagar @ramonjd @renatho @rinkalpagdar @rudrakshi-gupta @ryanwelcher @SantosGuillamot @SH4LIN @sirreal @stokesman @swissspidy @t-hamano @talldan @tellthemachines @torounit @troychaplin @tyxla @vipul0425 @Vrishabhsk @vykes-mac @westonruter @youknowriad @zaguiini

Props to @auareyou for visuals assets, @artemiosans, @welcher, @annezazu for peer review.

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

Summary, Dev Chat, November 6, 2024

Startย of the meeting inย 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/, facilitated by @joemcgill. ๐Ÿ”— Agenda post.

Announcements

WordPress 6.7 RC 3 has been released. Thanks to everyone who participated in the release party.

Forthcoming releases

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.: 6.7

We are currently in theย WordPress 6.7 release cycle. WordPress 6.7 dry run is scheduled for Monday, November 11, with the full release scheduled for Tuesday, November 12. For specific release times, reviewย the release party schedule post.

There are a couple more items that need to be backported since 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). 3, such as 62305. 62061 also needs 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. which includes a list of changes that were made during this release related to improving PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher 8.4 support, which @desrosj and @marybaum offered to help with.

Next maintenance release

There are no maintenance releases planned at this time.

Nextย 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/ย release: 19.6

The next Gutenberg release will be 19.6, scheduled for November 6.

Discussion

@peterwilsonccย has requestedย that we follow up the the following list of items during Dev Chat, if they have not already been resolved by then:

  • Status of TT5 (ccย @poenaย @juanfra), will need to be async due to timezones
  • Status of GB packages (ccย @get_daveย @kevin940726)
  • Followingย tracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress.ย tickets needย 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 forย 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.

@peterwilsoncc confirmed that most of the backports in that list are complete: #62305 is the only one remaining. @get_dave reported packages were done. @joemcgill noted there are some remaining commits for Twenty Twenty-Five to come in. As there are several commits landing after RC 3, there is a plan to do a silent RC 4 ahead of the dry run next week, likely on November 7.

Open Floor

@justlevine requested some feedback on the following:

Id love to get some eyes/feedback on the PHPStan config over onย https://core.trac.wordpress.org/ticket/61175ย .

The errors detected there have already resulted in a handful of merged PRs (viaย https://core.trac.wordpress.org/ticket/52217ย ) including a bugfix in 6.7, so already showing its worth.

@desrosj offered to help progress these.

Props toย @joemcgill for proofreading.

#6-7, #core, #dev-chat, #summary

Summary, Dev Chat, October 30, 2024

Startย of the meeting inย 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/, facilitated by @joemcgill. ๐Ÿ”— Agenda post.

Announcements

WordPress 6.7 RC 2ย was released on October 29. Thank you to everyone who contributed to this release and attended the release party!

Forthcoming releases

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.: 6.7

We are currently in theย WordPress 6.7 release cycle. WordPress 6.7 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). 3 is scheduled for Tuesday, November 5. For specific release times, reviewย the release party schedule post.

There are a few open issues on theย next major report. @peterwilsoncc mentioned that @adamsilversteinย andย @azaozzย have been working on some fixes for HEIC images that have been committed to trunktrunk A directory in Subversion containing the latest development code in preparation for the next major release cycle. If you are running "trunk", then you are on the latest revision. (#62272ย andย #62305). Most other items are tasks to make sure the old files list is updated, editor commits, etc.

#61094ย was also recently reopened, which should hopefully be quick to review.

Next maintenance release

There are no maintenance releases planned at this time.

Nextย 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/ย release: 19.6

The next Gutenberg release will be 19.6, scheduled for November 6.

Discussion

@poena gave an update on TT5:

There are still text string changes that needs approval from the Polyglots teamPolyglots Team Polyglots Team is a group of multilingual translators who work on translating plugins, themes, documentation, and front-facing marketing copy. https://make.wordpress.org/polyglots/teams/ since we are past the string freeze in 6.7. Because of that, the string changes did not make it into RC2. It seems unclear how to get the approval or who can give it.

There are still changes being made to how some colors are applied, both to improve the user experience and the color contrast ratios.

After Dev Chat, @audrasjb helped to approve and commit the string changesets for TT5.

@joemcgill raised: Seems like last release, there was a lot of last minute coordination around marketing efforts to unify content between the about page and a standalone site for the release. Any idea how those efforts are coming along this release?

@ryelle confirmed that this should be all good; the content for the About page is the same as the release page, and was finalized with RC1. Tracking theย wp.orgย release page is here:ย https://github.com/WordPress/wporg-main-2022/issues/506.

Open Floor

@joemcgill asked: Iโ€™d like to get some input about when we should consider moving these Dev Chat times back to the original time, before we changed it for this release cycle. I still think that this time shift was a good idea to enable more of the release squad to attend. However, the impact has definitely been lower engagement.

It was discussed that the earliest date to move back to the original time of 20:00 UTC would be November 20, after the 6.7 release, just in case there is some early follow-up that needs input from release squad Tech Leads that would otherwise not be able to attend.

Props toย @joemcgill for proofreading.

#6-7, #core, #dev-chat, #summary

Recap: Hallway Hangout DataViews and DataForm Components

Last week, contributors spend an hour inย theย Hallway Hangout: Whatโ€™s next for DataViews and DataForm components (Oct 23, 2024). In this post, youโ€™ll find the recording, a summary, details, shared resources and a transcript.

Participants: @youknowriad, @oandregal, @ndiego, @doekenorg and @bph (facilitator)

Summary

Riad, Andrรฉ, and Birgit discussed with Nick Diego and the evolution and future of DataViews and DataForms in WordPress. The DataViews project, initiated a year ago, aims to create reusable components for adminadmin (and super admin) screens, enabling flexible rendering of structured data in various layouts like tables and grids. The DataForm component, integrated with DataViews, automates form generation from defined fields, supporting multiple layouts and actions. Custom views and actions are already available, and plans are being made to extend these features. The team emphasized the importance of semantic APIs and extensibility, inviting feedback and experimentation to refine these tools.

The overall focus of the demonstration was to showcase the current capabilitiescapability Aย capabilityย is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on theirย role. For example, users who have the Author role usually have permission to edit their own posts (the โ€œedit_postsโ€ capability), but not permission to edit other usersโ€™ posts (the โ€œedit_others_postsโ€ capability). of DataViews and DataForm, as well as the plans for future extensibility and integration with the broader WordPress admin experience.ย 

The demo in detail

Riad Benguella gave an overview of the DataViews project and the motivation behind it, focusing on creating an abstraction for rendering lists of structured content. He explained the structure of the DataViews component, including the definition of fields (e.g., title, author, status) and the view configuration (e.g., table layout, columns to display). He also showed the ability to customize the DataViews component, such as showing/hiding fields, sorting, and filtering. He used as examples the screens for pages, templates, and patterns in the Site Editor.ย  Showcasing the support for different layout types (e.g., table, grid) and the ability to apply actions (e.g., edit, delete) to individual items or in bulk. Lastly, he demonstrated the experimental stage of how users can create custom DataViews and save them for later use.

Riad Benguella also gave an introduction to the DataForm component and its goal of automatically generating forms and panels from field configurations. He showcased the Quick Edit experiment, which allows developers to create a quick edit panel without a custom UIUI User interface. He explained the plan to recreate the Document Inspector functionality using the generic DataForm component. Via the Storybook site, he demonstrated how it can be used to develop and showcase reusable DataForm components.

Along with the example of defining a set of fields (title, order, date, author) and using the DataForm component to render the corresponding form, he also discussed plans to provide a set of default field types (e.g., integer, text, date) with auto-generated functionality like sorting and validation.

The goal is to provide a robust, extensibleExtensible This is the ability to add additional functionality to the code. Plugins extend the WordPress core software., and consistent data management experience across the WordPress admin, empowering both coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. and 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. developers to build more modern and user-friendly interfaces.

Additional topics

Attendees also discussed additional topics:

  • Extensibility APIs:
    • Registering custom layout components for DataViews
    • Registering custom fieldCustom Field Custom Field, also referred to as post meta, is a feature in WordPress. It allows users to add additional information when writing a post, eg contributorsโ€™ names, auth. WordPress stores this information as metadata. Users can display this meta data by using template tags in their WordPress themes. types and controls for DataForm
    • Allowing developers to override default field rendering and behavior
  • Conditional Logic in DataForm: Implementing a rules engine to support conditional field visibility and behavior based on user input
  • Integrating with Custom Post Types: Allowing seamless integration of DataViews and DataForm with custom post types so they can be used throughout the WordPress admin
  • Expanding DataViews Across the Admin: Replacing existing admin screens, like the Post List, with the new DataViews component
  • Serializable Configuration: Ensuring the configuration objects for DataViews and DataForm can be serialized to PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher, enabling server-side registration and rendering
  • Feedback and Collaboration:ย 
    • Actively seeking feedback from the community to finalize the APIs and make them publicly available
    • Collaborating with plugin developers to address their specific needs and use cases

Takeaways of the event

  • All feedback around DataViews and DataForm components from plugin authors and agency developers will be welcome
  • There is a need for testing the experiments with the custom views and post data views features in 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/ pluginย 
  • An appeal to contribute to the discussion around adding support for conditional logic in the data forms component

Resources shared:ย 

Props to @ndiego and @oandregal for review of the post.

#hallway-hangout


Transcript AI supported

0:00
Put on this computer. So yeah, we are here for the hallway Hangouts. Whatโ€™s next for data views and data form component? My name is Birgit Pauli-Haack, and we have Riad Benguella and Andrรฉ Maneiro to talk to us about the data views and the data forms component. Also wanted to just remark, we are not going to talk about any WP drama here. If you have any questions there, this is not the venue for it or the place for it. And we have also an announcement, if you want to there is the Rome core. Days are coming up in November, 8 and ninth in Rome, where itโ€™s about core contributing and developing. And those who who want to contribute to core doesnโ€™t have to be programming, though, and both, all three of us, Riyad Andrea and I, will be there, so we can kind of meet up there as well, if you want to. Is there anything else you want to announce before we kind of head into things? Anne, so itโ€™s up to you. Riad, yeah, I hand it over to you and take it away.

1:16
Thanks. Birgit, hello. Iโ€™m Riad, developer on the Gutenberg Project. Iโ€™m gonna start talking about data views. Iโ€™m gonna start sharing my screen, and Iโ€™ll walk you through all the stuff that we were working on and some history, some context about the project. So the project started, like, about a year ago, Iโ€™ll say, when we started looking at the admin redesign. And so we looked at the different screens in WP admin, like the Post List, we have like taxonomies, we have forms and we have settings. And what we noticed is that most of these screens have something in common. Basically, they are screen that either render list of data or screens that need some kind of form to add data or to edit data. So to avoid creating all these screens ad hoc as we advance in the admin redesign, we decided to take an approach where we start to thinking about an abstraction around the screen. So like, this is not something new. This is like something that exists and people have thought about for a long time. But basically all these screens can be represented by thinking about them as UI on top of structured content. So for example, a post is a structured content. It has a title, it has a description, a status, etc. And then you have a generic component that says, render a list of posts or render a form for posts or things like that. So usually people call these like features 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. or 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 renders or things like that. So the idea there was, how can we implement these generic components, but without disrupting everything that without solving everything from scratch, is a big ask. So we started by taking a look at the site editor as a way to iterate on these step by step. At that time, when we started, we already had a template list in the site editor. We also had template parts and patterns, and we and we also, we were starting to work on the pages section of the site editor, but it was fairly new. And so for all these three items, we we had the room to iterate and build this reusable component and so and so. The way we started was like, Okay, letโ€™s take a look at the pages list. We want to show a list of pages, so letโ€™s define the structure of a page. And from there, we could say, Okay, I have the structure of page. I have the list of fields of my page. For example, I have the author, the title, the description, the status. And now I want to show these on a table, and which columns should I show on the table? So I have two main structures, the list of fields, and what we call a view is a description of the list itself. Like I want to the view could be something like the type of view is table. I want to render these fields like Title, Author status in this page. And I want to. To 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. this list by the published for example, the published pages, etc. So all these represent an object that is called a view object, and the user can actually tweak that view object here, like if you take a look here, I can this. Can choose which field to show, which fields to hide, the sorting, the order and things like that. And this also adapts to the different layouts of the Data View. So for with the same view, I can switch just the layout type and render something completely different. As I said, we had templates that we wanted to show, the actual templates, and we had pages where we wanted more something more classic, like a table. So with the same component, you can switch the layout, and it just renders the same data, the same structure data with a different layout. But each layout can also have additional configuration that is specific to this layout. Letโ€™s take a look at the grid. For example. You can actually define the Preview Size, which is specific to the grid, and things like that. So this component is built in a very, letโ€™s say, extensible way. Itโ€™s basically composed of two structured objects that anyone can alter, add fields, remove fields, add layout types you can imagine in the future. This is this being used as as a base for the workflow phase of WordPress, for example, a calendar plug in or something like that. Could add a layout that is the show the different posts on a calendar or on a timeline, and actions like to approve or do workflow stuff like that. So, yeah, thatโ€™s about it for the data views, one of the this is already shipped. So whether I just show you these are like the data views for pages, the data views for templates as well. It uses the grid by default, as as you can see, and the data views for patterns as well. All these three pages, they support multiple layouts. For the page, we also support the list. This is a simple list data view, and for each item, for each layout, they also we also support actions. So let me talk a little bit about actions. So as I said, we have a list of items. So each item, you can apply actions to it. And so an action is basically a callback that receives the current item that is selected or applied, and it does something about it. For example, I can remove this. The move to TracTrac An open source project by Edgewall Software that serves as a bug tracker and project management tool for WordPress. here is an action. The edit is an action. The view is an action, and the actions can support bulk editing by default. So if I select multiple items, you can see that I have three items selected, and I have the move to trashTrash Trash in WordPress is like the Recycle Bin on your PC or Trash in your Macintosh computer. Users with the proper permission level (administrators and editors) have the ability to delete a post, page, and/or comments. When you delete the item, it is moved to the trash folder where it will remain for 30 days. action that is here. This is the exact same action that applies to one it applies to multiple elements at the same time. So thatโ€™s what we have. Thatโ€™s what we shipped at the moment, but at the same time. I donโ€™t know if you if thereโ€™s any question, feel free to stop me or anything. Iโ€™m happy to take questions and discuss these things, but if not, I can continue and show you what we have in progress. We have multiple experiments now in projects related to data views, one of them is the ability to create custom views. For example, letโ€™s say I want to create a view page by admin. So I want to show a list of stages. Maybe I want a table instead, and I want to filter this list for with the author is admin. So every time someone comes here, creates a custom view, and I can save my custom view if I refresh the page. Now my custom view is here. So this is basically you can create admin pages as you wish. Later down the road, we want to allow the ability to actually customize also the menu, so you could create custom views and say, This is the most important views for me. I put it in a dashboard or something like that. So, yeah, this is an experiment, not sure exactly when it will land when on WordPress core, but you can try it now by going by installing the Gutenberg plugin and enabling the custom views experiment. So as I said. We have three experiments that arenโ€™t going the second one is more related to admin redesign. So we are planning to advance and implement data views everywhere. As I said in the beginning, the post list here is basically a data view. The Categories list is the same thing. So we are iterating to our seeing whether we can use data views to replace these things. So you can enable an experiment in Gutenberg called the post data views experiments. This is very early, so itโ€™s very buggy and stuff, but just want to show you what we were doing. So if you click on this post page, itโ€™s actually the post list using a data view. So this is my post list. I can open the post editor, make some changes, go back to my list as also support custom views and default views provided by WordPress, just like the pages database.

10:59
This is still very early. Obviously, we cannot just replace this one. We still need categories, tags. We need extensibility to open extensibility. But yeah, thatโ€™s another experiment that is ongoing. And the last one, which I think is very interesting, actually a big project, is about the data forms. So data forms is, letโ€™s go back to the site editor, to the page, to the table. So here we have a list of pages. As I said in the beginning, we have fields that define what the page is, so we can easily generate, letโ€™s say, forms or panels to be able to edit these things, like to recreate the Quick Edit functionality we have in doubt the admin and so if You see here, I have another experiment that is enabled, which is called Quick Edit experiment. I can open this Quick Edit panel. I can select a page and make modifications here right away. So itโ€™s like a Quick Edit. The interesting thing here is that this panel is actually not a custom UI. The idea is to be able to generate these automatically from the fields. And as you can see here, it showed like the panel, because the goal, like the design goal, is to be able to recreate what we have in the editor here, what we call the Document Inspector. Itโ€™s the exact same thing we want to recreate with this generic data form component, but also the same data form component has what we call layouts, just like the Data View, so you can use it to generate regular form. An example of this, I can show you on the this is the story book. If you donโ€™t know what storybook is, itโ€™s a tool we use to develop reusable components and to show them and to show how we can use them. We have stories for both data views and data form. I can open the data form one itโ€™s here. So as you can see here, I can show you the code maybe first. So this is the code for that data form, story. Iโ€™m defining a list of fields, like a title. This is list of pages. So Iโ€™m defining the title the order a date I can like, this is random fields, basically an author just add a label for a field, a type, and some configuration, like, for example, the available elements or things like that. And then the next thing is to define what we call a form object. Itโ€™s just a simple JSON object where you can say, I want to render these fields in my form. I use the component here, data form. I pass my form object. I pass my data and the field so the structure configuration and it generates this form automatically, like I donโ€™t have to recreate this UI manually, and if I want to, as I told you, we support multiple layouts for forms, so I can switch here for to a panel if I wanted. And this is the exact same form, but rendered as a panel. This is what we use for the quick end experiment. So guess thatโ€™s it for our current work. We are iterating right now. On this. So this is our main focus at the moment, like data form and Quick Edit, but Yeah, happy to take questions address whatever is related. Thank you.

15:20
Yeah, yeah. Well, itโ€™s a, itโ€™s a hangover from the from the pandemic. So I have two questions, and I put them in the chat. So one is, it was, itโ€™s very exciting for me to kind of see that, because all of a sudden all the admin stuff really opens up to new development and to looking so much more modern, and helping a user doing all that what they need to do now, which is a thatโ€™s probably a 10 year old interface, right? Yeah. So one of the first questions that I had when you were looking for the well, going through the different layouts, like a table layout, the grid layout, are there any ideas on how to add additional layouts for that? Like you, you mentioned a calendar. Thatโ€™s not possible right now to add a calendar as a layout function there.

16:20
So, yeah, itโ€™s itโ€™s not open. The API is not open because we are still iterating, and we donโ€™t want to rush into opening an API that is not ready. But it is built in a way that adding layout is definitely something that we want, like itโ€™s a possibility. Basically, you can think about it as a layout is a component, a ReactReact React is a JavaScript library that makes it easy to reason about, construct, and maintain stateless and stateful user interfaces. https://reactjs.org component, your register, and it takes a list of items that your data. And it takes also the configuration, like the available fields, what I donโ€™t know, what the description of each field, the label of the different field, lecture, and you can actually render the list the way you want, exactly. So itโ€™s just a separate, generic component. And yeah, at the moment, itโ€™s not possible to register this, but this is definitely one of the extensibility APIs that we want to offer. As I said, I didnโ€™t mention too much extensibility, like when I was showcasing but there we are. We built this to be able to, like, extend it in all ways possible. So the basic way is adding and removing fields, right? So you want to add a field and you want to remove it. But there are also other things we thought about, like adding actions. You can add an action, you can add a bulk action, you can remove an action. The other extensibility API is at the form level. Like you can say my feed title. I donโ€™t want to use the regular string data type to be able to edit the title. I want to use my separate control that is a select box, or then Iโ€™m going to fetch titles from a lot of places, and like using 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/, or something like that, just coming up with stuff. But this is also an API that we want to offer registering controls. Letโ€™s see like field types, okay, right? And the other one that you mentioned is layouts. Yes, layout is an important one. Like, through, like, you can imagine, like, Canva and layout, or like a calendar or a thing. Like, it shouldnโ€™t be that hard, like it just registration based API. So, yeah, at the moment, itโ€™s more like about the timing. I weโ€™re not sure yet when we will think like a data views API is stable enough. You can already use it in your plugins, because itโ€™s an NPM package. So you can install the NPM package in your plugin and bundle like in your own pages and things like that. What you can do yet is hook into the existing data views that are in core and, like, add your own fields and things like that. But this will come, like, fairly soon. Yeah.

19:11
So

19:12
about extensibility Ria, if I might just say something. Can you talk a bit about how you think about sensibility in terms of, well, you wrote and published a post recently about some of our practice, and you mentioned semantic sensibility. And I think the actions showcase is a good example of how you know about this, how you raise your own action. And it shows everywhere, if you just condemn that, I think that might help people understand how you think about sensibility.

19:47
Yeah, yeah, thatโ€™s a good point. So yeah, in Gutenberg, basically, we have this principle that we donโ€™t want to when we build extensive. APIs, we have to be as semantic as we can. What that what does that mean? Exactly? It means that we donโ€™t like API that says, add the button to this area of the page. Thatโ€™s not a semantic API. Thatโ€™s an API that is very specific to the current design of this page, like if I move this side bar, for example, to a 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. later, or something like that. The the plugin is going to break because the API was specifically meant to render on this part of the UI, and this part of the UI doesnโ€™t mean doesnโ€™t exist anymore. Or what can this create? Is also it can create a frustration, because for core we wonโ€™t be able to actually make changes anymore to that UI, so weโ€™re kind of stuck in the UI. That might be not ideal because of some new use cases. So what we prefer is more like semantic APIs. Is like registering stuff. So when you register an action, you register something, then itโ€™s meaningful or an action. What is an action? An action is like something that can happen on an Item. An Item can be a post or a site, or like a template. So an action, whether you render it in a menu, as I showed, like in the drop down for each item of the table is gonna work the same way, whether I render it there, whether I render it into both editing tool bar in the button, or whether the grid view decide to render it on top of the of the preview, or things like that. Itโ€™s itโ€™s just gonna work regardless of how the page is being built. So, yeah, thatโ€™s the point about semantic APIs.

21:46
Thatโ€™s very interesting. Yeah. Thank you so much. So I had another question, and it might not fit right in there, but I have seen quite some feedback from people that want to create also meaningful categoryCategory The 'category' taxonomy lets you group posts / content together that share a common bond. Categories are pre-defined and broad ranging. pages and what they would need So, and you were thinking that, okay, so we are going through the post datas, which is also categories and tags and all that. Are you planning to also add 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 to the description fields? When you do that to allow blocks in on those pages or content, or are you kind of more strictly? Okay, we want the text information there, rather than also block markup.

22:37
So Iโ€™m not sure, like if I understand the question probably like, people want to be able to design their categories pages as like using the block editor. So Iโ€™m not sure if that means adding block editor to the description of the categories, because a lot of people think about that. I think for me, itโ€™s more like about allowing the site editor to create templates for these categories and, like, render them properly there, which I think is kind of already possible, but maybe we like the UI is not as optimized for that, and maybe Itโ€™s just some small tweaks to allow that, yeah,

23:22
okay, yeah, no, I can see that, yeah, yeah. So any other questions that are telling me you have any questions can be, yeah,

23:33
Iโ€™ve got a question on the data, views, field types. Currently, thereโ€™s just a single field type, and they used to be an enumeration field type, but I believe thatโ€™s been deprecated in because we already have the options you can apply to the field. But I was just wondering, do you have any plans on providing like a default set of field types instead of having to register your own React component and use that instead. I

24:06
want to take this Andrea, maybe this

24:10
area Sure, I just was trying to find a link to share. So yeah, we had enumeration enum type at the beginning, but it was fairly limited. It was only for you to create a filter, so we deprecated that, and now use elements so you provide a list of values for the filter to be created for you. But we are working now on defining field types, and we have, Iโ€™m going to find the link here. We have, we have three, I believe, integer, text and date, yeah, finding the link and and the idea is this field types is that if you create a field and say, Hey, this is your type, text. It creates for you a set of functions, like the sorting is auto generated. Validation for the Quick Edit Form is auto generated, and other things, right? As a fill, also author, you will still be able to override, overwrite those definitions, right? So this is a long way to say, yes, we are working on field types. They are not yet mandatory, but we are trying to make them so, and Iโ€™m gonna find the link and share in the chat for you,

25:37
just to add something there. I think whatโ€™s important, like, and that was not mentioned before, is that we are working with the assumption and with the constraints, basically, that all these configuration objects, we want them to be serializable, like for 80% of the use cases. What does that mean? That means that, basically, ultimately, we want PHP APIs to be able to create these things like register fields and like register actions. You obviously have to register a callback, but really not actions, but most of the rendering, you should be able to do it in PHP, but for special cases where you want some special interactivity and things like that. You have to go into an override the default field types and the default renderings and provide your own components. But for most use cases, you wonโ€™t have to care about that at all. The user could, you could do it with the UI, and you could a developer can do it with PHP.

26:41
Yeah, if and if I can just share my screen just for a bit and show you my editor. This is the story that we had showed before about data form, and you see the type being used here. This auto generates all the things that the field needs for you, right? As I said, is not complete. It doesnโ€™t itโ€™s not mandatory yet, but, yeah, we are working towards having that available,

27:13
right? So, but thatโ€™s more for data forms, or, sorry, data the form of data forms, I donโ€™t know. Yeah,

27:20
itโ€™s for both, because at the end, so the fields are shared between data form and the Data View, okay, are the same so they they have, they share the same API, all

27:34
right, whatโ€™s true is that, at the moment, the field types donโ€™t offer, like, a tail or rendering, default like, for example, when you say, I have a date field type, you should expect to define the format somehow and have it rendered without having to actually write a component for it. I think thatโ€™s use case we want to address. Itโ€™s not itโ€™s not there at the moment, but itโ€™s definitely use case we want to address.

27:58
Yeah, because that was one of the things that we ran into when we want to reuse the same components multiple times or the same layout site of the column, for example, that there was no feedback on which field you were currently in. So we had to do some querying, create an extra function around it that got the field ID injector so we knew what data to get from the data source. So if there are in the Future Ways to register your own field types that can still find their own find their own data in the data source, thatโ€™s, yeah, that would be amazing.

28:37
What I havenโ€™t seen yet is and what forms always brings into my mind is, how about validation? Is that also something that is kind of built in into the API? I havenโ€™t seen it. Thatโ€™s why Iโ€™m asking.

28:54
There is actually a very light validation implementation in the data form component, but obviously, like as with everything else, what our approach there is, letโ€™s implement the use cases we need for core. Letโ€™s get some feedback from the developers and then add the features that we need. We We are certain that we need some kind of validation library built in into the component, or like something that connects with the component easily, but yeah, right, right now weโ€™re just not there. Okay,

29:35
cool. There was one question, and Iโ€™m not quite sure how the context about it that I saw on Twitter multiple times that was, is there a way to use the data views also on the front end? Right now, itโ€™s all in the admin section. But is there something that could be on the front end? Yeah. Or is there thinking about it?

30:02
I actually saw recently, like, maybe, like a week ago, an experiment of a block called connected data use block. So itโ€™s actually a table block, or, like a grid block. You connect it to a custom post typeCustom Post Type WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although post is also a specific post type. Custom Post Types gives your site the ability to have templated posts, to simplify the concept. or to a REST API that serves JSON or something like that, and it just renders in the front end that lists. You know, I think there is obviously a need for that. My small like demo was like, data views is a React component. It might be a bit heavy for some front end. So, like, in terms of vendor size and things like that, I think itโ€™s actually good for, letโ€™s say application type of website, like, you know, like some websites do, a lot of this is a list of events, or, like, people interact with them and things like that. I think it can be good for this kind of use cases, for more regular websites and things like that. I would discourage it personally, but I think itโ€™s very doable to have, like connected data form or connected data views or things like that.

31:19
Yeah, itโ€™s probably easier to just kind of read out the data in JSON and then render it through a table, table block or something like that, yeah, and build a separate component about it. Yeah, I can see that

31:32
quickly flag. I WordCampWordCamp WordCamps are casual, locally-organized conferences covering everything related to WordPress. They're one of the places where the WordPress community comes together to teach one another what theyโ€™ve learned throughout the year and share the joy. Learn more. us. I actually talked to a gentleman about this, and he has a plug in or a site called Data kit here, Iโ€™ll just put the link in the chat. Oh, thatโ€™s you.

31:46
Yeah, you probably know security, yeah, sorry

31:53
about that. Well, there we go. I remember, yeah, exactly.

31:57
I just wanted to say that we are indeed creating a plug in currently called Data kit. You can find it at data kit.org and itโ€™s itโ€™s a PHP software develop kit around data views, and it also has a WordPress plugin. So the idea currently is that you can basically hook up any type of data source. So we have some connectors for CSV files. Since we are a gravity forms based company, we also have a Gravity Forms connector, just a plain old array could be the data source. So weโ€™re currently looking into ways to expand that. We also connected ws form for example, which basically you just create the data source, and you set up the form or the view with some PHP code. So you donโ€™t need to know any react. You donโ€™t need to know any 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. Itโ€™s just your PHP. You register it, and then you can place it somewhere with a short code or a blog. So yeah, thatโ€™s and then you can use it on the front end. It works pretty well.

33:07
Yeah, excellent, excellent. So any other questions, ideas? Yeah, we got them. I will share a few links with the recording that rihan kind of helped me put together about extensibility, about the issues on GitHub, about extensibility, the data use, the data forms, tracking issues and how quick edit works, and Data View supposed, and then the documentation link. And then I really would suggest, recommend for anybody who wants to kind of get the hands dirty with it, two articles on the Developer blog that are written by Juan Juan Margarita, and itโ€™s two parts. One is how to set up the data views on your own plugin or your own page, including how to set up a React app on your for your plugin. And the other one is how to register and execute some actions with the data views that you had. And itโ€™s actually a very nice example on on reading some images from from a third party so source, bring it in, into your admin, and then decide on the pick the pictures that you want to add to the media library. So thatโ€™s kind of a whole itโ€™s thatโ€™s a great use case that gives you a lot of big range of how to act with the data views and and for your plugin, yeah. So

34:43
go ahead, yeah. Just wanted to, like, encourage people to, like, try and give us the feedback, because we actually need the feedback. Like, we cannot release this API publicly on WordPress. We. Without proving it, because itโ€™s a very big API. Itโ€™s a very impactful API. So itโ€™s like, itโ€™s for me, in my mind, itโ€™s very similar to, like, a block API. Itโ€™s kind of same level. So I think we need, like, as much feedback as we can get there. And yeah, please do share.

35:18
Yeah, itโ€™s also a very big component. Yeah, are you having plans to kind of slice it out into smaller components, or is it something thatโ€™s it needs its complexity as a whole?

35:32
Now, thatโ€™s a good question. Like itโ€™s actually two components right now. So data format, data view, but the data view itself can be a composed component. So right now, when you render a database which renders the list, but also renders like the Filters area, it renders the configuration area, and all of these actually can be composed. We we probably will split it into smaller, composable components if you want more advanced use cases?

36:01
Yeah, I think it will be good. Yeah. Nick, did you have another question?

36:08
Yeah, this might be going beyond this conversation, but thereโ€™s just, Iโ€™m very excited about data forms, mainly because thereโ€™s so many, you know, custom plugins authors out there that have, you know, Custom Settings pages and, you know, just things that are all different, right? Theyโ€™ve all rolled their own solution for various things. And I am excited about having kind of, like, a standard solution that people can, like, adopt and use, and then everything feels very uniform. Itโ€™s not like you go to different sections of the admin and itโ€™s just looking, you know, completely different. So long term, maybe you covered this. Sorry, I arrived late. In terms of, like, a rough time frame, at what point do you all think that the admin or the site editor kind of interface will be ready to start allowing for people to add additional content types, you know, custom post types or whatever, into that, we think in like a year, two years, you know, what would be the back of the envelope? Guess?

37:26
Your feet to the fire. Yeah,

37:30
itโ€™s obviously very hard to give an answer there. What I will say that we just landed the new private API, which is gonna probably open on Gutenberg, plug into for experimentation to add new pages to the site editor. Like you can add register pages to the site editor, but like you mentioned, custom post types, I would say custom post type is something that should be baked in. Like you register a custom point type. It just appears like the data used for it disappears and things like that. And about timelines, my hope is a year. Letโ€™s say this is very quiet, but itโ€™s also not, I guess itโ€™s depends on the priorities of, like, the road map and the project. Like, if we want to accelerate there, we will accelerate there. And itโ€™s just yeah, I cannot give you like, yeah,

38:31
no, I understand Yeah. From, from a from, like, a workflow perspective. Letโ€™s say youโ€™re, like a custom developer and or in plugin developer, and you want to start exploring this, but you also donโ€™t want to necessarily kind of waste time. And I mean that in that like you, letโ€™s say that you incorporate data views and data forms into your custom admin whatever. Will that work be relevant once the ad, you know, once core progresses, like, will that be able to you? Will you be able to translate that work that you did in incorporating data views, once the extensibility APIs are ready and you can bring that into, yeah,

39:19
that makes sense. It makes sense. Yeah, I think it will. So basically, just right now, if you want to build Settings pages with data forms and like these APIs, you will probably have to register a new page or new script and render that script on that page or something like that. So the difference will be instead of registering a new page, and like in PHP and like in queue, the script, your own script, you just remove the bootstrapping, but you keep the UI the same, and you just register a page into the whatever pages API we offer. But I will also say that May. It will mean, it will mean also removing code, because some of this might be abstracted even more in PHP. And you could say, okay, these are my settings, and thatโ€™s it. Do what you want with it, you know? So I think, yeah, itโ€™s probably food future proof, if you start doing today, like rendering a data form in a custom page, but it might be easier in the future,

40:28
awesome, and I think that was kind of my expectation, but I think that thereโ€™s some hesitancy among Iโ€™ll speak for myself, I have a plug in with a massive Settings page, and I need to sit down and convert it out to data form. But itโ€™s like, you know, understanding that the work that you do, putting into it, you know, is somewhat future proof, and you can migrate that once the core is ready. And so if anybodyโ€™s listening to this, start experimenting now. So youโ€™re somewhat future proof.

40:56
Yeah, we

40:57
need you to start the experiment now.

41:02
Hmm, alright, yeah. So any other things that you want, apart from get your hands dirty, get in, experiment things and yes, tell us what other field types you would need and all that that would probably help too, because right now you only have three field types here, so there might be a need for others as well. Yeah. Any other thoughts at the well, weโ€™re not at the end, but we could kind of close it here. I think it was a very good demonstration and a good discussion. Any other thoughts from read or for Andrea or so?

41:45
I have a naive question, because I have not looked into this enough, and so forgive me, but with data forms, can you have the like Iโ€™m looking at the story book now, you know, with text fields and radio and so on and so forth, can you add your add other components into that?

42:05
So, yeah. So right now the data form is you choose a layout and you you choose the fields. And we are thinking about changing that a little bit, instead of choosing the layout and choosing fields where weโ€™re thinking about for each field. You choose a layout so you can mix and match, right? So you can say, this is a regular form, this is a regular form field. This is regular form. This is a panel, which means, basically a drop down when you to open the form field. And I guess ultimately, the same way we think about registering layout for data use, I can see as opening an API to register custom layout for forms. And you could say, I want to render this in tabs, or I want to render this in like a field set, or I actually think we will probably absorb a lot of that in the component itself, like tabs and fields that feels like common enough that we should absorb them, but itโ€™s always the same approach, have the default baked in and allow registration like semantic APIs to extend it, so I think itโ€™s going to be possible. Okay, yeah,

43:25
extending, extending a bit of that that was for the layout, for the controls, is the same thing, like disconnect with the conversation we had before about types. If you provide a type for a field, it creates a control for you, but you you have a few ways to override that. You can say, hey, I donโ€™t want this control. I want this other that is also register. But what if it is not register? Well, you can create your own by providing an edit function as well. So itโ€™s the same as we had mentioned. Provide a good default, and then people can override in a variety ways.

43:59
Okay, so just to take that little further, so letโ€™s say that I have, using a real, real world example, I have in my settings page, I have, Iโ€™m using the color picker component that allows someone to, you know, choose a hex code or whatever. So in the context of a data form, is it? Would it be possible to render, for example, a color picker component?

44:32
Yes, I can share my string. So the idea is that these are the fields. And as I mentioned, you know, you provide a type, but you can also provide an a function. And this is a way to say, hey, the component for this type was an input control, I believe, but I want to show a radio here. However, you can just write here your own function component, so if you have color. Pick it wherever that you can reuse from somewhere else. You can just write here your function component and use that color picker that you wrote. We donโ€™t have that like bundle. You can say, hey, this is a color. We donโ€™t have that yet, but we can just, you just can write your own in a function. So, yeah, awesome. Very cool.

45:25
Cool. I guess I should start building something.

45:30
Yeah, the idea, the idea is that, you know, this is providing the basic plugs that we have been using in some pages in the site editor. So it doesnโ€™t aim to be super complete yet, just cover our user cases. But also, you know, letting others implement their own thing.

45:50
Yeah, absolutely. I think that thereโ€™s definitely going to be some edge cases of getting something custom, yeah, but yeah, itโ€™s cool that you can do

45:59
it. So at WordCamp cars were there was a developer from Yoast called Lars gersman, and I think you know him, and he had the idea about a Jason schema, to give an kind of a set of properties, and then automatically, kind of create the form and everything. Is that something that you have been look I know you have been looking at it, but how do you think that that actually could make it into the data user, data forms? Is it something, or is it a completely different direction,

46:43
and itโ€™s actually very related. So we actually discussed with Lars for some time. I think itโ€™s the same idea, basically, for of data form, like the JSON schema, render is the same idea as a data form. You provided a JSON schema, which is the list of fields that we have, and you provided a render configuration, which is the form object for us. So itโ€™s the same idea. There is the reason we didnโ€™t go full on JSON schema approach, because these are existing libraries that to test in schema and they donโ€™t adapt well to the data views. And we wanted to share the exact same structure, the exact same configuration between the data views component and the data form by allowing the extensibility so but yeah, itโ€™s basically the same idea, and I think we discussed with Lars and his expertise would be actually very helpful here.

47:44
Yeah, alright, cool. No, Iโ€™m looking forward to that, but it was really neat, fun from his demonstrations, yeah, but he was, his examples were a little further than Yeah, so it was very cool. Anyway, Iโ€™ll share the link to, oh the Yeah, the presentation from Laos was unfortunately in German. So I think there might be an English one out there to be a more inclusive for everybody else as well. But yeah, to kind of think about it. So Nick, you got your questions all answered that you can think of now

48:24
I was, I was hoping for them to tell me like it wasnโ€™t possible, and then I wouldnโ€™t have to go do build now that it is possible. No, I got some work to do. Yeah, so how about

48:38
you? Yeah, I have one question, will the forums support conditional logic like I want to for data kit. I want to be able to register data views so people can show them in the in the front end. And I really want to use data forms as the backing admin, because it just makes sense to create data views within data form. So just to complete the world, but one of the things that is important for us is like, if I want to have a CSV data source, for example, I want to be able to pick that first. Like, what type of data source I want CSV, and based on the selection I made. I need a different form input, like I need the media library, for example, to be able to pick the file, or I need to be able to provide a URLURL A specific web address of a website or web page on the Internet, such as a websiteโ€™s URL www.wordpress.org to an online version of that of the same file. Or if I want to provide a gram reforms data source, I want to be able to pick the form, and I want to be able to pick the fields I want to show. So, yeah. Basically, the question is, will the data forms component support these like conditional logic things,

49:55
yeah. And do we also, I was thinking of. About Next plug in as well, like block visibility, which is, I think also rules plug in, they kind of ties into that. I think thatโ€™s a good use case that youโ€™re bringing. And actually, we have also some friends from move that are bringing the same use cases to us, like, for like, they want to try data form in product editor, and they have a very similar use cases. So yeah, my hope is, yes. My hope is that we will have like, rules engine baked in into the data form component somehow. Yeah, come and help us build it.

50:39
Yeah, one thing, one thing that I can share is that I donโ€™t know if weโ€™ll cover all the cases that people mentioned about conditional, but there are some basic ones that we need to cover in terms of the form. Like, imagine the typical situation where you have a con a country input control. So depending on the value of that control, you need to show other values in other controls, like region or the city, that that kind of experience is not there yet. But yeah, thatโ€™s the kind of thing that we are hearing from, from you also, yeah, yeah. Cool.

51:13
Thatโ€™s also a use case that quite a few form plugins havenโ€™t really solved yet easily. Yeah, all right. Nick, next question,

51:24
no, Iโ€™m sorry. I was just youโ€™re done.

51:29
All right. Well, this was wonderful. I learned quite a lot. And thank you so much for the time, Maria, then Andrea, and thanks for coming to the show, Nick. And whatโ€™s your name? Again, Iโ€™m I know, but Duke, yeah, Duke was close there. And yeah, and thank you

51:50
for the pleasure. My name often, so

51:54
yeah, weโ€™ll have the recording in in a couple of days on the core make blog, including all the transcript, of course, and the links that you all shared in the chat and Well, thank you all, and you all have a great day. Was wonderful.

52:13
Thank you. Thanks. Bye.

52:16
Bye.

#dataviews, #summary

Whatโ€™s new in Gutenberg 19.5? (23 October)

โ€œWhatโ€™s new in 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/โ€ฆโ€ posts (labeled with the #gutenberg-new tagtag A directory in Subversion. WordPress uses tags to store a single snapshot of a version (3.6, 3.6.1, etc.), the common convention of tags in version control systems. (Not to be confused with post tags.)) are posted following every Gutenberg release on a biweekly basis, showcasing new features included in each release. As a reminder, hereโ€™s an overview of different ways to keep up with Gutenberg and the Editor.


Gutenberg 19.5 has been released and is available for download!

This release focuses on stabilizing existing features but also brings some improvements to the general UIUI User interface and the zooming editing experience, with 116 PRs from 47 contributors.

  1. Smoother Zoom in/out experience
  2. Other notable changes
  3. Changelog
  4. First-time contributors
  5. Contributors

Smoother Zoom in/out experience

Gutenberg 19.5 most notable enhancements circle around the zooming out -and in!- experience.

For instance, the Edit button from the zoom-out toolbar has been replaced to favor more friendly interactions and reduce visual overload. Apart from the top toolbar toggle for this mode and the ability to double-click to zoom back, which were introduced in recent releases, a new Enter keyboard interaction brings you back in as well.

With all these easy ways to exit the zoomed-out view, the editor will now zoom out when showing the pattern inserter, a use case where showing a general view of your page/site matters more than focusing on individual blocks.

Moreover, this release brings many 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 to make this feature as stable and solid as possible for the upcoming WordPress 6.7. And the zooming transition is now smoother, too!

Other notable changes

  • The editor modes writing and editing, as introduced in Gutenberg 19.4, can now be set as a user preference so that the selected mode persists even after exiting the editor or reloading the page.
  • 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. bindings can now be used on the widgets screen, too. Check out the original pull request to learn more, or keep tuned to the Developer Blogblog (versus network, site) for more comprehensive examples!
  • You might notice some icon polishing here and there, like the update to the hidden icon and the new upload and download cloud icons.
Read more: Whatโ€™s new in Gutenberg 19.5? (23 October)

Changelog

Enhancements

General interface

  • Remove the verb Toggle from the Block Inserter button. (65983)
  • Write/Design tool: Persist as a user preference. (65945)
  • Update โ€œhiddenโ€ icon to be clearer, and invert logic as used in Data Views. (65914)
  • Update cloud upload and add cloud download icon. (65906)

Zoom Out

  • Make zoom transition smoother. (66017)
  • Try zooming out when selecting the patterns tab in the inserter. (65785)
  • Update/replace edit button with enter on selection. (65760)

Global Styles

  • Improve navigation logic for revisionsRevisions The WordPress revisions system stores a record of each saved draft or published update. The revision system allows you to see what changes were made in each revision by dragging a slider (or using the Next/Previous buttons). The display indicates what has changed in each revision. screen. (65946)

Block bindings

  • Register bindings sources in widgets screens. (65937)

Block Library

  • Cover Block: Refactor setting panel. (65432)

Component Storybook

  • Add type tokens to storybook. (65993)
  • Storybook: Add stub doc on existing colors. (65982)

Bug Fixes

Zoom Out

  • Exit zoom out when mode is changed. (65975)
  • Fix scaling issues. (65998)
  • Fix zoom reflow by replacing border with padding. (66012)
  • Focus first section root block if no selected block and tabbing to zoom out canvas. (65843)
  • Make zoom out vertical toolbar consistent. (65627)
  • Polish zoom out inserter. (66110)
  • Position scaled htmlHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. within available container space. (66034)
  • Restores setting zoom out mode to useZoomOut hook. (65999)
  • Use consistent canvas frame spacing on device preview and zoom out. (66018)
  • Zoom layout shift: Second alternate fix. (66041)

Block Library

  • Code block: Set LTR direction for RTL languages. (65891)
  • Fix duotone on parallax/repeated 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. cover blocks. (65929)
  • Fix: Embed Block: Match HTML in the editor and frontend. (65478)
  • Hide grid visualizer when grid is template locked or block editing mode is not default. (66065)
  • Post Content Block: Fix conflictconflict A conflict occurs when a patch changes code that was modified after the patch was created. These patches are considered stale, and will require a refresh of the changes before it can be applied, or the conflicts will need to be resolved. between clearFix and focus ring in the editor. (65364)
  • Post Content: Fix display of block support styles. (66003)
  • Post Terms: Fix fatal error when โ€˜get_the_term_listโ€™ returns โ€˜WP_Errorโ€™. (65848)
  • 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: Fix isControlAllowed and isTemplate combined logic. (65984)
  • Query Loop: Fix query type indicator. (65877)
  • Revert โ€œUpdate z-index hierarchyโ€. (66074)

Block bindings

  • Accept client ID as parameter forย useBlockBindingsUtils. (65818)
  • Allow label override when it is defined in client registration. (66160)
  • Bootstrap server sources earlier. (66058)
  • Fix: Donโ€™t render image whenย srcย attribute is empty. (66004)
  • Allow the field types matching attribute types in bindings. (66174)

Global Styles

  • Always preview style variations using desktop device type. (66023)
  • Improve Navigator usage in typography panel. (65942)
  • Leave screen if current shadow entry gets deleted. (65935)
  • PaletteEdit: Dedupe palette element slugs. (65772)
  • List all active fonts in the typography section. (65806)

Block Editor

  • Fix DropZone class names on drop. (65798)
  • Fix padding appender hook. (66143)
  • Memoize pattern objects returned from getAllowedPatterns. (66159)
  • Fix rich text toolbar corners. (66163)
  • BlockCanvas: Fix the height prop and width of the block editor. (65977)

Components

  • Fix : Secondary Button Transition. (66045)
  • Global Styles: Fix overflow caused by RangeControl tooltip. (65875)
  • ToggleGroupControl: Donโ€™t set value on focus after a reset. (66151)
  • Fix: Add missingย post.slugย dependency toย useMemo. (66125)

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

  • Allow โ€œdefaultโ€ suffix values. (65815)
  • Correctly handle lazily added, deeply nested properties withย deepMerge(). (65465)
  • Improvements to the experimental full-page navigation. (64067)

Site Editor

  • Fix site editor back button visual regressions. (66166)
  • Zoom Out: When double clicking a template while zoomed out , reset zoom level instead of showing dialog. (65963)

CSSCSS Cascading Style Sheets. & Styling

  • Editor: Prevent wrapping text when showing icon labels in 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.. (66038)
  • Update z-index hierarchy. (65626)

Data Views

  • Data Views list layout: Revise for improved text truncation. (65376)
  • Fix: Pattern rendering issue. (66022)

Extensibility

  • Rename wp_register_block_template() to register_block_template(). (65958)
  • Fix: Return result from wp_register_block_template function. (66102)

Post Editor

  • Fix โ€œtypewriterโ€ spacing style application. (65885)
  • Add argument with post ID to the editor.savePost hook. (66165)

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)

Post Editor

  • Fix 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. boxes accessibility. (65466)
  • Fix navigate regions shortcuts on the back button WP logo slot. (63611)
  • Improve PostURL terminology and accessibility. (63669)
  • Match visible label of search inputs with their actual label. (65458)

Components

  • Fixed : Modal dialog: Small improvement for elementShouldBeHidden. (65941)
  • ToggleGroupControl: Donโ€™t autoselect option on first group focus. (65892)
  • Tooltip: Add aria-describedby to anchor only if not redundant. (65989)

Typography

  • Revert the โ€œManage fontsโ€ button in Global Styles. (66107)

Performance

Interactivity API

  • Leverage scheduler.yield in splitTask when available. (66001)

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.

  • 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. from WordPress CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.: improve performance of WP_Theme_JSON::Merge when merging background styles. (66002)

Documentation

  • Add heading level curation documentation. (66076)
  • Components: Set up README auto-generator. (66035)
  • Contrast notes: Update 4.6:1 note with further context. (66168)
  • Data-basics/4-building-a-create-page-form is ready now. (66100)
  • Docs: env: Expand examples of path syntax. (65972)
  • Updated several typos in client-assets.php file. (66084)
  • Use correct label in PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher Backport documentation. (65908)
  • add: Usage examples in core editor documentation. (63768)
  • Consistent with block-development-examples data-basics-59c8f8. (65995)

Code Quality

  • .screen-reader-text CSS update for responsive-block-control style.scss. (66145)
  • Add missing CHANGELOG entries forย #64067. (66120)
  • Button: Move to stricter lint rule for 40px size adherence. (65840)
  • Private APIs: Remove obsolete try/catch block. (65898)
  • Remove clip and -webkit-clip for block-library common.scss. (66144)
  • Remove unused select toolbar code. (65834)
  • Simplify logical expression inย InitPatternModal. (65922)
  • Theme JSON: Remove redundant check and relocate $selectors assignment. (66154)
  • Type the router package. (65854)
  • Update jsdom to 25.0.1. (65879)
  • Interactivity: Update preact packages. (66008)

Global Styles

  • Edit Site: Avoid recomputing variations when no theme variations. (66137)
  • Edit Site: Remove redundant state inย StyleVariationsContainer. (66130)

Block Library

  • Post Terms: Remove unnecessary โ€˜get_the_termsโ€™ call. (65867)
  • Query Loop Block: Remove redundant sticky state. (66126)

Block Editor

  • Cleanupย AutoBlockPreviewย render memoization ofย BlockList. (66060)
  • Use shallow memo for prioritized inserter blocks. (65737)

Components

  • Clean up Tabs animation logic. (65878)
  • SearchControl: Deprecate onClose prop. (65988)

Post Editor

  • Block Visibility: Add end-to-end test. (65880)

Zoom Out

  • Fix components coding standards in Zoom Out Toolbar. (65858)

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.

  • Correct capabilitycapability Aย capabilityย is permission to perform one or more types of task. Checking if a user has a capability is performed by the current_user_can function. Each user of a WordPress site might have some permissions but not others, depending on theirย role. For example, users who have the Author role usually have permission to edit their own posts (the โ€œedit_postsโ€ capability), but not permission to edit other usersโ€™ posts (the โ€œedit_others_postsโ€ capability). for the Experiments page. (66118)

Tools

Testing

  • Add an end-to-end test to check the interactions in write mode. (65819)
  • Composite: Add legacy unit tests to stable version. (65952)
  • Fix end-to-end Storybook configuration. (66089)
  • Tests: Add unit tests for image rendering. (66010)
  • Zoom out: End-to-end test โ€“ zoomed out mode zooms the canvas. (65943)
  • e2e: Fix Block Visibility test. (65939)

Build Tooling

  • Dedupe npm packages. (65913)
  • Update and align babel dependencies version. (65949)
  • Update node-fetch to 2.7.0. (65957)
  • Update npm lockfile to version 3. (65923)
  • Upgrade browserslist and webcompat data packages. (65926)

First-time contributors

The following PRs were merged by first-time contributors:

Contributors

The following contributors merged PRs in this release:

@aaronrobertshawย @aferciaย @ajlendeย @akasunilย @Aljulluย @andrewserongย @AnmolVerma404ย @ciampoย @DaniGuardiolaย @dhruvang21ย @draganescuย @getdaveย @hbhalodiaย @jameskosterย @jasmussenย @jeryjย @jsnajdrย @leemyongpakvaย @MaggieCabreraย @Mamadukaย @matiasbenedettoย @matt-westย @mcsfย @mediaformatย @michalczaplinskiย @mikachanย @mirkaย @ndiegoย @ntsekourasย @ramonjdย @renathoย @richtaborย @rmccueย @sabernhardtย @SantosGuillamotย @shail-mehtaย @sirrealย @stokesmanย @t-hamanoย @talldanย @troychaplinย @tyxlaย @up1512001ย @vk17-starlordย @Vrishabhskย @westonruterย @youknowriad


Thanks to @joen for the release assets and @cbravobernal for the peer review.

#gutenberg #gutenberg-new

WordPress 6.7 Field Guide

This guide outlines major developer features and breaking changes in 6.7 and is published in the 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). phase to help inform WordPress extending developers, CoreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. developers, and others.

There are more than 300 Core Trac tickets included in WordPress 6.7, 87 of which are enhancements and feature requests, and more than 200 bug fixes. This release includes 23 tickets focused on performance, 21 on accessibility, and 12 on modernizing code and applying coding standards. Changes in 6.7 are spread across 38 Core components.

This release includes 445 enhancements, 464 bug fixes, and 55 accessibility improvements 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 (a.k.a. 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/).

Below is a breakdown of the most important developer-related changes included in WordPress 6.7.


Table of contents


Block Editor

WordPress 6.7 brings 8 Gutenberg releases into core โ€“ 18.6, 18.7, 18.8, 18.9, 19.0, 19.1, 19.2, and 19.3. As in most recent WordPress releases a large part of the updates are related to the block editor and its features.

General Updates

Design Tools

The ongoing effort to consolidate design tools has continued and several blocks now support more additional design tools.

Other

There are also a large number of other changes which have been listed in a miscellaneous block editor changes 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..

Interactivity 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. & Script Modules

WordPress 6.7 includes updates for the Interactivity API, such as a new way to interact with server state changes in client-side navigation. Also, script modules updates include improvements for loading existing scripts as module dependencies.

HTMLHTML HyperText Markup Language. The semantic scripting language primarily used for outputting content in web browsers. API

WordPress 6.7 includes many helpful updates to theย HTMLย API. This work includes a few new features and a major improvement to the HTML Processorโ€™s usability.

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.

Various internationalization (i18n) improvementsย are in WordPress 6.7, including:

Performance

WordPress 6.7 also brings some new performance focused enhancements, including a new way to register blocks that uses generated PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 7.4 or higher files to bypass performance bottlenecks of loading / parsing 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. files and more.

Miscellaneous Developer Changes

Some other notable changes for developers included in WordPress 6.7 are:

Props to @fabiankaegy, and @davidbaumwald & @peterwilsoncc for review.

#6-7, #field-guide

Internationalization improvements in 6.7

Various internationalization (i18n) improvements are in WordPress 6.7, and this developers note focuses on these.

Determining whether a translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. exists

Sometimes it can be useful to know whether a translation already exists for in memory without having to first load the translation for the given text domain. The new has_translation() function allows for exactly that.

See #52696 / [59029] for more details.

Sending emails in the adminadmin (and super admin)โ€™s localeLocale A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English.

Back in version 4.7, WordPress added the ability for users to set their preferred locale. When sending emails to a user, they are always sent in that locale, and everyone else receives the email in the siteโ€™s locale.

Now, WordPress 6.7 is going a step further: every time an email is sent to the administrator email address (admin_email), WordPress checks if a user with the same email address exists. If so, the email is sent in that userโ€™s locale.

See #61518 / [59128] for more details.

Warnings if translations are loaded too early

WordPress now warns developers if they are loading translations too early in 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. or theme, before the current user is known. Existing functions like load_plugin_textdomain() and load_theme_textdomain() were updated to defer the actual loading to the existing just-in-time translation logic in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress.. This reduces the likelihood of triggering the warning, and even improves performance in some situations by avoiding loading translations if they are not needed on a given page.

Reminder: if your plugin or theme is hosted on 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/ and is still using load_*_textdomain(), you can remove this call. Since WordPress 4.6, plugins and themes no longer need load_plugin_textdomain() or load_theme_textdomain(). WordPress automatically loads the translations for you when needed. If you still support older WordPress versions or do not host your plugin/theme on WordPress.org, move the function call to a later hook such as init.

When attempting to load translations before after_setup_theme or init, WordPress tries to load the current user earlier than usual, without giving other plugins a chance to potentially hook into the process. It also prevents any plugins from filtering translation calls, e.g. for switching the locale or file location. Hence the addition of this warning to call out this unexpected behavior.

See #44937, [59127], and [59157] for more details.

Your plugin might be _doing_it_wrong() if you for example directly call get_plugin_data() (which attempts to load translations by default) or __() without waiting for the init hook. Here is a common example that was found in an actual plugin that was fixed:

/**
 * Plugin Name: Awesome Plugin
 */

function myplugin_get_version() {
	require_once ABSPATH . 'wp-admin/includes/plugin.php';
	// Prevent early translation call by setting $translate to false.
	$plugin_data = get_plugin_data( __FILE__, false, /* $translate */ false );
	return $plugin_data['Version'];
}

define( 'MYPLUGIN_VERSION', myplugin_get_version() );

If you do not explicitly set $translate set to false when calling get_plugin_data(), the function translates the plugin metadata by default. Since this plugin just needs the version number, there is no need for translating any of the other fields.

Another example:

/**
 * Plugin Name: Awesome Plugin
 */

class My_Awesome_Plugin {
	public $name;
	public function __construct() {
		// This triggers just-in-time translation loading
		$this->name = __( 'My Awesome Plugin', 'my-awesome-plugin' );

		// ... do something
	}
}

// This immediately instantiates the class, way before `init`.
$myplugin = new My_Awesome_Plugin();

Here, a class is immediately instantiated in the main plugin file, and code within the class constructor uses a translation function. This can be avoided by deferring the class instantiation until after init, or deferring the translation call until later when it is actually needed.

If your plugin is affected by this warning, you can use code like follows to find out the code path that triggers it:

add_action(
	'doing_it_wrong_run',
	static function ( $function_name ) {
		if ( '_load_textdomain_just_in_time' === $function_name ) {
			debug_print_backtrace();
		}
	}
);

Developer tools such as Query Monitor are also helpful in situations like this.


Props to @ocean90, @fabiankaegy for review.

#6-7, #dev-notes, #dev-notes-6-7, #i18n

Block Bindings: Improvements to the Editor Experience in 6.7

WordPress 6.7 introduces various improvements to the BlockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. Bindings 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. and the built-in post 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. source, including a default UIUI User interface and the beginnings of a public editor API.

For an introduction to Block Bindings, first introduced in WordPress 6.5, see the prior dev note.

New Block Bindings UI

Compatible blocks โ€”ย which currently include Heading, Paragraph, Image, and Button โ€” have received a new default UI for viewing bindings.

Called Attributes, you can find the new tool panel in block settings whenever a compatible block is selected in either the post or site editor.

The panel shows active bindings on the current block. If there are any post meta available, the panel is also interactive, allowing you to bind attributes to those custom fields via the built-in post meta block bindings source.

Currently, there are two limitations to the panel:

  1. It will not allow users to bind attributes to custom sources just yet.ย 

    Bindings to custom sources, which can be added via the code editor or other programmatic means, will still display in the panel โ€” they just canโ€™t be connected via the UI for the moment in WordPress 6.7.

    A flexible API for connecting custom sources to the Attributes panel is currently under development and is planned for public release in the future.

    For now, the rollout of that API has started with the built-in post meta source to allow time for gathering feedback.
  2. For each attribute, the panel will only show custom fields that match its data type. For example, an attribute of type string or rich-text can only be connected to a custom fieldCustom Field Custom Field, also referred to as post meta, is a feature in WordPress. It allows users to add additional information when writing a post, eg contributorsโ€™ names, auth. WordPress stores this information as metadata. Users can display this meta data by using template tags in their WordPress themes. of type string, and an attribute of number can only be connected to another number.

New Post Meta Label Attribute

To improve how custom fields appear in the editor UI, a new label attribute has been created for post meta, which can be defined during registration:

If specified, the label will render in place of the meta key in the Attributes panel โ€” in this example, the label would replace movie_director. The label will also render under certain circumstances in other parts of the editor, including as a placeholder for Rich Text if a block is bound to the post meta source and a default value is undefined.

Usage In Custom Post Templates

One of the primary use cases for Block Bindings is to assist in creating templates for custom post types. Given a custom post typeCustom Post Type WordPress can hold and display many different types of content. A single item of such a content is generally called a post, although post is also a specific post type. Custom Post Types gives your site the ability to have templated posts, to simplify the concept. called movie, for example, one can define how custom fields for that post type will render, such as via connected images, headings, paragraphs, and buttons.

Here is an example of how one could use connected blocks to create a layout:

One can override the content in connected blocks for each instance of the custom post type, a much simpler and more flexible way of creating layouts than in the past โ€”ย all without needing to create custom blocks.

Default Permissions

Accompanying this UI is a new canUpdateBlockBindings editor setting, used to determine whether the UI is interactive for users or not.

By default, this editor setting is set to a new edit_block_binding capability, which maps to a userโ€™s ability to either:

  1. Edit the post type (in the post editor), or
  2. Edit the theme options (in the site editor)

This means that the setting is by default set to true for administrators, and false for other users.

This default setting can be overridden using the block_editor_settings_all 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. and modifying $editor_settings['canUpdateBlockBindings'] as follows:

function my_plugin_override_can_update_block_bindings( $settings ) {
    $settings['canUpdateBlockBindings'] = true;
    return $settings;
}
add_action( 'block_editor_settings_all', 'my_plugin_override_can_update_block_bindings' );

New Public Editor APIs

Several functions have been exposed to enable the use of block bindings in the editor.

Registration API

Source Bootstrappingย 

As part of the new editor API, Block Bindings will automatically register custom sources defined on the server with bootstrapped values in the editor. This will allow existing sources registered using just the server APIs to render in the UI.

This means that any sources already registered using the server APIs, available since 6.5, will appear in the UI, at least minimally, without any action required.

For example, given the following server registration and block markupโ€ฆ

Server Registration
function my_plugin_register_block_bindings_post_attributes() {
    register_block_bindings_source(
        'my-plugin/post-attributes',
        array(
            'label'              => _x( 'Post Attributes', 'block bindings source', 'my-plugin' ),
            'get_value_callback' => 'my_plugin_block_bindings_post_attributes_get_value',
            'uses_context'       => array( 'postId' ),
        )
    );
}
add_action( 'init', 'my_plugin_register_block_bindings_post_attributes' );

function my_plugin_block_bindings_post_attributes_get_value( array $source_args, $block_instance ) {
    $allowed_fields = array( 'title', 'excerpt' );
    if ( ! in_array( $source_args['key'], $allowed_fields ) ) {
        return null;
    }
    $post = get_post( $block_instance->context['postId'] );
    return $post->{'post_' . $source_args['key']};
}
Block Markup
<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"my-plugin/post-attributes","args":{"key":"title"}}}}} -->
<p></p>
<!-- /wp:paragraph -->

โ€ฆthe source will get registered in the editor with the sourceโ€™s name my-plugin/post-attributes, label, and uses_context values. This is enough for the UI to render as follows:

In this case, however, the bound paragraph in the block canvas will simply show the source label and will not be dynamic. Further customization of the editor experience requires using the new editor registration functions, detailed in the next section.

Editor Registration

The following functions have been exposed to allow customization of the editor experience:

  • registerBlockBindingsSource: Registers a source on the client (using this function will override the bootstrapped registration).
  • unregisterBlockBindingsSource: Unregisters an existing source.
  • getBlockBindingsSource: Gets a specific registered source and its properties.
  • getBlockBindingsSources: Gets all the registered sources in the client.

These are based on other registration APIs like block types, block variations, or block collections.

Source Properties

Registered sources in the client can include the following properties:

  • name: The unique and machine-readable name.
  • label: Human-readable label. Will overwrite preexisting label if it has already been registered on the server.
  • usesContext: Array of context needed by the source only in the editor. Will be merged with existingย uses_contextย if it has already been registered on the server.
  • getValues: Function to get the values from the source. It receives select, clientId, context, and the block bindings created for that specific source. It must return an object with attribute: value. Similar to getBlockAttributes.
  • setValues: Function to update multiple values connected to the source. It receives select, clientId, dispatch, context, and the block bindings created for that specific source, including the new value. Similar to updateBlockAttributes.
  • canUserEditValue: Function to let the editor know if the block attribute connected should be editable or not. It receives select, context, and the source arguments.
Example Usagesย 
Register a Block Bindings Source

Building on the example server registration, use the following 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 to register in the editor by enqueuing on the enqueue_block_editor_assets hook:

import { registerBlockBindingsSource } from '@wordpress/blocks';
import { __ } from '@wordpress/i18n';
import { store as coreEditorStore } from '@wordpress/editor';

const allowedAttributes = [ 'title', 'excerpt' ];

registerBlockBindingsSource( {
    name: 'my-plugin/post-attributes',
    usesContext: [ 'postType' ],	
    getValues( { select, bindings } ) {
        const values = {};
        for ( const [ attributeName, source ] of Object.entries( bindings ) ) {
            if ( allowedAttributes.includes( source.args.key ) ) {
                values[ attributeName ] = select( coreEditorStore ).getEditedPostAttribute( source.args.key );
            }
        }
        return values;
    },
    setValues( { dispatch, bindings } ) {
        const newValues = {};
        for ( const [ attributeName, source ] of Object.entries( bindings ) ) {
            if ( allowedAttributes.includes( source.args.key ) ) {
                newValues[ source.args.key ] = source.newValue;
            }
        }
        if ( Object.keys( newValues ).length > 0 ) {
            dispatch( coreEditorStore ).editPost( newValues );
        }
    },
    canUserEditValue( { context, args } ) {
        return allowedAttributes.includes( args.key ) && 'post' === context.postType;
    },
} );

To connect example blocks to the source, go to the post editor, open the code editor, and use the following markup:

<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"my-plugin/post-attributes","args":{"key":"title"}}}}} -->
<p></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"metadata":{"bindings":{"content":{"source":"my-plugin/post-attributes","args":{"key":"excerpt"}}}}} -->
<p></p>
<!-- /wp:paragraph -->

For a more in-depth example of how these properties can be defined in a real-world scenario, see the registration for the built-in post meta source.

Unregister a Block Bindings Source
import { unregisterBlockBindingsSource } from '@wordpress/blocks';

unregisterBlockBindingsSource( 'plugin/my-custom-source' );
Get All Block Bindings Sources
import { getBlockBindingsSources } from '@wordpress/blocks';

const registeredSources = getBlockBindingsSources();
Get a Block Bindings Source
import { getBlockBindingsSource } from '@wordpress/blocks';

const blockBindingsSource = getBlockBindingsSource( 'plugin/my-custom-source' );

Note: If desired, sources may be registered only on the client and not on the server at all. This could be useful for creating forms in the adminadmin (and super admin), or otherwise using bindings to interact with other parts of WordPress, or other dynamic data.

Block Bindings Utils

The useBlockBindingsUtils hook returns helper functions to modify the metadata.bindings attribute. The hook accepts an optional clientId argument. If the clientId is not specified, the helper functions will execute in the current block edit context.

Right now, the helpers include:

  • updateBlockBindings: This works similarly to updateBlockAttributes. It can be used to create, update, or remove specific connections.
  • removeAllBlockBindings: This is used to remove all existing connections in a block.

Example usage

import { useBlockBindingsUtils } from '@wordpress/block-editor';

const { updateBlockBindings, removeAllBlockBindings } = useBlockBindingsUtils();

// Updates bindings for url and alt attributes.
updateBlockBindings( {
ย ย ย ย url: {
ย ย ย ย ย ย ย ย source: 'core/post-meta',
ย ย ย ย ย ย ย ย args: {
ย ย ย ย ย ย ย ย ย ย ย ย key: 'url_custom_field',
ย ย ย ย ย ย ย ย },
ย ย ย ย },
ย ย ย ย alt: {
ย ย ย ย ย ย ย ย source: 'core/post-meta',
ย ย ย ย ย ย ย ย args: {
ย ย ย ย ย ย ย ย ย ย ย ย key: 'alt_custom_field',
ย ย ย ย ย ย ย ย },
ย ย ย ย },
} );

// Removes all bindings set for the block.
removeAllBlockBindings();

Used internally by the default UI for the post meta source and pattern overrides, these utils can be useful in building custom UI for other sources.

For more examples of how these functions are used in practice by the built-in UI, see the calls to updateBlockBindings and removeAllBlockBindings.

New Server Filter

A block_bindings_source_value filter has been introduced to allow for overriding of the value returned by a source in a bound block. It takes the following arguments:

  • value: Value returned by the source.
  • name: Name of the source.
  • source_args: Arguments passed to the source.
  • block_instance: The bound block.
  • attribute_name: The connected attribute in the bound block.
function modify_block_bindings_source_value( $value, $name, $source_args, $block_instance, $attribute_name ) {
    if ( 'core/post-meta' === $name && 'movie_runtime' === $source_args['key'] ) {
        return $value . ' minutes';
    }
    return $value;
}
add_filter( 'block_bindings_source_value', 'modify_block_bindings_source_value', 10, 5 );

Conclusion

The developers behind Block Bindings are always happy to hear feedback. Please feel free to share bugs, feature requests, or other thoughts by creating issues on 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 by the repository owner. https://github.com/ or leaving a comment on this post.

Anyone can also follow and comment on Block Bindings development via the latest iteration, which is posted in the Block Bindings tracking issue at the beginning of each release cycle. Be sure to subscribe to the tracking issue for updates!

Lastly, if youโ€™d like to help shape the roadmap for Block Bindings by sharing your use cases, feel free to post in Block Bindings discussions.

Props to @santosguillamot @gziolo @cbravobernal @greenshady @fabiankaegy and @welcher for their help compiling this post.

#6-7, #block-bindings, #dev-notes, #dev-notes-6-7