Skip to content

Conversation

@ellatrix
Copy link
Member

@ellatrix ellatrix commented Nov 25, 2025

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


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@github-actions
Copy link

github-actions bot commented Nov 25, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props ellatrix, jonsurrell, ntsekouras.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@ellatrix
Copy link
Member Author

One failure seems due to WordPress/gutenberg@efb328b, maybe the snapshots need to be updated in trunk.

The PR changed the exports from the @wordpress/interactivity package.
It removed the `debug` WordPress export module completely.

This requires some changes to the special way the debug script module
was being registered.

See WordPress/gutenberg#72485.
The debug module was removed, only the main interactivity module is
exposed.
@sirreal
Copy link
Member

sirreal commented Nov 25, 2025

I've pushed two commits to backport necessary changes from WordPress/gutenberg#72485.

These were required because the @wordpress/interactivity module changed
wpScriptModuleExports in its package.json and removed an exposed module.

There was some special handling in place for its debug module that had to be removed.

@youknowriad it would be great if you could take a look at the backports I've added to this PR.

* - interactivity/index.min.js or interactivity/index.js => @wordpress/interactivity
* - block-library/query/view.min.js or block-library/query/view.js => @wordpress/block-library/query/view
*/
$script_module_id = '@wordpress/' . preg_replace( '~(?:/index)?(?:\.min)?\.js$~D', '', $file_name, 1 );
Copy link
Member

Choose a reason for hiding this comment

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

WordPress/gutenberg#72485 changed this line which I did not copy, as far as I can tell the change is not significant: https://github.com/WordPress/gutenberg/pull/72485/files#r2560447901

Maybe it should be updated just for the sake of consistency:

Suggested change
$script_module_id = '@wordpress/' . preg_replace( '~(?:/index)?(?:\.min)?\.js$~D', '', $file_name, 1 );
$script_module_id = '@wordpress/' . preg_replace( '~(?:/index)?\.(min\.)?js$~D', '', $file_name, 1 );

@sirreal
Copy link
Member

sirreal commented Nov 25, 2025

There's a remaining failure unrelated to Interactivity or Modules:

There was 1 failure:

1) Tests_Blocks_Render::test_do_block_output with data set #6 ('core__categories.html', 'core__categories.server.html')
File '/var/www/tests/phpunit/includes/../data/blocks/fixtures/core__categories.html' does not match expected value
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'<ul class="wp-block-categories-list wp-block-categories"><li class="cat-item-none">No categories</li></ul>'
+'<ul class="wp-block-categories-list wp-block-categories-taxonomy-category wp-block-categories"><li class="cat-item-none">No categories</li></ul>'

@sirreal
Copy link
Member

sirreal commented Nov 25, 2025

The categories class change appears to be from WordPress/gutenberg#72662.

The categories block index.php changed across these packages:

--- 1/index.php
+++ 2/index.php	
@@ -79,7 +79,7 @@ function render_block_core_categories( $attributes, $content, $block ) {
 		}
 	}
 
-	$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type}" ) );
+	$wrapper_attributes = get_block_wrapper_attributes( array( 'class' => "wp-block-categories-{$type} wp-block-categories-taxonomy-{$attributes['taxonomy']}" ) );
 
 	return sprintf(
 		$wrapper_markup,

I'll push a commit to update the failing test assertion. FYI @ntsekouras.

Gutenberg PR 72662 updated the rendering of the categories block adding
this class.

See WordPress/gutenberg#72662.
@ellatrix ellatrix requested a review from youknowriad November 25, 2025 16:09
@ntsekouras
Copy link

I'll push a commit to update the failing test assertion. FYI @ntsekouras.

Thanks. That sounds fine!

@ellatrix
Copy link
Member Author

Currently the editors are not loading:

Error: You tried to opt-in to unstable APIs as module "@wordpress/dataviews" which is already registered. This feature is only for JavaScript modules shipped with WordPress core. Please do not use it in plugins and themes as the unstable APIs will be removed without a warning. If you ignore this error and depend on unstable features, your product will inevitably break on one of the next WordPress releases.

See WordPress/gutenberg#73554

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