Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactivity API - Blocks: Move interactivity registration to render #58678

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

cbravobernal
Copy link
Contributor

@cbravobernal cbravobernal commented Feb 5, 2024

What?

Move all modules registration to the render callback functions in interactive blocks.

Why?

To be able to override the WP Core script modules in Gutenberg.

How?

Testing Instructions

All interactive blocks should work by default:

  • Navigation (mobile menu)
  • Search (search button only)
  • File (show inline embed disabled)
  • Query (force reload disabled)

Edit .wp-env.json with:

	"config": {
		"SCRIPT_DEBUG": false
	}

All script modules files for those blocks should be .min.js
if the json is:

	"config": {
		"SCRIPT_DEBUG": false
	}

All script modules files for those blocks should be .js

Copy link

github-actions bot commented Feb 5, 2024

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 SVN

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

Props cbravobernal, luisherranz.

GitHub Merge commits

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: c4rl0sbr4v0 <cbravobernal@git.wordpress.org>
Co-authored-by: luisherranz <luisherranz@git.wordpress.org>

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

Copy link

github-actions bot commented Feb 5, 2024

Flaky tests detected in 92041fa.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7787336791
📝 Reported issues:

Copy link
Member

@luisherranz luisherranz left a comment

Choose a reason for hiding this comment

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

LGTM!

@luisherranz luisherranz merged commit 5b28829 into trunk Feb 7, 2024
57 checks passed
@luisherranz luisherranz deleted the update/move-register-interactive-modules-blocks branch February 7, 2024 08:30
@github-actions github-actions bot added this to the Gutenberg 17.7 milestone Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block library /packages/block-library [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants