Make WordPress Core

Opened 6 months ago

Closed 4 months ago

#60315 closed task (blessed) (fixed)

Editor: Update the WordPress packages to the latest versions for 6.5

Reported by: youknowriad's profile youknowriad Owned by: desrosj's profile desrosj
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Editor Keywords: has-patch has-unit-tests fixed-major commit dev-reviewed
Focuses: Cc:

Description

This ticket tracks updates to @wordpress npm packages for 6.5 release.

Change History (90)

This ticket was mentioned in PR #5922 on WordPress/wordpress-develop by @youknowriad.


6 months ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/60315

This PR is going to represent the initial packages update commit for 6.5 to bring all the latest updates from the Gutenberg repository. We will most likely discover shortcomings or requirements that need to be backported within this PR or prior to this PR.

Requirements

  • [ ] The interactivity package and the view scripts need to be built and registered as ES modules.
  • [ ] The navigation block uses an external class that needs to be moved to the block-library package. In progress here https://github.com/WordPress/gutenberg/pull/57979
  • [ ] The preferences package has a dedicate style handle that need to be registered properly

@youknowriad commented on PR #5922:


6 months ago
#2

Hey @luisherranz When update the packages, I was forced to update the build config for the Interactivity API related code because these are meant to be esmodules now. I made some incomplete tweaks so far.

  • For example, I don't see the src/wp-includes/blocks/*/view.js files for some reason
  • I'm guessing we also need to add some php code to the script loader of WordPress to "auto register" the modules (the view scripts and the interactivity package so far).
  • Also, I added a new webpack config file to core that is specific to the packages that are written as modules, I'm assuming the interactivity package is just the first one and probably not the last

@luisherranz commented on PR #5922:


6 months ago
#3

I'll take a look. Thanks, @youknowriad!

@luisherranz commented on PR #5922:


6 months ago
#4

This is a preliminary fix to bundle and register the new Interactivity API modules: https://github.com/WordPress/wordpress-develop/commit/8a06712e29803926237504c814637074f90d32fc

  • It contains a new file called interactivity-api.php which should be removed once the backport for the WP_Interactivity_API class lands. I'll remove it in the backport itself.
  • It contains some extra hardcoded code in the Webpack files due to the fact that the build-module output of the Interactivity API packages still contains React's JSX pragma instead of Preact's. @sirreal is working on that.
  • The @wordpress/interactivity-router package is not working yet. I'll look into it and I'll report back.

@jonsurrell commented on PR #5922:


6 months ago
#5

  • It contains some extra hardcoded code in the Webpack files due to the fact that the build-module output of the Interactivity API packages still contains React's JSX pragma instead of Preact's. @sirreal is working on that.

PR with short-term fix is here: https://github.com/WordPress/gutenberg/pull/58258

@luisherranz commented on PR #5922:


6 months ago
#6

  • The @wordpress/interactivity-router package is not working yet. I'll look into it and I'll report back.

https://github.com/WordPress/wordpress-develop/commit/5c8c5afbed97e4e1dbd37de0b0f30f3bd3609545 solves the problem with the router, but this fix needs to wait until this PR is committed because without the caniuselite package update, Webpack refuses to bundle:

It also uncovered a bug when @wordpress/interactivity-router is imported statically that we will solve in Gutenberg.

@youknowriad commented on PR #5922:


6 months ago
#7

Anyone know why the phpunit are failing on some php versions? Did we use some unsupported syntax or something? I'm having hard time reading the job jobs.

@peterwilsoncc commented on PR #5922:


6 months ago
#8

Anyone know why the phpunit are failing on some php versions? Did we use some unsupported syntax or something? I'm having hard time reading the job jobs.

It looks like some of the jobs are hitting the 20 minute timeout limit and getting abandoned.

https://github.com/WordPress/wordpress-develop/blob/cc645160ab91289af4ebc036956be71a582d8595/.github/workflows/phpunit-tests-run.yml#L79

@youknowriad Maybe try bumping the value on this branch to 30 minutes to see if it helps. It shouldn't but me know if it causes issues running the workflows.

@youknowriad commented on PR #5922:


6 months ago
#9

@peterwilsoncc I increased the timeout to 30mn and still seeing similar issues at roughly the same moment (20mn)

@youknowriad commented on PR #5922:


6 months ago
#10

@costdev I think most of these changes need to be part of a follow-up because these files are copied as is from Gutenberg so I can't make the changes here. So this would require a follow-up package update. That said, I'm going to try to ping the right people responsible for each of these changes in order to make the changes upstream.

@get_dave commented on PR #5922:


