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: Synchronize PHP changes for WordPress 6.3 release #51077

Closed
ramonjd opened this issue May 30, 2023 · 45 comments
Closed

Plugin: Synchronize PHP changes for WordPress 6.3 release #51077

ramonjd opened this issue May 30, 2023 · 45 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

@ramonjd
Copy link
Member

ramonjd commented May 30, 2023

The issue tracks changes to PHP files that (might) need to be backported and merged to Core for the WordPress 6.3 release. The list is exhaustive so it may cover multiple PRs and experimental changes that won't be in 6.3.

Beta 1 is June 27, 2023

Tips 👀

This is a living document and will be constantly updated as we approach beta. Sorry if you were mistakenly pinged! If a file or files have already been backported, please tick them off and link to the backport PR/trac issue.

Or, if the changes are not slated for WordPress 6.3, you can strike them or make a comment in this issue. Thank you! 🙇


PRs to be backported will have the "Needs PHP backport" label applied.
Screenshot 2023-06-05 at 10 47 22 am

📁 lib

📄 class-wp-theme-json-gutenberg.php

📄 global-styles-and-settings.php

📄 blocks.php

📄 class-wp-duotone-gutenberg.php


📁 block-supports

📄 duotone.php

📄 elements.php

📄 layout.php

📄 settings.php

📄 shadow.php

📄 typography.php


📁 lib/compat/wordpress-6.3

📄 blocks.php

footnotes.php

class-gutenberg-navigation-fallback.php

block-patterns.php

📄 get-global-styles-and-settings.php

📄 class-gutenberg-rest-blocks-controller.php

📄 class-gutenberg-rest-templates-controller-6-3.php

📄 class-gutenberg-rest-global-styles-controller-6-3.php

📄 class-gutenberg-rest-global-styles-revisions-controller-6-3.php

navigation-fallback.php

📄 rest-api.php

class-gutenberg-rest-block-patterns-controller-6-3.php

📄 get-global-styles-and-settings.php

📄 navigation-block-preloading.php

📄 class-gutenberg-rest-global-styles-controller-6-3.php

📄 script-loader.php

📄 theme-previews.php

📄 link-template.php

📄 rest-api.php

📄 class-gutenberg-rest-global-styles-revisions-controller.php


📁 lib/experimental

📄 block-editor-settings.php

📄 class-wp-classic-to-block-menu-converter.php

📄 class-wp-navigation-fallback-gutenberg.php (Moved to /compat/6-3)

📄 class-wp-rest-navigation-fallback-controller.php (Moved to /compat/6-3)

📄 editor-settings.php

📄 rest-api.php

📄 kses.php

📄 navigation-fallback.php


📁 packages/style-engine

📄 packages/style-engine/class-wp-style-engine.php


🚧 Contingent features

The following are features that may or may not be shipped with 6.3.

