Make WordPress Core

#59411 closed task (blessed) (fixed)

Update Editor related npm packages to their latest versions for 6.4

Reported by: mikachan's profile mikachan Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.4 Priority: normal
Severity: normal Version: 6.4
Component: Editor Keywords: gutenberg-merge has-patch has-unit-tests i18n-change commit dev-reviewed
Focuses: Cc:

Description (last modified by hellofromTonya)

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

Change History (105)

#1 @mikachan
17 months ago

These tickets need to be included as part of the work for updating the npm packages for 6.4:

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


17 months ago

#3 @gziolo
17 months ago

  • Keywords Gutenberg-merge added
  • Milestone changed from Awaiting Review to 6.4
  • Version set to trunk

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


17 months ago
#4

  • Keywords has-patch has-unit-tests added

#5 @desrosj
17 months ago

  • Summary changed from Update npm packages to their latest versions for 6.4 to Update Editor related npm packages to their latest versions for 6.4

@luisherranz commented on PR #5262:


17 months ago
#6

This is a potential fix for the Warning: The build/wp-includes/js/dist/sync.js file must not contain a sourceMappingURL error until you reach @youknowriad for confirmation: https://github.com/luisherranz/wordpress-develop/commit/e38b785d8edfed7f075f5f4baa06a2a7c31a84e7

@luisherranz commented on PR #5262:


17 months ago
#7

There is a mismatch with the type of files that are enqueued in the frontend. When you run npm run build:dev or npm run dev, the file enqueued for the Interactivity API runtime is the development version (interactivity.js), which is correct, but the files enqueued for the blocks are the production version (view.min.js instead of view.js).

It looks like in trunk the files enqueued for the blocks are also the production version, so it's not something we introduced. But we need to fix it. I'll try to locate where those enqueues happen.

On the other hand, I've manually copied the files and they work fine when they match (both are development or both are production), so the new Webpack configuration seems to have worked well and I don't think we'll need to make any further adjustments.

@luisherranz commented on PR #5262:


17 months ago
#8

It looks like in trunk the files enqueued for the blocks are also the production version, so it's not something we introduced. But we need to fix it. I'll try to locate where those enqueues happen.

It looks like those files are hardcoded in the `block.json`:

"viewScript": "file:./view.min.js",

So for the moment, instead of honoring the development/production mode, let's always enqueue the production version of the Interactivity API runtime to match what the blocks are doing.

@mikachan, you can cherry-pick this commit to fix this: https://github.com/luisherranz/wordpress-develop/commit/facb976a29a5d968031558c27845daea5b480a1a

@luisherranz commented on PR #5262:


17 months ago
#9

These two files can be removed now because the view-modal.js file doesn't exist anymore:

  • src/wp-includes/blocks/navigation/view-modal.asset.php
  • src/wp-includes/blocks/navigation/view-modal.min.asset.php

Apart from that, the new Webpack configuration is adding two unnecessary files to the js/dist folder:

  • src/wp-includes/js/dist/interactivity.asset.php
  • src/wp-includes/js/dist/interactivity.min.asset.php

I guess it'd be better to delete them. We can do so using this: https://github.com/luisherranz/wordpress-develop/commit/9ad3846ef8a4fc2bdf97b925967db51d19fe4b52

@mikachan commented on PR #5262:


17 months ago
#10

Thanks everyone for all the help here.

I think I've cherry-picked all the changes you mentioned, @luisherranz. The sync script is now running successfully 🎉, but I know we need a fresh GB 16.7 RC as well. I can cherry-pick the new GB PRs and trigger a build as soon as all the needed changes are merged.

@gziolo commented on PR #5262:


17 months ago
#11

Looking at https://github.com/WordPress/wordpress-develop/actions/runs/6299977238/job/17101779677?pr=5262 that fails (other platforms report the same issue), it looks like it needs another run of npm run build:dev to update the asset files for JavaScript files for blocks.

---

