Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin: Backport PHP changes for WordPress 6.1 release #43440

Closed
27 of 37 tasks
ockham opened this issue Aug 19, 2022 · 51 comments
Closed
27 of 37 tasks

Plugin: Backport PHP changes for WordPress 6.1 release #43440

ockham opened this issue Aug 19, 2022 · 51 comments
Assignees
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@ockham
Copy link
Contributor

ockham commented Aug 19, 2022

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

lib/compat/wordpress-6.1

lib/experimental

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 of gutenberg_ 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.0 documentation 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.

@ockham ockham added Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. labels Aug 19, 2022
@Mamaduka
Copy link
Member

I'll create a patch for changes in edit-form-blocks.php file.

The gutenberg_add_site_icon_url_to_index feature backport from rest-api.php depends if we merge #43514 or not.

@ntsekouras, correct me if I'm wrong, but the wp-theme-get-post-templates.php doesn't need to be ported into the core.

@Aljullu
Copy link
Contributor

Aljullu commented 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
Copy link
Contributor

ntsekouras commented Aug 26, 2022

@ntsekouras, correct me if I'm wrong, but the wp-theme-get-post-templates.php doesn't need to be ported into the core.

Good catch @Mamaduka ! It seems so.

@ockham
Copy link
Contributor Author

ockham commented 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 to wordpress-develop in 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/

lib/compat/wordpress-6.1/

lib/experimental/


List modeled after #39889 (comment). Created using the script from #43360.

@glendaviesnz
Copy link
Contributor

I can take care of all the spacing size preset related changes.

@Mamaduka
Copy link
Member

@ockham, @michalczaplinski, do we have a core tracking ticket to reference in Core PRs?

@ockham
Copy link
Contributor Author

ockham commented Aug 30, 2022

@ockham, @michalczaplinski, do we have a core tracking ticket to reference in Core PRs?

@Mamaduka Ah, we didn't -- my apologies! I've filed one now: https://core.trac.wordpress.org/ticket/56467

@andrewserong
Copy link
Contributor

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:

I believe the above two tickets/PRs will need to land prior to the layout.php changes being backported.

@Mamaduka
Copy link
Member

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

@ockham
Copy link
Contributor Author

ockham commented Aug 31, 2022

Small update: In WordPress/wordpress-develop#3154, I'm attempting a package sync to update Core to the latest package versions -- mostly as a dry-run for Beta 1. (I would like to actually merge it once its ready -- see its PR desc for context).

In order to unblock that PR, I've filed a small backport PR to add the $priority param to wp_enqueue_block_support_styles.

@gziolo
Copy link
Member

gziolo commented Aug 31, 2022

In order to unblock that PR, I've filed a small backport PR to add the $priority param to wp_enqueue_block_support_styles.

In addition to that, we need to refactor all occurrences of WP_Theme_JSON_Gutenberg and gutenberg_enqueue_block_support_styles in core blocks in the Gutenberg plugin. That might not be trivial as the plugin still supports WordPress 6.0 and 6.1 where some functionality is missing.

@ockham
Copy link
Contributor Author

ockham commented Sep 1, 2022

In order to unblock that PR, I've filed a small backport PR to add the $priority param to wp_enqueue_block_support_styles.

In addition to that, we need to refactor all occurrences of WP_Theme_JSON_Gutenberg and gutenberg_enqueue_block_support_styles in core blocks in the Gutenberg plugin. That might not be trivial as the plugin still supports WordPress 6.0 and 6.1 where some functionality is missing.

Good point. Here's one approach for gutenberg_enqueue_block_support_styles: #43779.

@noisysocks
Copy link
Member

noisysocks commented Sep 6, 2022

Thanks for the nice list—that's a cool script! I've backported #41648 (in r54079) and checked it off the list in the description.

@ramonjd
Copy link
Member

ramonjd commented Sep 6, 2022

I'm working on prepping packages/style-engine for inclusion in core.

WIP here: WordPress/wordpress-develop#3199

This will unblock most of the lib/block-supports migrations given that they're using style engine methods.

It requires https://core.trac.wordpress.org/ticket/55966, otherwise I'll need to migrate gutenberg_safecss_filter_attr_allow_css_6_1 to core to make the Style Engine work. 😱

@ockham
Copy link
Contributor Author

ockham commented Sep 6, 2022

It requires https://core.trac.wordpress.org/ticket/55966, otherwise I'll need to migrate gutenberg_safecss_filter_attr_allow_css_6_1 to core to make the Style Engine work. 😱

I've asked in #core for someone to merge 55966's patch 🙂

@ockham
Copy link
Contributor Author

ockham commented Sep 6, 2022

As the Feature Freeze is only two weeks away, I'll start pinging some folks who I know have good domain knowledge of certain areas and can help backporting some files 😊

@ntsekouras -- Could you file a backport PR for the changes you made to block-template-utils.php and class-gutenberg-rest-templates-controller.php? 🙏

@ockham
Copy link
Contributor Author

ockham commented Sep 6, 2022

As the Feature Freeze is only two weeks away, I'll start pinging some folks who I know have good domain knowledge of certain areas and can help backporting some files 😊