Fonts library and fonts API (won't be shipped)

@mrfoxtalbot mrfoxtalbot added the [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. label Jun 4, 2023
@mrfoxtalbot
Copy link

I have added the "[Type] Tracking Issue" label @ramonjd. If this is incorrect, please feel free to change it.

@ramonjd ramonjd changed the title [WIP] Plugin: Backport PHP changes for WordPress 6.3 release Plugin: Backport PHP changes for WordPress 6.3 release Jun 5, 2023
@oandregal
Copy link
Member

oandregal commented Jun 5, 2023

Created backport PR and trac ticket for gutenberg_get_remote_theme_patterns (#49307 and #50597). It was duplicated in the description, so I've also consolidated it in a single place.

@oandregal
Copy link
Member

Removed #50596 from the list, as it only moves code around for gutenberg purposes.

@oandregal
Copy link
Member

Prepared backport PR and trac ticket for #49807 | Trac ticket | Core backport PR

@aristath
Copy link
Member

aristath commented Jun 6, 2023

Prepared #48711 | Trac ticket | Core backport PR

@oandregal
Copy link
Member

#50527 and #50366 go together in the same backport PR (updated the issue description accordingly): Trac ticket | WordPress/wordpress-develop#4556

@talldan
Copy link
Contributor

talldan commented Jun 7, 2023

There were a few entries for the Details block that I've crossed and checked off. My understanding is that there's no backporting to do as new blocks are automatically copied across, and this particular block doesn't depend on any 'library' code.

The PR that introduced that block also touched the editor-settings.php file, but the code there has since been removed (it was for the experiment toggle).

@Mamaduka
Copy link
Member

Mamaduka commented Jun 7, 2023

Thanks for the ping, @ramonjd!

I think we can remove both #50310 and #50062 from the backport list. Those PRs just move files around for plugin overrides. I've double-checked #50310, and it doesn't touch anything in compat\wordpress-6.3 directory.

@ramonjd
Copy link
Member Author

ramonjd commented Jun 7, 2023

I think we can remove both #50310 and #50062 from the backport list.

Thanks, @Mamaduka

I've removed them 🙇

@ramonjd ramonjd added the Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts label Jun 8, 2023
@ntsekouras
Copy link
Contributor

ntsekouras commented Jun 8, 2023

I created #51340 to remove the pattern directory endpoint, as is not being used right now. It was preparatory work for another PR, that we might not pursue right now. Additionally I removed the respective PR from this issue's description.

@ramonjd ramonjd changed the title Plugin: Backport PHP changes for WordPress 6.3 release Plugin: Synchronize PHP changes for WordPress 6.3 release Jun 12, 2023
@oandregal
Copy link
Member

I marked #51100 as done: this PR removed dead code that was not being used.

@oandregal
Copy link
Member

Marked #48077 as done: this PR simply moved code around from 6.2 to 6.3 folder.

@tellthemachines
Copy link
Contributor

I removed #50364 from the list because it was a plugin-only change.

@t-hamano
Copy link
Contributor

I have tied a new #51397 to class-wp-duotone-gutenberg.php. I also deleted one of the class-wp-duotone-gutenberg.php sections because it was duplicated.

@westonruter
Copy link
Member

Note that there is an existing Trac ticket (Core-58323) which was closed when I applied the same changes to non-Gutenberg files in core. Can I just reuse that ticket to reference when backporting the changes from Gutenberg files?

@ramonjd
Copy link
Member Author

ramonjd commented Jun 15, 2023

Can I just reuse that ticket to reference when backporting the changes from Gutenberg files?

Thanks @westonruter! I reckon so. So long as there's a trail to inform future archaeologists about the changes. Thank you!

@MaggieCabrera
Copy link
Contributor

I'm working on backporting the duotone changes over here. @glendaviesnz @aaronrobertshaw @t-hamano I will include your changes in there, most probably

@oandregal
Copy link
Member

oandregal commented Jun 15, 2023

I looked at backporting #48078 as Jorge is not around and found the following:

#48078 is a follow-up to #45215 which introduced revisions for templates and template parts. The corresponding trac ticket is https://core.trac.wordpress.org/ticket/57704#comment:4 That work uncovered a bug in the REST API endpoint for templates/template parts that is listed at https://core.trac.wordpress.org/ticket/56922 and it was a blocker for getting this work merged in 6.2. It seems that it is still a blocker for 6.3, so none of the PRs can be backported yet.

I updated the issue description to have both PRs together and added myself and Andrei as "points of contact".

@cbravobernal
Copy link
Contributor

All Interactivity API and Behaviors's backports will not land in 6.3 to wait for more user testing. I've strikethrough them. Once I've updated the code not to be in 6.3 folder, I guess we will be able to remove them from the tracking issue.
@tellthemachines , @ramonjd , feel free to remove them earlier if you feel more comfortable with it.

Sorry for the inconveniences!! 🙇

@ramonjd
Copy link
Member Author

ramonjd commented Jun 15, 2023

Once I've updated the code not to be in 6.3 folder, I guess we will be able to remove them from the tracking issue.
@tellthemachines , @ramonjd , feel free to remove them earlier if you feel more comfortable with it.

Thanks for the heads up @c4rl0sbr4v0 👍 Will the interactivity API still be part of Gutenberg 16.1 (next week?) or will it remain experimental?

Edit: I've removed them from the issue's description 🙇

@cbravobernal
Copy link
Contributor

Will the interactivity API still be part of Gutenberg 16.1 (next week?) or will it remain experimental?

It should remain as experimental at least while the Lightbox feature is also behind the experimental flag. Which is the way to proceed so we can avoid that JS code to be included automatically to the Gutenberg packages?

@getdave
Copy link
Contributor

getdave commented Jun 16, 2023

I've raised tickets to track the Navigation Fallbacks and Navigation Preloading cc @scruffian and @draganescu.

@MaggieCabrera
Copy link
Contributor

Backporting the theme preview changes here

@getdave
Copy link
Contributor

getdave commented Jun 16, 2023

@ramonjd As far as I know this feature is unused as yet. I was intended for #42605 but I still haven't managed to get around to that one for 6.3. Therefore I don't think we need to backport it. Can I scratch from the list.

@ramonjd
Copy link
Member Author

ramonjd commented Jun 19, 2023

As far as I know #47791 is unused as yet. I was intended for #42605 but I still haven't managed to get around to that one for 6.3. Therefore I don't think we need to backport it. Can I scratch from the list.

Thanks for the heads up, @getdave - I've removed from list. Since it's in experimental and there are no sideeffects for Gutenberg 16.1 (release candidate coming up at the end of this week) I think it's okay to remove.

@andrewserong
Copy link
Contributor

Quick update on the layout definitions backport: I have a (mostly) working backport open in WordPress/wordpress-develop#4624 with passing tests. It'll need to be rebased likely a few times as other backports land before it (i.e. once compound class names are backported from #47952, the expected strings in the tests will need to be updated). When it comes to layout, I imagine this will be the final backport to land, as it'll need to be merged at a similar time to the JS packages update so that both the JS and PHP behaviour are consistent. Let me know if that causes any issues, though! I'll continue rebasing the backport PR as needed.

@tellthemachines
Copy link
Contributor

tellthemachines commented Jun 19, 2023

I have the following PRs up for the remaining layout-related backports:

WordPress/wordpress-develop#4639 (committed)

WordPress/wordpress-develop#4637 (committed)

WordPress/wordpress-develop#4625 (committed)

WordPress/wordpress-develop#4623 (committed)

WordPress/wordpress-develop#4614 (committed)

@youknowriad
Copy link
Contributor

I have opened the following PR WordPress/wordpress-develop#4643 to back port all the php changes from #48893

@oandregal
Copy link
Member

#50484 is being backported at: Trac ticket | WordPress/wordpress-develop#4656

@getdave
Copy link
Contributor

getdave commented Jun 21, 2023

I added some addition items that came out of #39286.

@tellthemachines
Copy link
Contributor

I just removed #49387 from the list because it won't need to be backported until the Group grid variation becomes stable.

@youknowriad
Copy link
Contributor

#50128 #49330 are just small tweaks to the registered stylesheets in script-loader, they should be done in the package update patch.

@ramonjd
Copy link
Member Author

ramonjd commented Jun 23, 2023

are just small tweaks to the registered stylesheets in script-loader, they should be done in the package update patch.

Thanks for confirming @youknowriad ! I'll remove them

@spacedmonkey
Copy link
Member

We need to ensure that #51866 makes it's way into the Beta / package update. It is needed becuase of another commit in core.

@ramonjd
Copy link
Member Author

ramonjd commented Jun 26, 2023

We need to ensure that #51866 makes it's way into the Beta / package update. It is needed becuase of another commit in core.

Thanks! Earmarked for the Beta backport. Will be cherry-picked along with the rest

Edit: Added in:

@ramonjd
Copy link
Member Author

ramonjd commented Jun 27, 2023

Anyone who is listening, thanks to all who were in involved for your hard work on these backport patches 🍺

@spacedmonkey
Copy link
Member

Backport from core to gutenberg
WordPress/wordpress-develop#4735
#52045

@spacedmonkey
Copy link
Member

Backport from core to gutenberg
WordPress/wordpress-develop@a13f896
#45831

@westonruter
Copy link
Member

It seems like the File and Navigation blocks have Gutenberg-specific code (including gutenberg_-prefixed functions) which were mistakenly committed to core? Is at least more prefix rewriting needed à la #51989? See #50906 (comment).

@ramonjd
Copy link
Member Author

ramonjd commented Jul 12, 2023

It seems like the File and Navigation blocks have Gutenberg-specific code (including gutenberg_-prefixed functions) which were mistakenly committed to core?

Noted here as well: #52103 (comment)

They have been removed in Gutenberg trunk

Fact check.. they were reintroduced to GB yesterday: af38c95

cc @tellthemachines

I'm still unsure why code within IS_GUTENBERG_PLUGIN conditions, including those conditions, should be in Core at all.

Edit: IS_GUTENBERG_PLUGIN ensures that the code won't run so in a practical sense it doesn't really matter, but the argument can be made that if the code is dead, why include it?

Another edit: @westonruter's filter approach might be a good compromise?

@tellthemachines
Copy link
Contributor

IS_GUTENBERG_PLUGIN ensures that the code won't run so in a practical sense it doesn't really matter, but the argument can be made that if the code is dead, why include it?

The whole reason for the existence of IS_GUTENBERG_PLUGIN is to enable code to not run on core if it's not ready. We mostly need this because some files - such as PHP files from block-library package - are auto-generated in core from the package, so their code is always identical to the plugin versions.

This is also why the core webpack config sets the global here and here.

@westonruter's #52579 might be a good compromise?

For the specific case that @westonruter reports here a filter or some kind of feature flag sounds like a good solution, yes. Although a perf issue with the old Navigation block code also sounds to me like a good reason to make sure the interactivity API does get included in 6.4 😄

@spacedmonkey
Copy link
Member

This PR needs to be backported before RC1 - #52708 as it fixes https://core.trac.wordpress.org/ticket/58770

@bph
Copy link
Contributor

bph commented Aug 1, 2023

@ramonjd it seems, this tracking issue could be closed now with WordPress 6.3 RC 3 happening?

@ramonjd
Copy link
Member Author

ramonjd commented Aug 1, 2023

Since we're at the cusp of the 6.3 release I'll close this with further thanks to all folks involved.

Let it be cast into the sea of history!

@ramonjd ramonjd closed this as completed Aug 1, 2023
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