Aside (not needed for WP 6.4): now that, the number of view scripts increased. It would be worth looking at combining those asset files into a single asset file. We do it already for packages as a performance optimization, and @jsnajdr outlined some ideas for introducing the manifest file in https://github.com/WordPress/wordpress-develop/pull/5118#issuecomment-1701015520.

@mikachan commented on PR #5262:


17 months ago
#12

Looking at https://github.com/WordPress/wordpress-develop/actions/runs/6299977238/job/17101779677?pr=5262 that fails (other platforms report the same issue), it looks like it needs another run of npm run build:dev to update the asset files for JavaScript files for blocks.

I've just ran npm run build:dev again and pushed the changes but it looks like these tests are still failing. The asset versions change every time I run npm run build:dev, should they stay the same?

@gziolo commented on PR #5262:


17 months ago
#13

It looks like CI jobs pass now. E2e testing has been failing also in trunk for quite some time so probably nothing to worry about.

@gziolo commented on PR #5262:


17 months ago
#14

I landed https://core.trac.wordpress.org/changeset/56699 with changes in webpack. It's very likely that it will force us to run npm run build:dev after rebasing with this branch.

@mikachan commented on PR #5262:


17 months ago
#15

Thanks so much again, all. 🙇 I believe I've addressed all feedback, including feedback from @felixarntz and @tellthemachines. I've also pushed the latest results from npm run build:dev, as suggested by @gziolo.

@mikachan commented on PR #5262:


17 months ago
#16

Now that the sync package is no longer included, we can remove this change.

If I run the npm run sync-gutenberg-packages -- --dist-tag=wp-6.4 script without the sync package being included in the sourcemap config, I still see this warning:

Running "verify:source-maps" task
Warning: The build/wp-includes/js/dist/sync.js file must not contain a sourceMappingURL. Use --force to continue.

I've added it back for now so we can successfully run the sync script.

@gziolo commented on PR #5262:


17 months ago
#17

Now that the sync package is no longer included, we can remove this change.

If I run the npm run sync-gutenberg-packages -- --dist-tag=wp-6.4 script without the sync package being included in the sourcemap config, I still see this warning:

Running "verify:source-maps" task
Warning: The build/wp-includes/js/dist/sync.js file must not contain a sourceMappingURL. Use --force to continue.

I've added it back for now so we can successfully run the sync script.

Sure, let's add a note with follow-up tasks. For this one specifically, my guess is that we need to list the sync packages as bundled in core, too:

https://github.com/WordPress/wordpress-develop/blob/cecc810f9170d297fbb1efe7e8439112359af8d8/tools/webpack/packages.js#L55

This is how it looks in Gutenberg:

https://github.com/WordPress/gutenberg/blob/a7a96bc13acf11cb206066f463777acd8bd1c02b/tools/webpack/packages.js#L27-L32

@mikachan commented on PR #5262:


17 months ago
#18

For this one specifically, my guess is that we need to list the sync package as bundled in core, too:

Ah, thank you! If I add the sync package to that list in wordpress-develop/tools/webpack/packages.js then I'm able to remove the sync sourcemap config as well. That runs well locally - I think that can be committed as part of this and then I think we're good to go?!

@gziolo commented on PR #5262:


17 months ago
#19

For this one specifically, my guess is that we need to list the sync package as bundled in core, too:

Ah, thank you! If I add the sync package to that list in wordpress-develop/tools/webpack/packages.js then I'm able to remove the sync sourcemap config as well. That runs well locally - I think that can be committed as part of this and then I think we're good to go?! Or maybe this file is updated via Gutenberg?

Great to hear it helps. It needs to be applied manually, unfortunately. We don't share the webpack config from Gutenberg as they differ too much.

@mikachan commented on PR #5262:


17 months ago
#20

Thanks for confirming, @gziolo! I've pushed that to this branch then, so these changes are together.

Thanks for approving, too, @tellthemachines!

This ticket was mentioned in Slack in #core-committers by karmatosed. View the logs.


17 months ago

#22 @hellofromTonya
17 months ago

#59380 was marked as a duplicate.

#24 @karmatosed
17 months ago

  • Owner set to karmatosed
  • Resolution set to fixed
  • Status changed from new to closed