@jorgefilipecosta -- Could you maybe file a backport PR for #41791 (affecting block-patterns.php, class-gutenberg-rest-block-patterns-controller.php, and rest-api.php)? 🙏

@jorgefilipecosta
Copy link
Member

As the Feature Freeze is only two weeks away, I'll start pinging some folks who I know have good domain knowledge of certain areas and can help backporting some files 😊

@jorgefilipecosta -- Could you maybe file a backport PR for #41791 (affecting block-patterns.php, class-gutenberg-rest-block-patterns-controller.php, and rest-api.php)? 🙏

Sure 👍

@ockham
Copy link
Contributor Author

ockham commented Sep 6, 2022

As the Feature Freeze is only two weeks away, I'll start pinging some folks who I know have good domain knowledge of certain areas and can help backporting some files 😊

@oandregal -- Could you maybe file a backport PR for #25892 (Quote v2)? 🙏

@ironprogrammer
Copy link
Contributor

ironprogrammer commented Sep 13, 2022

Submitted #3237 as refresh of #3203, primarily to resolve failing PHP unit tests once style engine is in place.

@oandregal
Copy link
Member

Prepared WordPress/wordpress-develop#3247 to backport some recent changes: #44015 #44109 and #44159

@andrewserong
Copy link
Contributor

andrewserong commented Sep 15, 2022

Thanks for all the help landing part 1 of the Layout refactor! Update on Layout and Spacing presets follow-up backports:

@oandregal
Copy link
Member

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
Copy link
Contributor

Just looking over the theme JSON file and saw that box-shadow support 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
Copy link
Member

ramonjd commented Sep 19, 2022

Block supports scripts loading

Added WordPress/wordpress-develop#3273 as an extension of WordPress/wordpress-develop#3259 cc @ockham

pento pushed a commit to WordPress/wordpress-develop that referenced this issue Sep 19, 2022
…om Gutenberg to WP 6.1.

This changeset backports `border`, `color`, `elements` and `spacing` block supports changes from Gutenberg to WP 6.1. 

See tracking issue on Gutenberg repository: [WordPress/gutenberg#43440 gutenberg#43440].

Props ramonopoly, glendaviesnz, bernhard-reiter, audrasjb, costdev.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54211 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this issue Sep 19, 2022
…om Gutenberg to WP 6.1.

This changeset backports `border`, `color`, `elements` and `spacing` block supports changes from Gutenberg to WP 6.1. 

See tracking issue on Gutenberg repository: [WordPress/gutenberg#43440 gutenberg#43440].

Props ramonopoly, glendaviesnz, bernhard-reiter, audrasjb, costdev.
See #56467.

Built from https://develop.svn.wordpress.org/trunk@54211


git-svn-id: http://core.svn.wordpress.org/trunk@53770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
github-actions bot pushed a commit to platformsh/wordpress-performance that referenced this issue Sep 19, 2022
…om Gutenberg to WP 6.1.

This changeset backports `border`, `color`, `elements` and `spacing` block supports changes from Gutenberg to WP 6.1. 

See tracking issue on Gutenberg repository: [WordPress/gutenberg#43440 gutenberg#43440].

Props ramonopoly, glendaviesnz, bernhard-reiter, audrasjb, costdev.
See #56467.

Built from https://develop.svn.wordpress.org/trunk@54211


git-svn-id: https://core.svn.wordpress.org/trunk@53770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@oandregal
Copy link
Member

I've prepared WordPress/wordpress-develop#3313 to backport the changes at #44363

@gziolo
Copy link
Member

gziolo commented Sep 23, 2022

I have an update for the lib/compat/wordpress-6.1/blocks.php file:

  • there is an open Trac ticket and PR for backporting gutenberg_block_type_metadata_render_template to WordPress core
  • there is also an open PR (still in progress) to backport support for multiple view scripts to WordPress core (gutenberg_block_type_metadata_multiple_view_scripts)

I can confirm that all the changes are present in WordPress core.

  • I'm not sure if we immediately need wp_enqueue_block_view_script in WordPress core, @aristath should know better why we need it, but it might depend on how we land support for multiple view scripts

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
Copy link
Contributor

I think this one is missing from some of the backports above: WordPress/wordpress-develop#3319

@hellofromtonya
Copy link
Contributor

hellofromtonya commented 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
Copy link
Contributor

Now that the 6.1 release is out, I think we can close this issue.

Repository owner moved this from In Progress to Done in Ignite board - ARCHIVED - USE https://github.com/orgs/WordPress/projects/122 Nov 2, 2022
Repository owner moved this from In Progress to Done in WordPress 6.1 Editor Tasks Nov 2, 2022
ootwch pushed a commit to ootwch/wordpress-develop that referenced this issue Nov 4, 2022
…om Gutenberg to WP 6.1.

This changeset backports `border`, `color`, `elements` and `spacing` block supports changes from Gutenberg to WP 6.1. 

See tracking issue on Gutenberg repository: [WordPress/gutenberg#43440 gutenberg#43440].

Props ramonopoly, glendaviesnz, bernhard-reiter, audrasjb, costdev.
See #56467.


git-svn-id: https://develop.svn.wordpress.org/trunk@54211 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
No open projects
Development

No branches or pull requests