6 months ago
#11

@ockham @tjcafferkey Are you able to take a look at the review comments regarding Navigation block (ref: https://github.com/WordPress/gutenberg/pull/57754/)?

@youknowriad commented on PR #5922:


6 months ago
#12

With the increased timeout, the tests are starting to pass. Here's my suggested plan:

Given that this PR is kind of mandatory for 6.5 and a requirements for other backports to land, we need to try and land it quickly to prevent any potential delays in Beta1 later. So I suggest that we merge the PR with the timeout increase in the tests given that the performance tests don't show any regression in terms of real user WordPress performance.

That said, it's still concerning to me that the tests are so slow with this patch and I'll create a follow-up trac ticket that we'll have to address and identify the problematic change before beta1 while still allowing follow-up backports to happen in the meantime.

@get_dave commented on PR #5922:


6 months ago
#13

What @youknowriad suggests seems logical to me, especially if performance tests don't suggest major regressions that a user would experience.

We should not block the packages sync but be sure to followup _in short order_ with debugging _why_ the PHP tests have required a increased timeout.

In terms of performance, looking at the diff I’m suspicious of the PHP changes to the Navigation and Navigation Link blocks.

There have been two major changes:

There was also https://github.com/WordPress/gutenberg/pull/57979 but that just moved all existing rendering code into a class so that's probably the least likely source.

We should start investigating those. Any suggestions for workflows to validate before/after would be greatly appreciated.

@youknowriad commented on PR #5922:


6 months ago
#14

@getdave That's good starting point.

The test run fails for some versions even with 60mn of timeout, basically I think we'd need something like 70mn for all the tests to pass. It's a lot. Let's give it one more day before committing this and in the mean time, let's try to comment some of that suspicious code you just shared to see if we find anything.

@get_dave commented on PR #5922:


6 months ago
#15

Let's give it one more day before committing this and in the mean time, let's try to comment some of that suspicious code you just shared to see if we find anything.

60 minutes seems excessive. It would be good to try a little bit more debugging first.

I'll try a fork which removes the changes to Nav files so we can rule those changes in/out.

@get_dave commented on PR #5922:


6 months ago
#16

Folks I think the culprit is the Navigation Link block file src/wp-includes/blocks/navigation-link.php. Specifically changes made in this PR https://github.com/WordPress/gutenberg/pull/54801/.

You can see that on my fork of this packages sync PR I have reverted the synced changes introduced to src/wp-includes/blocks/navigation-link.php and all the Unit Tests run successfully.

I suspect that these two lines need to be looked at carefully.

@desrosj commented on PR #5922:


6 months ago
#18

@getdave Thanks for the update above! I missed it while performing my review. Just wanted it clear that my feedback was given without your new context, so read it with that lens.

@youknowriad commented on PR #5922:


6 months ago
#19

With the last commit, I was able to add a code to the bootstrap of the php unit tests to unregister the problematic hooks. Now the tests run properly.

This is going to help us unblock this PR while we work on the different follow-ups for the next package upgrade.

#20 @youknowriad
6 months ago

In 57377:

Editor: Update the WordPress packages to the Gutenberg 16.7 RC2 version.

This patch, somewhat small brings a lot to WordPress.
This includes features like:

  • DataViews.
  • Customization tools like box shadow, background size and repeat.
  • UI improvements in the site editor.
  • Preferences sharing between the post and site editors.
  • Unified panels and editors between post and site editors.
  • Improved template mode in the post editor.
  • Iterations to multiple interactive blocks.
  • Preparing the blocks and UI for pattern overrides.
  • and a lot more.

Props luisherranz, gziolo, isabel_brison, costdev, jonsurrell, peterwilsoncc, get_dave, antonvlasenko, desrosj.
See #60315.

#21 @youknowriad
6 months ago

I'm leaving this ticket open because there are a number of follow-ups that are yet to be addressed.

  • There are some functions that have been removed without deprecation (raised by @desrosj)
  • We need to update the way the navigation link registers the variations to avoid potential performance issues in unit tests. (currently being addressed by @gaambo and @get_dave

There are also some minor code styles changes that will be part of the next package upgrade.

@youknowriad commented on PR #5922:


6 months ago
#22

I went ahead and landed a first version of the package update PR in https://core.trac.wordpress.org/changeset/57377
This will unblock the other backports from the Gutenberg repository.

I've left the ticket open for follow-ups, mainly the deprecated functions and the change for the navigation link variations.

This ticket was mentioned in PR #5971 on WordPress/wordpress-develop by @youknowriad.


6 months ago
#23

Trac ticket: https://core.trac.wordpress.org/ticket/60315

Currently, Gutenberg's latest version is not compatible with WordPress trunk. The following issue triggers.

PHP Fatal error:  Cannot declare class WP_REST_Navigation_Fallback_Controller, because the name is already in use in… class-wp-rest-navigation-fallback-controller.php

This issue is already solved in Gutenberg trunk and will be included in tomorrow's 17.6 stable release.

This changes the Gutenberg minimum compatible version number from 16.5 to 17.6. For versions older than 16.5, the plugin will deactivate when upgrading WordPress to 6.5 beta1 or newer.

Changes are done within Core's _upgrade_core_deactivate_incompatible_plugins() which is invoked during WordPress' upgrade process.

@scruffian commented on PR #5971:


6 months ago
#24

I think the correct error message should be:

PHP Fatal error: Cannot declare class WP_Navigation_Block_Renderer, because the name is already in use in plugins/gutenberg/lib/compat/wordpress-6.5/class-wp-navigation-block-renderer.php on line 16

#25 @youknowriad
6 months ago

In 57384:

Editor: Update the minimum compatible version of Gutenberg.

Previous Gutenberg versions are not compatible with recent trunk because of the
WP_Navigation_Block_Renderer classname. It's present in both.

Gutenberg has been updated to avoid the use of this class but we need to auto-disable
old plugins to avoid fatals.

Props hellofromtonya.
See #60315.

This ticket was mentioned in PR #5984 on WordPress/wordpress-develop by @youknowriad.


6 months ago
#27

  • Keywords has-unit-tests added

Trac ticket: https://core.trac.wordpress.org/ticket/60315

This PR updates the WordPress packages to the latest version (which is current Gutenberg 17.6 RC3)
It brings with a set of iterations and follow-ups to the initial PR #30428
It also fixes a regression that happened for interactive blocks.

@youknowriad commented on PR #5922:


6 months ago
#28

closing this one now, follow-up here #5984

@gziolo commented on PR #5984:


6 months ago
#29

There are some remaining comments I left, but they aren't blockers for this PR.

#30 @youknowriad
6 months ago

In 57499:

Editor: Update WordPress packages to Gutenberg 16.7 RC3.

It brings with a set of iterations and follow-ups to the initial package update.
It also fixes a regression that happened for interactive blocks.

Props gziolo, luisherranz, cbravobernal.
See #60315.

This ticket was mentioned in PR #6077 on WordPress/wordpress-develop by @youknowriad.


6 months ago
#32

Trac ticket: https://core.trac.wordpress.org/ticket/60315

Updates the WordPress packages with the one included with the Gutenberg 17.7 RC1 release. This is very close to what we'll have for WordPress 6.5 beta1.

@youknowriad commented on PR #6077:


6 months ago
#33

Going to land this to let people test WordPress trunk with the latest Gutenberg over the weekend prior to beta 1.

#34 @youknowriad
6 months ago

In 57578:

Editor: Update the WordPress packages to Gutenberg 17.7RC1.

This brings the latest and greatest from Gutenberg.
The full changelog is available here
https://github.com/WordPress/gutenberg/releases/tag/v17.7.0-rc.1

Props youknowriad, get_dave.
See #60315.

This ticket was mentioned in PR #6104 on WordPress/wordpress-develop by @youknowriad.


5 months ago
#36

Trac ticket: https://core.trac.wordpress.org/ticket/60315

Updates the WordPress packages with the one included with the latest bug fixes from Gutenberg. This is probably the latest package update for WP 6.5 beta1.

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/58964

#37 @youknowriad
5 months ago

In 57619:

Editor: Update Packages with the latest bug fixes for 6.5 beta1.

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/58964

Props youknowriad, get_dave.
See #60315.

This ticket was mentioned in PR #6142 on WordPress/wordpress-develop by @get_dave.


5 months ago
#39

Trac ticket: https://core.trac.wordpress.org/ticket/60315

Updates the WordPress packages with the one included with the latest bug fixes from Gutenberg. This is probably the latest package update for WP 6.5 Beta 2

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59197

@youknowriad commented on PR #6142:


5 months ago
#40

This is testing well for me so far.

#41 @youknowriad
5 months ago

In 57663:

Editor: Update Packages with the latest bug fixes for 6.5 beta 2.

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59197

Props youknowriad, get_dave.
See #60315.

This ticket was mentioned in PR #6146 on WordPress/wordpress-develop by @youknowriad.


5 months ago
#43

Trac ticket: https://core.trac.wordpress.org/ticket/60315

Updates the WordPress packages with the one included with the latest bug fixes from Gutenberg. This is the latest package update for WP 6.5 Beta 2.

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59208

These PRs were missed by the script in the initial backport.

#44 @youknowriad
5 months ago

In 57669:

Editor: Update Packages with the latest bug fixes for 6.5 beta 2 (Round 2).

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59208

See #60315.

This ticket was mentioned in PR #6190 on WordPress/wordpress-develop by @get_dave.


5 months ago
#46

Sync Gutenberg to WP Core for WordPress 6.5 Beta 3

Trac ticket: https://core.trac.wordpress.org/ticket/60315

@get_dave commented on PR #6190:


5 months ago
#47

Noticing missing files. Investigating.

@get_dave commented on PR #6190:


5 months ago
#48

@swissspidy @dream-encode @youknowriad Gutenberg packages update for Beta 3.

@get_dave commented on PR #6190:


5 months ago
#49

I tested this both with and without the latest Gutenberg Plugin active and I noticed no errors.

I also verified a few of the bug fixes without the Gutenberg Plugin active to ensure the updates had been carried across.

@youknowriad commented on PR #6190:


5 months ago
#50

Looking good to me as well.

#51 @youknowriad
5 months ago

In 57721:

Editor: Update Packages with the latest bug fixes for 6.5 beta 3

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59394/

Props get_dave, youknowriad.
See #60315.

This ticket was mentioned in PR #6218 on WordPress/wordpress-develop by @youknowriad.


5 months ago
#53

Sync Gutenberg to WP Core for WordPress 6.5 RC 1. Based on this PR in the Gutenberg repo:

@youknowriad commented on PR #6218:


5 months ago
#54

@getdave yes, the patch for that one is ready to. @swissspidy is just waiting for the current package update to land first.

#55 @youknowriad
5 months ago

In 57760:

Editor: Update Packages with the latest bug fixes for 6.5 RC 1

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59541/

Props get_dave, youknowriad, talldanwp.
See #60315.
Fixes #60665.

This ticket was mentioned in PR #6253 on WordPress/wordpress-develop by @get_dave.


5 months ago
#57

Packages update for the WP 6.5 RC2 release.

Based on https://github.com/WordPress/gutenberg/pull/59756

Trac ticket: https://core.trac.wordpress.org/ticket/60315

@get_dave commented on PR #6253:


5 months ago
#58

@ockham Pinging you here to check the changes to Navigation are as expected based on your fix for the entities issue that was uncovered during RC 1 🙏

Also @youknowriad @dream-encode @swissspidy

@Bernhard Reiter commented on PR #6253:


5 months ago
#60

@ockham Pinging you here to check the changes to Navigation are as expected based on your fix for the entities issue that was uncovered during RC 1 🙏

Confirming that it's fixed 🎉

https://github.com/WordPress/wordpress-develop/assets/96308/9f890606-1a26-4ad9-8e58-e6c05b6432bf

@youknowriad commented on PR #6253:


5 months ago
#61

The performance job seem to be failing, I doubt that it's limited to this PR but do we know anything about that?

@get_dave commented on PR #6253:


5 months ago
#62

Downloading update from https://wordpress.org/wordpress-6.1.1.zip...

Seems to be related to Docker unable to download this.

@get_dave commented on PR #6253:


5 months ago
#63

I'm re-publishing the @wordpress/* packages and will sync this branch up shortly.

@youknowriad commented on PR #6253:


5 months ago
#64

We should also remove the pattern overrides code in this PR I think.

@get_dave commented on PR #6253:


5 months ago
#65

Packages were published and I've updated this PR to reflect the changes there.

@get_dave commented on PR #6253:


5 months ago
#66

Performance tests are failing due to errors during environment setup. Latest one is that it cannot download:

https://downloads.wordpress.org/plugin/wordpress-importer.0.8.2.zip...

The link goes to 404.

@swissspidy commented on PR #6253:


5 months ago
#67

@getdave That's just GitHub accidentally including the dots in the link. The actual download is https://downloads.wordpress.org/plugin/wordpress-importer.0.8.2.zip without dots, and that works.

#68 @youknowriad
5 months ago

In 57814:

Editor: Update Packages with the latest bug fixes for 6.5 RC 2

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59756/

Props get_dave, swissspidy, bernhard-reiter, youknowriad.
See #60315.

@get_dave commented on PR #6253:


5 months ago
#69

Tests are ✅ Please can we now commit this?

@swissspidy commented on PR #6253:


5 months ago
#70

I think @youknowriad just did in https://core.trac.wordpress.org/changeset/57814, so closing

#71 @swissspidy
5 months ago

In 57816:

Editor: Update Packages with the latest bug fixes for 6.5 RC 2

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59756/

Reviewed by swissspidy.
Merges [57814] to the to the 6.5 branch.

Props get_dave, swissspidy, bernhard-reiter, youknowriad.
See #60315.

This ticket was mentioned in Slack in #core-editor by isabelbrison. View the logs.


4 months ago

This ticket was mentioned in PR #6288 on WordPress/wordpress-develop by @get_dave.


4 months ago
#73

Packages sync for WP 6.5 RC 3.

Contains all changes from https://github.com/WordPress/gutenberg/pull/59949

Trac ticket: https://core.trac.wordpress.org/ticket/60315

@get_dave commented on PR #6288:


4 months ago
#74

Noting that there were some errors encountered on the Github Action when publishing the NPM packages. After investigation these appear to be have been non-critical.

As a precaution I've manually compared the packages published against the changes in the Gutenberg Cherry Pick PR and they marry up nicely.

@youknowriad @swissspidy @dream-encode Let's make sure to give this extra careful testing 🙏

@youknowriad commented on PR #6288:


4 months ago
#75

This is looking good to me.

#76 @youknowriad
4 months ago

In 57851:

Editor: Update Packages with the latest bug fixes for 6.5 RC 3

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59949/

Props get_dave, youknowriad.
See #60315.

#78 @gziolo
4 months ago

  • Keywords dev-reviewed added

Code changes look good. I will take care of backporting to 6.5 branch.

#79 follow-up: @gziolo
4 months ago

In 57852:

Editor: Update Packages with the latest bug fixes for 6.5 RC 3

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59949/

Props get_dave, youknowriad, gziolo.
Reviewed by youknowriad.
Merges [57851] to the 6.5 branch.
See #60315.

#80 in reply to: ↑ 79 @o44czp8oqy
4 months ago

Replying to gziolo:

In 57852:

Editor: Update Packages with the latest bug fixes for 6.5 RC 3

It includes all the backports from this Gutenberg PR https://github.com/WordPress/gutenberg/pull/59949/

Props get_dave, youknowriad, gziolo.
Reviewed by youknowriad.
Merges [57851] to the 6.5 branch.
See #60315.


Thanks

Last edited 4 months ago by o44czp8oqy (previous) (diff)

This ticket was mentioned in Slack in #core by desrosj. View the logs.


4 months ago

@get_dave commented on PR #6328:


4 months ago
#83

cc @swissspidy @dream-encode @desrosj @youknowriad

@get_dave commented on PR #6328:


4 months ago
#84

⚠️ I have yet to test these changes. I will endeavour to do so first thing tomorrow UTC+0.

#85 @desrosj
4 months ago

  • Owner set to desrosj
  • Resolution set to fixed
  • Status changed from assigned to closed

In 57888:

Editor: Merge Editor bug fixes ahead of 6.5 RC4.

This merges several high priority bug fixes for the editor ahead of WordPress 6.5:

Props youknowriad, annezazu, mcsf, jsnajdr, mmaattiiaass, get_dave, scruffian, mikachan, grantmkin, andraganescu, scruffian, antosguillamot, fabiankaegy, huzaifaalmesbah, krupajnanda, colorful-tones, liviopv, mamaduka, kim88, poena, peterwilsoncc, wildworks, swissspidy, desrosj, jorbin.
Fixes #60315.

#86 @desrosj
4 months ago

  • Keywords fixed-major dev-feedback commit added; dev-reviewed removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening to merge [57888] to 6.5.

#88 @jorbin
4 months ago

[57888] looks good for backport to the 6.5 branch

#89 @swissspidy
4 months ago

  • Keywords dev-reviewed added; dev-feedback removed

#90 @swissspidy
4 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 57891:

Editor: Merge Editor bug fixes ahead of 6.5 RC4.

This merges several high priority bug fixes for the editor ahead of WordPress 6.5:

Reviewed by jorbin, swissspidy.
Merges [57888] to the 6.5 branch.

Props youknowriad, annezazu, mcsf, jsnajdr, mmaattiiaass, get_dave, scruffian, mikachan, grantmkin, andraganescu, scruffian, antosguillamot, fabiankaegy, huzaifaalmesbah, krupajnanda, colorful-tones, liviopv, mamaduka, kim88, poena, peterwilsoncc, wildworks, swissspidy, desrosj, jorbin.
Fixes #60315.

Note: See TracTickets for help on using tickets.