In 56710:

Update editor related npm packages

The npm packages needed updating for 6.4 to the latest.

Props mikachan, mukesdpanchal27, luisherranz, youknowriad, tellthemachines, gziolo, ockham, michalczaplinski

Fixes #59411

#25 @karmatosed
17 months ago

In 56713:

Update regenerated build files.

This adds in missed generated build files from commit for [56710].

Props desrosj.
See #59411.

@hellofromTonya commented on PR #5262:


17 months ago
#26

Closing as https://core.trac.wordpress.org/changeset/56710 has committed the package updates.

@hellofromTonya commented on PR #5311:


17 months ago
#27

Closing as https://core.trac.wordpress.org/changeset/56710 has committed the package updates.

#28 @hellofromTonya
17 months ago

  • Keywords gutenberg-merge added; Gutenberg-merge has-patch has-unit-tests removed
  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Type changed from enhancement to task (blessed)

Reopening, clearing keywords, and converting into a blessed task.

Why blessed? Packages will be updated throughout the rest of the beta cycle in preparation for each beta release.

#29 @hellofromTonya
17 months ago

  • Description modified (diff)

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


17 months ago
#30

  • Keywords has-patch added

A recent batch of editor-related npm package updates for beta 1.

#31 @hellofromTonya
17 months ago

In 56728:

Editor: 2nd package updates for 6.4 Beta 1.

Round 2 of package updates for 6.4. Beta 1 which includes disabling the rendering of the Font Library in Core.

The full list of changes are found here https://github.com/WordPress/gutenberg/commit/641b696cd687051355fbea20406066e1174ffa3b.

Follow-up to [56710], [56713].

Props mikachan, mmaattiiaass, mamaduka, desrosj, ockham, hellofromTonya.
See #59411.

@hellofromTonya commented on PR #5319:


17 months ago
#32

Committed via https://core.trac.wordpress.org/changeset/56728. Thank you @Mamaduka

#33 @gziolo
17 months ago

In 56739:

General: Set the correct script version for regenerator-runtime

Follow-up for [56710]. Brings back the version specified in the package.json file.

Props ockham.
See #59411.

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


17 months ago

#35 @TobiasBg
17 months ago

[56710] leads to my plugin's block breaking, when inserting it into the block editor.
I get

This block has encountered an error and cannot be previewed.

Chrome's error log console shows

Uncaught TypeError: message.replace is not a function
    at filterMessage (a11y.js?ver=b5ff61edc2245a1950cb:153:21)
    at speak (a11y.js?ver=b5ff61edc2245a1950cb:227:13)
    at components.js?ver=954ab867bc33b1510106:69680:49
    at commitHookEffectListMount (react-dom.js?ver=18.2.0:23160:28)
    at commitPassiveMountOnFiber (react-dom.js?ver=18.2.0:24936:15)
    at commitPassiveMountEffects_complete (react-dom.js?ver=18.2.0:24901:11)
    at commitPassiveMountEffects_begin (react-dom.js?ver=18.2.0:24888:9)
    at commitPassiveMountEffects (react-dom.js?ver=18.2.0:24876:5)
    at flushPassiveEffectsImpl (react-dom.js?ver=18.2.0:27049:5)
    at flushPassiveEffects (react-dom.js?ver=18.2.0:26994:16)
filterMessage @ a11y.js?ver=b5ff61edc2245a1950cb:153
speak @ a11y.js?ver=b5ff61edc2245a1950cb:227
(anonymous) @ components.js?ver=954ab867bc33b1510106:69680
commitHookEffectListMount @ react-dom.js?ver=18.2.0:23160
commitPassiveMountOnFiber @ react-dom.js?ver=18.2.0:24936
commitPassiveMountEffects_complete @ react-dom.js?ver=18.2.0:24901
commitPassiveMountEffects_begin @ react-dom.js?ver=18.2.0:24888
commitPassiveMountEffects @ react-dom.js?ver=18.2.0:24876
flushPassiveEffectsImpl @ react-dom.js?ver=18.2.0:27049
flushPassiveEffects @ react-dom.js?ver=18.2.0:26994
performSyncWorkOnRoot @ react-dom.js?ver=18.2.0:26086
flushSyncCallbacks @ react-dom.js?ver=18.2.0:12052
commitRootImpl @ react-dom.js?ver=18.2.0:26969
commitRoot @ react-dom.js?ver=18.2.0:26692
finishConcurrentRender @ react-dom.js?ver=18.2.0:25991
performConcurrentWorkOnRoot @ react-dom.js?ver=18.2.0:25819
workLoop @ react.js?ver=18.2.0:2653
flushWork @ react.js?ver=18.2.0:2626
performWorkUntilDeadline @ react.js?ver=18.2.0:2920
react-dom.js?ver=18.2.0:18697


