Skip to content

Experiments: register gutenberg-dashboard-widgets flag#77569

Merged
retrofox merged 3 commits intotrunkfrom
add/dashboard-widgets-experiment
Apr 23, 2026
Merged

Experiments: register gutenberg-dashboard-widgets flag#77569
retrofox merged 3 commits intotrunkfrom
add/dashboard-widgets-experiment

Conversation

@retrofox
Copy link
Copy Markdown
Contributor

@retrofox retrofox commented Apr 22, 2026

Part of #77616

Context

This PR lands the experiment flag scaffolding for a modernized dashboard direction picking up on the design @fcoveram proposed in #74616, where the WordPress dashboard becomes a customizable, widget-based home screen. It also aligns with the admin-modernization thread in the 7.0 planning post, which lists "grid layout customization to dashboard experience or other screens" as an area to explore.

Gating everything behind a single experiment from day one keeps the plugin shippable without affecting core behavior while the API settles. Exports on the JS side will stay __experimental / private until the shape stabilizes, so iterating on the dashboard work imposes no compatibility obligations on the broader community.

Happy to share screenshots of the current prototype as soon as it's presentable.

What?

Registers a new gutenberg-dashboard-widgets entry in the Gutenberg experiments page and exposes window.__experimentalDashboardWidgets when the flag is enabled. No runtime code is gated yet — that wiring lands with the first runtime PR.

Why?

Future PRs will introduce a customizable dashboard widget framework (widget types, grid layout, core widgets). All of that runtime code needs to be gated behind a single experiment flag so it can ship in the plugin without affecting core behavior until it graduates.

This PR lands the flag scaffolding first so subsequent PRs can reference it from day one, following the same approach used by gutenberg-guidelines, gutenberg-form-blocks, gutenberg-media-editor, etc.

How?

Two minimal changes, modeled after neighboring experiments:

  • lib/experiments-page.php — add a settings field to render the checkbox on the Experiments admin page.
  • lib/experimental/editor-settings.php — inline a window.__experimentalDashboardWidgets = true script on wp-block-editor when the experiment is enabled.

No loader gate is added yet (lib/experimental/dashboard-widgets/ does not exist on trunk). That wiring will come with the first PR that introduces dashboard runtime code.

Testing

  1. Check out the branch and rebuild: npm run build (no JS changes, but safe to run).
  2. Visit Gutenberg → Experiments. Verify a new checkbox appears: "Dashboard: customizable widget home screen".
  3. Leave it unchecked. In the block editor, confirm window.__experimentalDashboardWidgets is undefined.
  4. Enable the checkbox and save. Reload the editor. Confirm window.__experimentalDashboardWidgets === true.
  5. Disable the checkbox and save. Reload. Confirm the window flag is gone (undefined).
Screenshot 2026-04-22 at 3 05 25 PM

@retrofox retrofox requested a review from spacedmonkey as a code owner April 22, 2026 18:59
@retrofox retrofox self-assigned this Apr 22, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 22, 2026

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: retrofox <retrofox@git.wordpress.org>
Co-authored-by: simison <simison@git.wordpress.org>

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

@retrofox retrofox requested a review from simison April 22, 2026 19:00
add gutenberg-dashboard-widgets to the experiments page
and expose window.__experimentalDashboardWidgets flag
@retrofox retrofox force-pushed the add/dashboard-widgets-experiment branch from c89bf66 to 5ce7ec1 Compare April 22, 2026 19:07
@retrofox retrofox added the [Type] Experimental Experimental feature or API. label Apr 22, 2026
@retrofox retrofox added the Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts label Apr 22, 2026
Comment thread lib/experiments-page.php Outdated

add_settings_field(
'gutenberg-dashboard-widgets',
__( 'Dashboard: customizable widget home screen', 'gutenberg' ),
Copy link
Copy Markdown
Member

@simison simison Apr 23, 2026

Choose a reason for hiding this comment

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

I'd probably just call it something like "New Dashboard Experience" for simplicity but anything really goes :-)

@github-actions
Copy link
Copy Markdown

Flaky tests detected in 8a0f348.
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/24836143969
📝 Reported issues:

@retrofox retrofox merged commit 7dd676e into trunk Apr 23, 2026
49 of 50 checks passed
@retrofox retrofox deleted the add/dashboard-widgets-experiment branch April 23, 2026 14:47
@github-actions github-actions Bot added this to the Gutenberg 23.1 milestone Apr 23, 2026
Copilot AI pushed a commit that referenced this pull request Apr 24, 2026
* register dashboard-widgets experiment

add gutenberg-dashboard-widgets to the experiments page
and expose window.__experimentalDashboardWidgets flag

* reword experimental flag experienmce
Co-authored-by: simison <87168+simison@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Experimental Experimental feature or API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants