Repository navigation
Description
Description
Related Trac ticket 56467.
This is the tracking issue to coordinate the process of backporting all PHP changes added in the Gutenberg plugin that needs to be backported for the WordPress 6.1 release.
Files listed for WP 6.1
lib/block-supports
-
Backporting block supports [border, color, elements, spacing] from Gutenberg to WP 6.1 wordpress-develop#3204 🟢border.php -
Backporting block supports [border, color, elements, spacing] from Gutenberg to WP 6.1 wordpress-develop#3204 🟢colors.php -
No changes since WP 6.0.dimensions.php -
Backport duotone block supports for WP 6.1 wordpress-develop#3210 🟢duotone.php -
Backporting block supports [border, color, elements, spacing] from Gutenberg to WP 6.1 wordpress-develop#3204 🟢elements.php -
@andrewserong (ref). Blocked by safecss_filter_attr: Add exceptions for min(), max(), etc. functions wordpress-develop#3212 and Add layout-related CSS properties to safe_style_css_filter in kses.php wordpress-develop#2928. Style engine: migrate functions, classes and tests wordpress-develop#3199 Backport Layout block support refactor part 2 wordpress-develop#3254 🟢layout.php -
Backporting block supports [border, color, elements, spacing] from Gutenberg to WP 6.1 wordpress-develop#3204 🟢spacing.php -
Backport typography block supports for WP 6.1 wordpress-develop#3203 🟢typography.php -
No changes since WP 6.0.utils.php
lib/compat/wordpress-6.1
-
- Layout: #42906 Spacing: #42173 🟢block-editor-settings.php -
block-patterns.php- 🔴 Patterns registered in this file are not in Core. -
Site editor: #3214 🟢block-template-utils.php -
blocks.php🔴 It seems that the multipleviewScriptsfeature has not been backported. -
No changes since WP 6.0.class-gutenberg-rest-block-patterns-controller.php -
No changes since WP 6.0.class-gutenberg-rest-templates-controller.php -
Elements API updates backport wordpress-develop#3206 Backport foundation for Layout block support refactor (part 1) wordpress-develop#3205 Backport spacing presets wordpress-develop#3255 🟢class-wp-theme-json-6-1.php -
Backport spacing presets wordpress-develop#3255class-wp-theme-json-resolver-6-1.php⚠️ Core has more 6.1 functions than the Gutenberg file. -
Code is already in Core 🟢date-settings.php -
Preload settings and templates permissions for post editor wordpress-develop#3156 @Mamaduka 🟢edit-form-blocks.php -
🟢get-global-styles-and-settings.php -
Backport block editor persisted preferences wordpress-develop#3219 🟢persisted-preferences.php -
🟢rest-api.php -
Style engine changes in WordPress/wordpress-develop#3218 🟢script-loader.php -
theme-i18n.json🔴 -
Backport foundation for Layout block support refactor (part 1) wordpress-develop#3205 🟢theme.json -
@andrewserong Should be covered by layout related work. Only affected by Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles #42544. 🟢theme.php -
(No need to backport, see Plugin: Backport PHP changes for WordPress 6.1 release #43440 (comment).)wp-theme-get-post-templates.php
lib/experimental
-
No need to backport: Only used for mobile editor. @geriux confirmed that the endpoint is only available from the GB plugin for now.block-editor-settings-mobile.php -
Deleted.blocks.php -
class-wp-rest-block-editor-settings-controller.php -
class-wp-rest-customizer-nonces.php -
No need to backport -- "alias" wrapper aroundclass-wp-theme-json-gutenberg.phpWP_Theme_JSON_6_1. -
class-wp-theme-json-resolver-gutenberg.php [ ]🔴 Webfonts API is still in development and not ready for WP 6.1.class-wp-webfonts-provider-local.php[ ]🔴 Webfonts API is still in development and not ready for WP 6.1.class-wp-webfonts-provider.php[ ]🔴 Webfonts API is still in development and not ready for WP 6.1.class-wp-webfonts.php-
editor-settings.php -
navigation-page.php -
navigation-theme-opt-in.php [ ]🔴 Webfonts API is still in development and not ready for WP 6.1.register-webfonts-from-theme-json.php-
rest-api.php [ ]🔴 Webfonts API is still in development and not ready for WP 6.1.webfonts.php
Legend:
🟢 – confirmed for WP 6.1
🟡 – needs decision
🔴 – moved to future WP release
Getting Involved
If you are interested in helping with the effort, can you comment (or edit the issue's description) with your name next to the file if you plan to help with backporting. It would also help to link to Track issues / GitHub PRs in WordPress core when they are available.
Action items when working on backports:
- Update the files to follow best practices. Mostly rename functions/classes to use
wp_prefix instead ofgutenberg_and guard with declaration checks for code that needs to be backported to WordPress core. - Identify files and functionality that need to be backported to WordPress core.
- Ensure all files, classes, methods, properties, and functions have
@since 6.1.0documentation tag included. - Ensure all functionality backported to WordPress core has unit tests written.
Note that @hellofromtonya has started work to smoothen the backporting process, by adjusting Gutenberg's test and lint structure to more closely resemble Core's (to avoid having to fix code in backport PRs when they don't pass wordpress-develop's tests even though they did pass Gutenberg's): #43333
Issue modeled after #39889.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
Mamaduka commentedon Aug 25, 2022
I'll create a patch for changes in
edit-form-blocks.phpfile.The
gutenberg_add_site_icon_url_to_indexfeature backport fromrest-api.phpdepends if we merge #43514 or not.@ntsekouras, correct me if I'm wrong, but the
wp-theme-get-post-templates.phpdoesn't need to be ported into the core.Aljullu commentedon Aug 25, 2022
Heads-up that I opened a PR in wordpress-develop: WordPress/wordpress-develop#3131 which implements the same fix as #43597 in
block-template-utils.php.Related track issue: https://core.trac.wordpress.org/ticket/55881#ticket
ntsekouras commentedon Aug 26, 2022
Good catch @Mamaduka ! It seems so.
ockham commentedon Aug 26, 2022
Apologies for the mass ping -- I'd like to get the backports work off the ground 😊
tl;dr: If you've added PHP code to Gutenberg's
lib/directory since the WP 6.0 release, it will need backporting towordpress-developin order to be included in WP 6.1. Backporting is typically easiest for the people who originally implemented the relevant feature. Please refer to the list in the issue description and leave a comment if you're willing to backport code. If you're unfamiliar with the process of backporting, don't hesitate to ping me (@ockham) or @michalczaplinski -- we're happy to help!PRs that are strickenthrough are already merged in WordPress Core
lib/block-supports/
border.php
Theme.json: Add spacing size presets #41527@ramonjd @glendaviesnz @aaronrobertshaw
colors.php
@ramonjd
dimensions.php
duotone.php
Remove: Unrequired regex search on duotone supports. #42020Add ability to unset duotone in themes with default duotone set #39564@jorgefilipecosta @ajlende
elements.php
enqueueflag #43103Elements: Add styles to the footer before the block is rendered #37728@ramonjd @oandregal @scruffian
layout.php
enqueueflag #43103Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles #42544Core CSS support for root padding and alignfull blocks #42085Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json #40875@ramonjd @aristath @matiasbenedetto @andrewserong @tellthemachines @youknowriad @glendaviesnz
spacing.php
Theme.json: Add spacing size presets #41527@ramonjd @glendaviesnz
typography.php
Block supports: add fluid typography #39529@ramonjd
utils.php
lib/compat/wordpress-6.1/
Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles #42544Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json #40875Theme.json: Add spacing size presets #41527Do not render global styles coming from the server in the site editor #40185@glendaviesnz @andrewserong @Soean @jsnajdr @oandregal
@jorgefilipecosta
[Site Editor]: Updatesingledefault template copy #41302@ntsekouras
Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json #40875@andrewserong @aristath @gziolo
editcontext to patterns REST controllers #40259Update patterns REST controllers namespace to stable #40252(This is a "back-backport" from Core.)@jorgefilipecosta @anton-vlasenko @Mamaduka @ntsekouras @gziolo @jsnajdr
@ntsekouras
Spacing presets: Add check for 0 spacing steps #43105Spacing presets: Prevent % spacing size units being stripped by sanitize_title #43101Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles #42544Layout: Reduce specificity of fallback blockGap styles #42665Block supports: add fluid typography #39529Core CSS support for root padding and alignfull blocks #42085Theme.json: Add block support feature level selectors for blocks #42087Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json #40875Global Styles: Add support for heading elements #41981Theme.json: Add spacing size presets #41527Global Styles: Add support for caption elements #41140elementsin theme json #41786Duotone: Fix CSS Selectors rendered by theme.json duotone/filter settings for blocks on public pages #41335Global Styles: Button Element: update button element selector #41240get_style_nodes should be compatible with parent method. #41217Global Styles: Load block CSS conditionally #41160@Mamaduka @glendaviesnz @MaggieCabrera @scruffian @andrewserong @ramonjd @tellthemachines @aaronrobertshaw @getdave @matiasbenedetto @torounit
Theme.json: Add spacing size presets #41527@youknowriad @glendaviesnz @scruffian
@noisysocks
Post Editor: Preload templates post type permissions #42209@Mamaduka
Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json #40875Global Styles: Load block CSS conditionally #41160@andrewserong @scruffian @glendaviesnz
@talldan
REST API: Add the missing 'site_icon_url' to the index #42957@Mamaduka @jorgefilipecosta @ntsekouras
Global Styles: Load block CSS conditionally #41160@ramonjd @scruffian @glendaviesnz
Theme.json: Add spacing size presets #41527@glendaviesnz @gziolo
Core CSS support for root padding and alignfull blocks #42085Layout: Use semantic classnames, centralize layout definitions, reduce duplication, and fix blockGap in theme.json #40875Theme.json: Add spacing size presets #41527elementsin theme json #41786@glendaviesnz @matiasbenedetto @tellthemachines @andrewserong @scruffian @getdave
Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles #42544@andrewserong
lib/experimental/
block-editor-settings-mobile.php
__experimentalEnableListBlockV2flag for mobile #42697@ellatrix @oandregal
blocks.php
__experimentalEnableListBlockV2flag for mobile #42697@ellatrix @oandregal
class-wp-rest-block-editor-settings-controller.php
Layout: Add a disable-layout-styles theme supports flag to opt out of all layout styles #42544__experimentalEnableListBlockV2flag for mobile #42697Theme.json: Add spacing size presets #41527@glendaviesnz @andrewserong @ellatrix
class-wp-rest-customizer-nonces.php
class-wp-theme-json-gutenberg.php
@scruffian
class-wp-theme-json-resolver-gutenberg.php
List modeled after #39889 (comment). Created using the script from #43360.
glendaviesnz commentedon Aug 29, 2022
I can take care of all the spacing size preset related changes.
Mamaduka commentedon Aug 30, 2022
@ockham, @michalczaplinski, do we have a core tracking ticket to reference in Core PRs?
ockham commentedon Aug 30, 2022
@Mamaduka Ah, we didn't -- my apologies! I've filed one now: https://core.trac.wordpress.org/ticket/56467
andrewserong commentedon Aug 30, 2022
I'm happy to help out with Layout backports. I'm travelling at the moment but can start looking at some of them next week when I'm back. Some of them might have a couple of challenges — layout.php currently depends on the style engine work in the style engine package (so just CCing @ramonjd there), which might need to land first?
Also, I was wondering how we deal with PHP changes that require JS changes to be shipped at the same time? I think some of the Layout work might need to happen all at once 🤔. There's definitely pieces that can be done in separate PRs first, though, so I'll give it a bit more thought to see what sort of order might work.
Just linking a couple of other pre-requisites for Layout in Gutenberg being merged to core:
safecss_filter_attr(likeclamp)safe_style_css_filterI believe the above two tickets/PRs will need to land prior to the
layout.phpchanges being backported.Mamaduka commentedon Aug 31, 2022
@ockham,
My backport PRs are ready:
The #40416 should already be in Core, cherry-picked for a minor release - WordPress/wordpress-develop#2600.
I've only done a minor code quality work for
class-wp-theme-json-6-1.php, but happy to help as needed.34 remaining items
oandregal commentedon Sep 15, 2022
Prepared WordPress/wordpress-develop#3261 to backport #44189 (which is approved but I'm waiting for the tests to pass and will backport to 14.1).
andrewserong commentedon Sep 19, 2022
Just looking over the theme JSON file and saw that
box-shadowsupport hadn't been backported yet. I've opened up a PR in WordPress/wordpress-develop#3274, which should pull in the final bits for that.ramonjd commentedon Sep 19, 2022
Block supports scripts loading
Added WordPress/wordpress-develop#3273 as an extension of WordPress/wordpress-develop#3259 cc @ockham
Editor: Backport block supports (border, color, elements, spacing) fr…
Editor: Backport block supports (border, color, elements, spacing) fr…
Editor: Backport block supports (border, color, elements, spacing) fr…
oandregal commentedon Sep 22, 2022
I've prepared WordPress/wordpress-develop#3313 to backport the changes at #44363
gziolo commentedon Sep 23, 2022
I can confirm that all the changes are present in WordPress core.
We didn't include this new API in WP core in 6.1. PR that reflects that in the plugin is ready for review: #44414.
scruffian commentedon Sep 23, 2022
I think this one is missing from some of the backports above: WordPress/wordpress-develop#3319
hellofromtonya commentedon Sep 27, 2022
I removed all of the Webfonts API files from the backport list. Why? The API is being re-architected, ie still in development. It will not be ready for WP 6.1. 🔴
Please leave these files in the
lib/experimental/directory. Thanks.cbravobernal commentedon Nov 2, 2022
Now that the 6.1 release is out, I think we can close this issue.
Editor: Backport block supports (border, color, elements, spacing) fr…