The above error occurred in the <Placeholder> component:

    at Placeholder (http://localhost:8001/wp-includes/js/dist/components.js?ver=954ab867bc33b1510106:69649:5)
    at div
    at edit (http://localhost:8001/wp-content/plugins/tablepress/blocks/table/build/index.js?ver=a76551f3faef1d6732c6:1:2168)
    at Edit (http://localhost:8001/wp-includes/js/dist/block-editor.js?ver=1f941e81f7f064707f6a:16442:5)
    at http://localhost:8001/wp-includes/js/dist/block-editor.js?ver=1f941e81f7f064707f6a:15565:11
[...]

So, somehow the a11y package has a problem with the <Placeholder> component, it seems?

#36 @mikachan
16 months ago

Thanks for reporting, @TobiasBg. I'm wondering if this could be related to this recently merged PR: https://github.com/WordPress/gutenberg/pull/45801. I've copied your report over to that PR to hopefully help debug this.

#37 @mikachan
16 months ago

@TobiasBg, I have some more information from a conversation over on the Gutenberg PR:

Since there is an if statement guarding that call, I wonder if the plugin is passing a value for the instructions prop that is not a string — that would explain the fact that the call to speak still gets executed, but fails because we're passing something different than a string, thus resulting in the message.replace is not a function error.

Could you please confirm if your plugin is passing a string value for the instructions prop?

#38 @TobiasBg
16 months ago

Hi @mikachan, thanks for looking into this!

I'm passing a React element wrapper, from what I remember so that I can group some strings added conditionally: https://github.com/TablePress/TablePress/blob/2.1.7/blocks/table/src/edit.js#L88-L96

#40 @karmatosed
16 months ago

In 56755:

Update npm packages to latest.

The npm packages needed a further update for beta 2 in preparation for 6.4.

Props @mmaattiiaass , @wildworks , @aaronrobertshaw, @bartkalisz, @mamaduka, @artemiosans, @youknowriad, @czapla, @richtabor, @glendaviesnz, @pbking, @cbravobernal, @madhudollu, @kevin940726, @adamsilverstein, @get_dave, @ntsekouras, @ramonopoly, @jffng, @swissspidy, @carlosgprim, @siobhyb, @mikachan.

See #59411.

#43 @karmatosed
16 months ago

In 56808:

Update npm packages to latest versions for 6.4 beta 3.

The npm packages needed a further update for beta 3 in preparation for 6.4.

Props @richtabor, @mmaattiiaass, @tellthemachines, @mamaduka, @swissspidy, @scruffian, @andraganescu, @andrewserong, @mujuonly, @get_dave, @ntsekouras, @carlosgprim, @ramonopoly, @jameskoster, @wildworks, @aaronrobertshaw, @czapla, @santosguillamot, @artemiosans, @afercia, @glendaviesnz, @kevin940726, @mikachan, @siobhyb.

See #59411.

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


16 months ago
#44

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

This is a follow-up to https://github.com/WordPress/wordpress-develop/pull/5439, as some review comments were missed just before commit.

@ramonopoly commented on PR #5441:


16 months ago
#46

I've tested the latest comments and it LGTM.

I was wondering whether, instead of trimming the last 11 chars in the event of finding [https://developer.wordpress.org/reference/functions/wp_trim_words/ &hellip;], we could use [wp_trim_words]

if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) {
                                        $excerpt_more = sprintf(
                                                /* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */
                                                __( '… <a href="%1$s" rel="noopener noreferrer">Read more<span class="screen-reader-text">: %2$s</span></a>' ),
                                                esc_url( $post_link ),
                                                esc_html( $title )
                                        );
                                        $trimmed_excerpt = wp_trim_words( $trimmed_excerpt, $excerpt_length, $excerpt_more );
                                }

But looking into it, we're doing pretty much the same thing - it can be explored in a follow up.

I will add that, while working on the translation, I found this block to be a little inconsistent in the way it presents trimmed excerpts in the editor and the frontend.

I think it's due to the priority (20) we're using when applying the filter.

### Editor

https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/6458278/e9b00c41-d3f2-4476-9c02-f094ac5b9fe5

### Frontend
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/6458278/c2a0c867-f8f6-45e6-8140-6648e59b33a4

Using 99 seems to fix it:, e.g., add_filter( 'excerpt_length', 'block_core_latest_posts_get_excerpt_length', 99 );

Related issue: https://github.com/WordPress/gutenberg/issues/33027

@isabel_brison commented on PR #5441:


16 months ago
#47

Oh, I just realised these changes are to block-library files, so they need to be done in Gutenberg and followed by another package update. We shouldn't commit this changeset to core because it will be wiped the next time the packages are built 😅 I can put up a PR!

@ramonopoly commented on PR #5441:


16 months ago
#48

I can put up a PR!

I have one here if you wanna highjack it 👍🏻

https://github.com/WordPress/gutenberg/pull/55181

@isabel_brison commented on PR #5441:


16 months ago
#49

I have one here if you wanna highjack it 👍🏻

I just did https://github.com/WordPress/gutenberg/pull/55184 lol

@isabel_brison commented on PR #5441:


16 months ago
#50

Ok closed mine and reviewed yours @ramonjd !

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


16 months ago

#53 @karmatosed
16 months ago

In 56816:

Update editor related npm packages for beta 3 second part.

The npm packages needed a second part to the update for beta 3 in preparation for 6.4.

Props talldan, ellatrix, santosguillamot, ramonopoly, andrewserong, artemiosans, isabel_brison, mikachan.

See #59411.

@mikachan commented on PR #5441:


16 months ago
#55

Thanks everyone for your help and feedback here! 🚀

#56 @kebbet
16 months ago

Missed my props on [56816], gave feedback on the translators comment for hidden accessibility text.

#61 @karmatosed
16 months ago

In 56945:

Update editor related npm packages for 6.4 RC1.

The npm packages needed a second part to the update for 6.4 RC1.

Props isabel_brison, andrewserong, jsnajdr, wildworks, joen, mciampini, tyxla, youknowriad, ramonopoly, spacedmonkey, dmsnell, mikachan, kishanjasani, czapla, siobhyb, darerodz, luisherranz

See #59411.

#63 @hellofromTonya
16 months ago

In 56961:

Editor: Bugfixes npm packages updates for 6.4 RC1.

Updates for needed bugfixes in RC1:

Follow-up to [56849], [56818], [56816].

Props artemiosans, jameskoster, SantosGuillamot, aristath, czapla, joen, afercia, richtabor, peterwilsoncc, andraganescu, hellofromTonya, siobhyb.
See #59411.

#66 @karmatosed
16 months ago

In 56987:

Update editor related npm packages for 6.4 RC2.

The npm packages needed update for 6.4 RC2.

Props siobhyb, cbravobernal, DAreRodz, luisherranz, artemiosans, afercia, jameskoster, czapla, alexstine, SantosGuillamot, ramonopoly, isabel_brison, andrewserong, jeryj, joedolson

See #59411.

#67 @hellofromTonya
16 months ago

  • Keywords dev-feedback added

Adding dev-feedback keyword for [56987] backport consideration to 6.4 branch. I'm currently reviewing the changes in the package updates.

#68 @hellofromTonya
16 months ago

  • Keywords dev-reviewed added; dev-feedback removed

The changes included in [56987] are found in https://github.com/WordPress/gutenberg/pull/55481:

  • Focus submenu button when clicked Gutenberg PR 55198 - ✅ marked as a regression, which may be due to a recent iOS change.
  • Image: Update default fullscreen icon for lightbox trigger Gutenberg PR 55463 - ✅ lightbox feature is new in 6.4.
  • Image block: wrap images with hrefs in an A tag Gutenberg PR 55470- ✅ confirmed, this is a regression introduced in 6.4 (worked in 6.3.2).
  • Image: Improve focus management in lightbox - Gutenberg PR 55428 - ✅ lightbox feature is new in 6.4.
  • Fix: Update page title when using enhanced pagination in query loop. PR 55446 - ✅ fixes a regression introduced by enhanced pagination (which was introduced in 6.4.0).

These 2 Gutenberg PRs have separate Trac tickets and do not require package updates:

@karmatosed [56987] is reviewed and ready for backporting to the 6.4 branch.

Last edited 16 months ago by hellofromTonya (previous) (diff)

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


16 months ago

#70 @karmatosed
16 months ago

In 56988:

Update editor related npm packages for 6.4 RC2.

The npm packages needed update for 6.4 RC2.

Props siobhyb, cbravobernal, DAreRodz, luisherranz, artemiosans, afercia, jameskoster, czapla, alexstine, SantosGuillamot, ramonopoly, isabel_brison, andrewserong, jeryj, joedolson.

Merges [56987] to the 6.4 branch
See #59411.

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


16 months ago
#71

  • Keywords has-unit-tests added

#72 @hellofromTonya
16 months ago

  • Keywords dev-reviewed removed

Resetting the keywords.

#73 @hellofromTonya
16 months ago

  • Keywords commit dev-reviewed added

Patch: https://github.com/WordPress/wordpress-develop/pull/5587

This PR includes the following changes for 6.4 RC3

Reviewed the patch. Ready for commit. To expedite commit ahead of RC3, also marking dev-reviewed for backport to 6.4 branch.

#74 @hellofromTonya
16 months ago

  • Keywords commit dev-reviewed removed

I hadn't realized the impacts of this change:

After a discussion in Make/Core slack, a proper fix might be possible in time for 6.4.0, negating the need to disallow enhanced pagination above.

Removing the commit and dev-feedback keywords for the patch, pending if a proper fix can happen before the next RC.

#75 @hellofromTonya
16 months ago

  • Keywords commit added

A follow-up discussion happened in Make/Core concerning the enhanced pagination. Copying here.

In reference to:
*Query Loop: Disallow "enhanced pagination" with core blocks that may contain third-party blocks

@siobhyb noted:

Luis can confirm, but I also believe [Gutenberg PR] 55539 needs to be committed regardless of the separate fix to ensure enhanced pagination works with TT4. It addresses a separate problem.

@luisherranz said:

That's correct.

@luisherranz also noted the WIP fix for TT4:

A fix to ensure enhanced pagination works with all compatible patterns/template parts

Okay to commit:
Given Gutenberg PR 55539 is needed to fix a "separate problem", reapplying the commit keyword for the patch. A follow-up npm packages update commit will be coming once the other fix is ready.

#76 @karmatosed
15 months ago

In 57034:

Update editor related npm packages for 6.4 RC3.

The npm packages needed update for 6.4 RC3.

Patch: https://github.com/WordPress/wordpress-develop/pull/5587.
This PR includes the following changes:

Props DAreRodz, luisherranz, poena, afercia, danieldudzic, hellofromtonya, siobhyb, mikachan, get_dave, scruffian, wildworks, glendaviesnz, ramonopoly, aaronrobertshaw.

See #59411.

#78 @karmatosed
15 months ago

  • Keywords dev-feedback added

This needs a 2nd committer for a backport please regarding the recent changeset: https://core.trac.wordpress.org/changeset/57034

#79 @hellofromTonya
15 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Assuming the GitHub CI jobs all pass, [57034] LGTM for backporting to the 6.4 branch.

#80 @karmatosed
15 months ago

In 57035:

Update editor related npm packages for 6.4 RC3.

The npm packages needed update for 6.4 RC3.

Patch: https://github.com/WordPress/wordpress-develop/pull/5587
This PR includes the following changes:

Reviewed by helloFromTonya.
Merges [57034] to the 6.4 branch.

Props DAreRodz, luisherranz, poena, afercia, danieldudzic, hellofromtonya, siobhyb, mikachan, get_dave, scruffian, wildworks, glendaviesnz, ramonopoly, aaronrobertshaw.

See #59411.

#81 @hellofromTonya
15 months ago

  • Keywords commit dev-reviewed removed

Resetting the keywords.

@hellofromTonya commented on PR #5610:


15 months ago
#84

Pulling down the commit to test.

@hellofromTonya commented on PR #5610:


15 months ago
#85

Pulling down the commit to test.

@hellofromTonya commented on PR #5610:


15 months ago
#86

No console or PHP errors when applied locally. Next step: commit to trunk.

#87 @hellofromTonya
15 months ago

  • Keywords commit added
  • Owner changed from karmatosed to hellofromTonya
  • Status changed from reopened to reviewing

Patch: https://github.com/WordPress/wordpress-develop/pull/5610

2nd round of npm package updates for 6.4 RC3. Patch LGTM. Prepping the commit.

#88 @hellofromTonya
15 months ago

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

In 57048:

Editor: 2nd update of npm packages for 6.4 RC3.

This second update for RC3 includes the following fixes:

Follow up to [57034], [56987], [56961], [56849], [56818], [56816].

Props afercia, aristath, artemiosans, czapla, darerodz, glendaviesnz, hellofromTonya, jameskoster, joen, luisherranz, mikachan, ocean90, peterwilsoncc, ramonopoly, rajinsharwar, swissspidy.
Fixes #59411.

#89 @hellofromTonya
15 months ago

  • Keywords dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for 2nd committer review and sign-off to backport [57048] to the 6.4 branch.

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


15 months ago

#92 @davidbaumwald
15 months ago

  • Keywords dev-reviewed added; dev-feedback removed

Looks good to backport to the 6.4 branch.

#93 @jorbin
15 months ago

I don't see anything that should block merging, so [57048] is approved however I really hope we are calling out enhanced queries in the RC3 note for further testing.

#94 @hellofromTonya
15 months ago

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

In 57049:

Editor: 2nd update of npm packages for 6.4 RC3.

This second update for RC3 includes the following fixes:

Follow up to [57034], [56987], [56961], [56849], [56818], [56816].

Reviewed by davidbaumwald , jorbin.
Merges [57048] to the 6.4 branch.

Props afercia, aristath, artemiosans, czapla, darerodz, glendaviesnz, hellofromTonya, jameskoster, joen, luisherranz, mikachan, ocean90, peterwilsoncc, ramonopoly, rajinsharwar, swissspidy.
Fixes #59411.

#95 @hellofromTonya
15 months ago

  • Keywords i18n-change added

[57049] introduced string changes, which were previously discussed in Make/Core slack.

#97 @hellofromTonya
15 months ago

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

Reopening to address 2 newly reported regressions.

@hellofromTonya commented on PR #5618:


15 months ago
#98

## Test Report

### Steps to Reproduce
Followed the test instructions found in the GB issue https://github.com/WordPress/gutenberg/issues/55846.

  1. Created a wp-includes/mu-plugins/ directory.
  2. Created a new test.php file in that directory.
  3. Added the following code to that file:
    <?php
    
    add_action( 'init', function() {
            register_post_type(
                    'my-test',
                    array(
                            'public'       => true,
                            'show_in_rest' => true,
                            'template'     => array(
                                    array(
                                            'core/pattern',
                                            array( 'slug' => 'core/simple-header-with-dark-background' ),
                                    ),
                            ),
                            'labels'                => array(
                                    'name'          => 'My Test',
                                    'singular_name' => 'My Test',
                            ),
                    )
            );
    } );
    
  1. Using WordPress 6.3.2, launched and logged into my local testing site.
  2. Navigated to "My Test" > "Add New Post". (No error)
  3. Added a title: "Pattern as Template".
  4. Published.
  5. Upgraded to WordPress 6.4 RC3 using wp core update --version=6.4-RC3.
  6. Refreshed the "Pattern as Template" screen. (No error)
  7. Navigated back to the "My Test" UI.
  8. Added a "my-test" post.
  9. 🐞 Bug occurs when the editor opens, when creating a new post for a custom post type.

### Results with reproducing the regression

With 6.3.2:

  • ✅ When creating a new post for a custom post type: pattern renders without issue (no error).
  • ✅ When opening an existing post (for a custom post type): pattern renders without issue (no error).
  • ✅ In the frontend, an existing and new post both render correctly (no error).

With 6.4 RC3 and the current 6.4 branch and with TT3 or TT4 theme and no activated plugins:

  • ❌ 🐞 When creating a new post for a custom post type: pattern cannot be previewed and a console error is raised.
    This block has encountered an error and cannot be previewed.
    
    Uncaught TypeError: select(...).getCurrentTheme() is undefined
    

https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/7284611/33e360b7-9407-4e2a-8f0d-0499f09253a7

  • ✅ When opening an existing post (for a custom post type): pattern renders without issue (no error).
  • In the frontend:
    • ❌ 🐞 the newly added "my-test" post's pattern does not render.
    • ✅ the existing "my-test" post pattern does render.

https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/7284611/03b881d9-d527-478b-92f2-6e0880c5b5fe

Test Report Icons:
🐞 <= Indicates where issue ("bug") occurs.
✅ <= Behavior is expected.
❌ <= Behavior is NOT expected.

@hellofromTonya commented on PR #5618:


15 months ago
#99

For the pattern as template regression: this PR resolves the issue ✅

#100 @hellofromTonya
15 months ago

  • Keywords commit added

Patch: https://github.com/WordPress/wordpress-develop/pull/5618

For the "pattern as a template" regression:

  • Reproduced the issue.
  • Confirmed the patch resolves the issue.

Marking for commit to trunk.

#101 @hellofromTonya
15 months ago

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

In 57063:

Editor: Update of npm packages after 6.4 RC3.

This update includes the following fixes reported after RC3:

Scenario: When creating a new post for any custom post type registered with its "template" argument set to a pattern.

For this scenario, the pattern template no longer renders in the post editor or the frontend with 6.4, whereas it did render properly in 6.3.2.

This package update resolves the console error raised:

Uncaught TypeError: select(...).getCurrentTheme() is undefined 

which restores the rendering of the pattern template.

Follow up to [57048], [57034], [56987], [56961], [56849], [56818], [56816].

Props renathoc, rajinsharwar, richtabor, joen, mikachan, hellofromTonya.
Fixes #59411.

#102 @hellofromTonya
15 months ago

  • Keywords dev-feedback added
  • Resolution fixed deleted
  • Status changed from closed to reopened

Re-opening for 2nd committer sign-off to backport [57063] to the 6.4 branch.

#103 @jorbin
15 months ago

  • Keywords dev-reviewed added; dev-feedback removed

[57063] looks good to me.

#104 @hellofromTonya
15 months ago

Thanks @jorbin :) Backporting now.

#105 @hellofromTonya
15 months ago

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

In 57064:

Editor: Update of npm packages after 6.4 RC3.

This update includes the following fixes reported after RC3:

Scenario: When creating a new post for any custom post type registered with its "template" argument set to a pattern.

For this scenario, the pattern template no longer renders in the post editor or the frontend with 6.4, whereas it did render properly in 6.3.2.

This package update resolves the console error raised:

Uncaught TypeError: select(...).getCurrentTheme() is undefined 

which restores the rendering of the pattern template.

Follow up to [57048], [57034], [56987], [56961], [56849], [56818], [56816].

Reviewed by jorbin.
Merges [57063] to the 6.4 branch.

Props renathoc, rajinsharwar, richtabor, joen, mikachan, hellofromTonya.
Fixes #59411.

Note: See TracTickets for help on using tickets.