Experiments: register gutenberg-dashboard-widgets flag#77569
Conversation
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
add gutenberg-dashboard-widgets to the experiments page and expose window.__experimentalDashboardWidgets flag
c89bf66 to
5ce7ec1
Compare
|
|
||
| add_settings_field( | ||
| 'gutenberg-dashboard-widgets', | ||
| __( 'Dashboard: customizable widget home screen', 'gutenberg' ), |
There was a problem hiding this comment.
I'd probably just call it something like "New Dashboard Experience" for simplicity but anything really goes :-)
|
Flaky tests detected in 8a0f348. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/24836143969
|
* 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>
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-widgetsentry in the Gutenberg experiments page and exposeswindow.__experimentalDashboardWidgetswhen 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 awindow.__experimentalDashboardWidgets = truescript onwp-block-editorwhen 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
npm run build(no JS changes, but safe to run).window.__experimentalDashboardWidgetsisundefined.window.__experimentalDashboardWidgets === true.undefined).