Skip to content

Conversation

@t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Nov 24, 2025

Manually backports #72489 into wp/6.9 branch

Testing Instructions

See #72489

…ttribute to script module (#72489)

* Reuse wp_script_attributes filter for adding data-wp-router-options attribute to script module

* Use wp_json_encode()

* Make gutenberg_script_module_add_router_options_attributes() more concise

* Improve phpdoc return tags

* Remove compat/wordpress-6.9/script-modules.php

* Update backport changelog

* (WIP) Use render_block_data to filter all blocks

co-authored: @samueljseay

* Adjust manual registration of blocks in e2e tests

* We should not need any manual registration now.

* Update changelog to match new wordpress-develop PR.

* Fix merge conflict mistake

* Remove redundant white space change

* Fix merge conflict mistake

* Move conditional code to compat, check for existence of new method when re-registering existing core blocks

* Fix typo in code comment.

Co-authored-by: Luis Herranz <[email protected]>

* Simplify the compatibility check.

---------

Co-authored-by: westonruter <[email protected]>
Co-authored-by: luisherranz <[email protected]>
Co-authored-by: samueljseay <[email protected]>
Co-authored-by: DAreRodz <[email protected]>
@t-hamano t-hamano marked this pull request as ready for review November 24, 2025 11:43
@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin, New Block.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

1 similar comment
@github-actions
Copy link

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin, New Block.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

github-actions bot commented Nov 24, 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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: samueljseay <[email protected]>
Co-authored-by: ellatrix <[email protected]>
Co-authored-by: t-hamano <[email protected]>

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

@t-hamano
Copy link
Contributor Author

@samueljseay @luisherranz, I don't fully understand this PR, so I would appreciate it if you could confirm if this PR is still working correctly in the 6.9 branch 🙏

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Feature] Interactivity API API to add frontend interactivity to blocks. labels Nov 24, 2025
@github-project-automation github-project-automation bot moved this to 🔎 Needs Review in WordPress 6.9 Editor Tasks Nov 24, 2025
@t-hamano t-hamano merged commit 40f68a9 into wp/6.9 Nov 24, 2025
40 of 45 checks passed
@t-hamano t-hamano deleted the update/script-module-router-options-attributes-6.9 branch November 24, 2025 13:57
@github-project-automation github-project-automation bot moved this from 🔎 Needs Review to ✅ Done in WordPress 6.9 Editor Tasks Nov 24, 2025
pento pushed a commit to WordPress/wordpress-develop that referenced this pull request Nov 25, 2025
Changes can be found at https://github.com/WordPress/gutenberg/commits/wp/6.9/.

  * [Fix isNewLink value with entity binding (#73368)](WordPress/gutenberg#73368)
  * [Unit testing: Allow Composer to auto-detect PHP version (#73358)](WordPress/gutenberg#73358)
  * [Move the Edit Navigation button to the last item in the block toolbar to ensure that the styling is consistent and simple 
  (#73436)](WordPress/gutenberg#73436)
  * [Block Support: Change block visibility support key (#73432)](WordPress/gutenberg#73432)
  * [Accordion: add box-sizing:border-box rule (#73507)](WordPress/gutenberg#73507)
  * [Accordion Block: Trigger panel opening from URL hash or anchor link (#73357)](WordPress/gutenberg#73357)
  * [iAPI: Backport of "Return a deep-clone object from `getServerState` and `getServerContext` functions" 
  (#73514)](WordPress/gutenberg#73514)
  * [Reuse wp_script_attributes filter for adding data-wp-router-options attribute to script module (#72489) 
  (#73512)](WordPress/gutenberg#73512)
  * [Accordion Item: Don't use grid layout (#73501)](WordPress/gutenberg#73501)
  * [Drag and drop: remove grab cursor for multi-selection (#73521)](WordPress/gutenberg#73521)
  * [Math block: fix accessibility (#73508)](WordPress/gutenberg#73508)
  * [iAPI: Fix using `getServerContext` in derived state getters (#73518) (#73531)](WordPress/gutenberg#73531)
  * [Drag: hide block tools popovers (#73539)](WordPress/gutenberg#73539)

Developed in #10549.
See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.

Props priethor.
See #64301.

git-svn-id: https://develop.svn.wordpress.org/branches/6.9@61304 602fd350-edb4-49c9-b593-d223f7449a82
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Nov 25, 2025
Changes can be found at https://github.com/WordPress/gutenberg/commits/wp/6.9/.

  * [Fix isNewLink value with entity binding (#73368)](WordPress/gutenberg#73368)
  * [Unit testing: Allow Composer to auto-detect PHP version (#73358)](WordPress/gutenberg#73358)
  * [Move the Edit Navigation button to the last item in the block toolbar to ensure that the styling is consistent and simple 
  (#73436)](WordPress/gutenberg#73436)
  * [Block Support: Change block visibility support key (#73432)](WordPress/gutenberg#73432)
  * [Accordion: add box-sizing:border-box rule (#73507)](WordPress/gutenberg#73507)
  * [Accordion Block: Trigger panel opening from URL hash or anchor link (#73357)](WordPress/gutenberg#73357)
  * [iAPI: Backport of "Return a deep-clone object from `getServerState` and `getServerContext` functions" 
  (#73514)](WordPress/gutenberg#73514)
  * [Reuse wp_script_attributes filter for adding data-wp-router-options attribute to script module (#72489) 
  (#73512)](WordPress/gutenberg#73512)
  * [Accordion Item: Don't use grid layout (#73501)](WordPress/gutenberg#73501)
  * [Drag and drop: remove grab cursor for multi-selection (#73521)](WordPress/gutenberg#73521)
  * [Math block: fix accessibility (#73508)](WordPress/gutenberg#73508)
  * [iAPI: Fix using `getServerContext` in derived state getters (#73518) (#73531)](WordPress/gutenberg#73531)
  * [Drag: hide block tools popovers (#73539)](WordPress/gutenberg#73539)

Developed in WordPress/wordpress-develop#10549.
See https://make.wordpress.org/core/handbook/about/release-cycle/block-editor-release-process-for-major-releases/#package-updates-and-core-patches.

Props priethor.
See #64301.
Built from https://develop.svn.wordpress.org/branches/6.9@61304


git-svn-id: http://core.svn.wordpress.org/branches/6.9@60616 1a063a9b-81f0-0310-95a4-ce76da25c4cd
@luisherranz
Copy link
Member

@samueljseay @luisherranz, I don't fully understand this PR, so I would appreciate it if you could confirm if this PR is still working correctly in the 6.9 branch 🙏

This PR does not include any changes affecting WordPress 6.9. It was simply to add compatibility to Gutenberg.

So, there is no problem with the backport if it is for the E2E tests to work correctly 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Interactivity API API to add frontend interactivity to blocks. [Type] Bug An existing feature does not function as intended

Projects

Development

Successfully merging this pull request may close these issues.

5 participants