Skip to content

Update to Gutenberg 20.6.0#263

Merged
jsnajdr merged 5 commits intotrunkfrom
update/gutenberg-20.6.0
Jun 12, 2025
Merged

Update to Gutenberg 20.6.0#263
jsnajdr merged 5 commits intotrunkfrom
update/gutenberg-20.6.0

Conversation

@jsnajdr
Copy link
Member

@jsnajdr jsnajdr commented Jun 6, 2025

This PR updates the isolated editor to Gutenberg 20.6.0. It's going to be used by P2 and deployed on WP.com.

There are several kinds of changes:

  • update the @wordpress/* NPM dependencies to latest versions. From these especially @wordpress/interface is relevant because its code is directly bundled with the isolated editor code.
  • update the private API consent string from the "I know..." declaration to "I acknowledge..."
  • plenty of CSS class name changes. The isolated editor "recreates" a lot of Post Editor UI by creating divs with Core class names. When these get updated, the ISO editor needs to update them, too. A typical change here is from .edit-post to .editor, for example .edit-post-text-editor to .editor-text-editor. But there are others that were discovered during testing.
  • ComplementaryArea no longer has the smallScreenTitle prop and we're removing it here, too (Editor Interface: Remove small header from global styles/plugin sidebar WordPress/gutenberg#64474)
  • many CSS overrides need to be subtly changed or removed.

@jsnajdr jsnajdr self-assigned this Jun 6, 2025
Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsnajdr it's been a while since I worked with this repo. It would be nice to add some step-by-step testing instructions. Especially considering that we want to build and test on p2 on wpcom.

@mirka
Copy link
Member

mirka commented Jun 9, 2025

Repo-wise, which things should we expect to be (still) broken? 😅 I just unblocked the CI failures at a very basic level in #264, but even after that, Storybook/E2E seems to be broken on trunk.

In this PR branch, at least locally:

  • I get a ReferenceError: TextDecoder is not defined error for yarn test.
  • Storybook does not boot successfully, meaning I can't run E2E tests.

@mirka
Copy link
Member

mirka commented Jun 9, 2025

Ok, there's still some kind of error in fork-ts-checker-webpack-plugin/lib/patchTypescript.js, but Storybook and E2E tests seem to be working again after #265.

@jsnajdr
Copy link
Member Author

jsnajdr commented Jun 10, 2025

@tyxla @mirka Apologies for not adding enough context: everything that is in this PR is already deployed on WP.com, in bundled and minified form. Here I'm merely committing the source code changes.

In a sense, the WP.com/P2 deployment is what really matters. The Storybook/e2e failures in this repo are sad, we can spend some timeboxed effort trying to fix them, but at the end of the day they won't prevent us from merging this PR. It contains changes that are already tested and deployed elsewhere, and we can't just throw them away.

@jsnajdr jsnajdr force-pushed the update/gutenberg-20.6.0 branch from 62e7821 to fa1a024 Compare June 10, 2025 08:42
@tyxla
Copy link
Member

tyxla commented Jun 10, 2025

Makes sense @jsnajdr. Do you think we can fix those type errors before merging though?

@jsnajdr
Copy link
Member Author

jsnajdr commented Jun 10, 2025

Do you think we can fix those type errors before merging though?

I hope so! I was able to fix the TextDecoder error, it's a Jest polyfill that we already do in Gutenberg. Then there were SCSS errors from webpack build, and upgrade of the webpack-related packages fixed that. Now the next failure are the type errors...

@jsnajdr
Copy link
Member Author

jsnajdr commented Jun 10, 2025

OK, the TypeScript errors are fixed, now the only thing that fails are the e2e tests.

@tyxla
Copy link
Member

tyxla commented Jun 11, 2025

OK, the TypeScript errors are fixed, now the only thing that fails are the e2e tests.

I wonder if we should spend some time looking at those, too. The errors seem like something relatively major is missing:

374cd0b4ddc9f020088f8c09bd2d007c18147e2f

@jsnajdr
Copy link
Member Author

jsnajdr commented Jun 12, 2025

I wonder if we should spend some time looking at those, too. The errors seem like something relatively major is missing:

Oh, something is very wrong with Storybook. I'm trying to upgrade it to the same version as used in Gutenberg.

@jsnajdr
Copy link
Member Author

jsnajdr commented Jun 12, 2025

I upgraded Storybook and now the CI check is all green 🎉 🚀 🕺

@tyxla
Copy link
Member

tyxla commented Jun 12, 2025

Good to hear! Let's ship this, unless @mirka has any remaining concerns.

@jsnajdr jsnajdr merged commit cf0d664 into trunk Jun 12, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments