Skip to content

Add experiment for hiding blocks based on screen size#73949

Merged
ramonjd merged 2 commits intotrunkfrom
add/hide-blocks-based-on-screen-size-experiment
Dec 12, 2025
Merged

Add experiment for hiding blocks based on screen size#73949
ramonjd merged 2 commits intotrunkfrom
add/hide-blocks-based-on-screen-size-experiment

Conversation

@ramonjd
Copy link
Member

@ramonjd ramonjd commented Dec 12, 2025

What?

Create initial experiment for #72502

Why?

This feature will be iteratively developed behind an experimental flag to start with to minimize impact on the current editor UX

How?

You know.

Testing Instructions

Check that the experiment is there in /wp-admin/admin.php?page=gutenberg-experiments

Screenshot 2025-12-12 at 2 07 23 pm

Enable the experiment and check that window.__experimentalHideBlocksBasedOnScreenSize is available in the console.

@ramonjd ramonjd self-assigned this Dec 12, 2025
@ramonjd ramonjd added the [Type] Experimental Experimental feature or API. label Dec 12, 2025
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

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

LGTM! I left a comment about how I think the text can be improved, but I'm not too fussy, feel free to merge it!

Comment on lines 252 to 257
__( 'Hide blocks based on screen size', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Extends block visiblity block supports to hide blocks based on screen size.', 'gutenberg' ),
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the title/description could be improved. It makes it sound like blocks are automatically hidden based on screen size without the user doing anything, but I think what it really will do is provide responsive design controls for hiding blocks.

Copy link
Member Author

Choose a reason for hiding this comment

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

True indeed! I'll update

@github-actions
Copy link

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: ramonjd <[email protected]>
Co-authored-by: talldan <[email protected]>

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

@ramonjd ramonjd enabled auto-merge (squash) December 12, 2025 06:51
@github-actions
Copy link

Flaky tests detected in 255d6c5.
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/20158832601
📝 Reported issues:

@ramonjd ramonjd merged commit 99d4c2f into trunk Dec 12, 2025
34 checks passed
@ramonjd ramonjd deleted the add/hide-blocks-based-on-screen-size-experiment branch December 12, 2025 07:31
@github-actions github-actions bot added this to the Gutenberg 22.4 milestone Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Experimental Experimental feature or API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants