Skip to content

Conversation

@getdave
Copy link
Contributor

@getdave getdave commented Nov 17, 2025

What

This PR adds a new Gutenberg experiment flag "Customizable Navigation Overlays" as the first step in implementing customizable navigation overlays (issue #73084). The experiment can be enabled from the Gutenberg experiments settings page and sets a JavaScript flag (window.__experimentalNavigationOverlays) that will be used by subsequent PRs to conditionally enable overlay customization features.

Why

This experiment flag provides a safe way to develop the customizable navigation overlays feature without disrupting current Navigation block behavior. By gating the feature behind an experiment, we can iterate on the implementation while keeping the existing functionality stable for all users.

How

The implementation follows the standard Gutenberg experiment pattern:

  • Registers a new experiment checkbox in the experiments settings page
  • Sets a global JavaScript variable when the experiment is enabled
  • Uses the same infrastructure as other experiments for consistency

Testing Instructions

  1. Navigate to Gutenberg → Experiments in the WordPress admin
  2. Verify the "Customizable Navigation Overlays" checkbox appears in the list
  3. Enable the experiment and save
  4. In the browser console, verify window.__experimentalNavigationOverlays is set to true
  5. Disable the experiment and verify the flag is no longer set

@getdave getdave self-assigned this Nov 17, 2025
@getdave getdave requested review from jeryj and scruffian November 17, 2025 13:15
@getdave getdave added [Feature] Navigation Menus Any issue relating to Navigation Menus [Type] Experimental Experimental feature or API. labels Nov 17, 2025
@getdave getdave marked this pull request as ready for review November 17, 2025 13:16
@github-actions
Copy link

github-actions bot commented Nov 17, 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: getdave <[email protected]>
Co-authored-by: scruffian <[email protected]>

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

Copy link
Contributor

@scruffian scruffian left a comment

Choose a reason for hiding this comment

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

LGTM

@scruffian scruffian enabled auto-merge (squash) November 17, 2025 13:27
@scruffian scruffian merged commit 5b99068 into trunk Nov 17, 2025
44 of 46 checks passed
@scruffian scruffian deleted the add/navigation-overlays-experiment branch November 17, 2025 13:51
@github-actions github-actions bot added this to the Gutenberg 22.2 milestone Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Feature] Navigation Menus Any issue relating to Navigation Menus [Type] Experimental Experimental feature or API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants