-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove experimental setting for interactivity API and behaviors #52833
Remove experimental setting for interactivity API and behaviors #52833
Conversation
This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress. If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged. If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack. Thank you! ❤️ View changed files❔ lib/block-supports/behaviors.php ❔ lib/experimental/editor-settings.php ❔ lib/experiments-page.php ❔ lib/load.php |
Size Change: +459 B (0%) Total Size: 1.44 MB
ℹ️ View Unchanged
|
Flaky tests detected in 53c0995. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5622086084
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been reviewing it and it looks great 👏 Thanks for working on it! What I tested:
- There is no experimental setting in the Gutenberg Experiments page.
- The default value of the lightbox is false, and the UI to change it is shown.
- It can be overwritten by the theme.json, both showing the UI and the default value.
- It can be overwritten per block through the Site Editor or through a Post Page.
A couple of comments:
-
Should we remove the filter we are using to change the
viewScript
(link) and add it directly to the imageblock.json
? I mean adding something like"viewScript": "file:./view-interactivity.min.js"
. -
Now that it is not experimental in Gutenberg, should we add docs somewhere to explain how to enable/disable it through the theme.json? Not sure how this is usually handled.
@SantosGuillamot I've done it in the last commit. Are we in this case loading the JS of view-interactivity if behaviors are disabled? |
If I am not mistaken, we shouldn't. That should be handled in this logic that is included in the |
They are not, then everything is 🟢 |
Unblocks #51156
What?
Remove Behaviors and Interactivity API from Gutenberg experiments. Behaviors are still disabled by default, and need to be enabled using
theme.json
, Global Styles or block settings.Why?
Behaviors are ready to be widely tested. We have two weeks for the next Gutenberg release and we can also, after some more testing, include the backports for 6.4
How?
Removing some conditionals.
Testing Instructions
Enable behaviors with the three options available. Check that image lightbox is working as expected.
Testing Instructions for Keyboard
Screenshots or screencast
Before:
After: