Skip to content

Commit 5d26ee7

Browse files
authored
Omnibar: Rename experiment to match iteration issue (#79074)
1 parent a2ed6c2 commit 5d26ee7

11 files changed

Lines changed: 26 additions & 32 deletions

File tree

lib/experimental/experiments/load.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ function gutenberg_initialize_experiments_settings() {
131131
'description' => __( 'Enables a new dashboard experience with resizable, reorderable widgets that plugins can register and users can personalize.', 'gutenberg' ),
132132
),
133133
array(
134-
'id' => 'gutenberg-admin-bar-in-editor',
135-
'label' => __( 'Toolbar in editor', 'gutenberg' ),
136-
'description' => __( 'Shows the Toolbar in the fullscreen Post and Site Editor.', 'gutenberg' ),
134+
'id' => 'gutenberg-omnibar',
135+
'label' => __( 'Omnipresent Toolbar', 'gutenberg' ),
136+
'description' => __( 'Improves the toolbar as navigation layer, including showing the toolbar in the fullscreen Post and Site Editor.', 'gutenberg' ),
137137
),
138138
),
139139
),

lib/experimental/admin-bar-in-editor/load.php renamed to lib/experimental/omnibar/load.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
<?php
22
/**
3-
* Admin bar in editor experiment.
3+
* Omnibar experiment.
44
*
55
* @package gutenberg
66
*/
77

88
/**
9-
* Enables the admin bar in editor experiment.
9+
* Enables the omnibar experiment.
1010
*/
11-
function gutenberg_enable_admin_bar_in_editor_experiment() {
11+
function gutenberg_enable_omnibar_experiment() {
1212
$screen = get_current_screen();
1313
if (
1414
! $screen ||
1515
! is_admin_bar_showing() ||
16-
! gutenberg_is_experiment_enabled( 'gutenberg-admin-bar-in-editor' )
16+
! gutenberg_is_experiment_enabled( 'gutenberg-omnibar' )
1717
) {
1818
return;
1919
}
@@ -31,10 +31,10 @@ function gutenberg_enable_admin_bar_in_editor_experiment() {
3131
);
3232
}
3333

34-
add_action( 'admin_enqueue_scripts', 'gutenberg_enable_admin_bar_in_editor_experiment' );
34+
add_action( 'admin_enqueue_scripts', 'gutenberg_enable_omnibar_experiment' );
3535

3636
/**
37-
* Adds a body class when the admin bar in editor experiment is enabled.
37+
* Adds a body class when the omnibar experiment is enabled.
3838
*
3939
* Applied on every admin page where the admin bar is shown, so that
4040
* pages that use wp-build (such as `font-library-wp-admin`)
@@ -43,26 +43,26 @@ function gutenberg_enable_admin_bar_in_editor_experiment() {
4343
* @param string $classes Space-separated list of admin body classes.
4444
* @return string Filtered list of admin body classes.
4545
*/
46-
function gutenberg_admin_bar_in_editor_body_class( $classes ) {
46+
function gutenberg_omnibar_body_class( $classes ) {
4747
if (
4848
! is_admin_bar_showing() ||
49-
! gutenberg_is_experiment_enabled( 'gutenberg-admin-bar-in-editor' )
49+
! gutenberg_is_experiment_enabled( 'gutenberg-omnibar' )
5050
) {
5151
return $classes;
5252
}
5353

5454
return $classes . ' has-admin-bar-in-editor';
5555
}
5656

57-
add_filter( 'admin_body_class', 'gutenberg_admin_bar_in_editor_body_class' );
57+
add_filter( 'admin_body_class', 'gutenberg_omnibar_body_class' );
5858

5959
/**
60-
* Enables the admin bar on the site-editor-v2 page.
60+
* Enables the omnibar experiment on the site-editor-v2 page.
6161
*/
62-
function gutenberg_enable_admin_bar_in_site_editor_v2() {
62+
function gutenberg_enable_omnibar_in_site_editor_v2() {
6363
if (
6464
! is_admin_bar_showing() ||
65-
! gutenberg_is_experiment_enabled( 'gutenberg-admin-bar-in-editor' )
65+
! gutenberg_is_experiment_enabled( 'gutenberg-omnibar' )
6666
) {
6767
return;
6868
}
@@ -91,4 +91,4 @@ static function () use ( $admin_color_class ) {
9191
wp_enqueue_style( 'colors' );
9292
}
9393

94-
add_action( 'site-editor-v2_init', 'gutenberg_enable_admin_bar_in_site_editor_v2' );
94+
add_action( 'site-editor-v2_init', 'gutenberg_enable_omnibar_in_site_editor_v2' );

lib/load.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function gutenberg_is_experiment_enabled( $name ) {
134134
require __DIR__ . '/compat/wordpress-7.1/classic-block.php';
135135

136136
// Experimental features.
137-
require __DIR__ . '/experimental/admin-bar-in-editor/load.php';
137+
require __DIR__ . '/experimental/omnibar/load.php';
138138
require __DIR__ . '/experimental/block-editor-settings-mobile.php';
139139
require __DIR__ . '/experimental/blocks.php';
140140
require __DIR__ . '/experimental/navigation-theme-opt-in.php';

packages/boot/src/experimental-admin-bar-in-editor.scss renamed to packages/boot/src/experimental-omnibar.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Styles for the experimental admin bar in editor.
1+
// Styles for the experimental omnibar.
22

33
body.has-admin-bar-in-editor {
44
#wpadminbar {

packages/boot/src/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@use "@wordpress/theme/src/prebuilt/css/design-tokens.css" as *;
22
@use "@wordpress/base-styles/mixins" as *;
33
@use "@wordpress/base-styles/variables" as *;
4-
@use "./experimental-admin-bar-in-editor.scss" as *;
4+
@use "./experimental-omnibar.scss" as *;
55

66
.boot-layout-container .boot-layout {
77
// On mobile the main content area has to scroll, otherwise you can invoke

packages/edit-post/src/experimental-admin-bar-in-editor.scss renamed to packages/edit-post/src/experimental-omnibar.scss

File renamed without changes.

packages/edit-post/src/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@use "./components/layout/style.scss" as *;
66
@use "./components/meta-boxes/meta-boxes-area/style.scss" as *;
77
@use "./components/welcome-guide/style.scss" as *;
8-
@use "./experimental-admin-bar-in-editor.scss" as *;
8+
@use "./experimental-omnibar.scss" as *;
99

1010
body.js.block-editor-page {
1111
@include wp-admin-reset( ".block-editor" );

packages/edit-site/src/experimental-admin-bar-in-editor.scss renamed to packages/edit-site/src/experimental-omnibar.scss

File renamed without changes.

packages/edit-site/src/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
@use "./components/resizable-frame/style.scss" as *;
3232
@use "./components/pagination/style.scss" as *;
3333
@use "./components/sidebar-global-styles/style.scss" as *;
34-
@use "./experimental-admin-bar-in-editor.scss" as *;
34+
@use "./experimental-omnibar.scss" as *;
3535

3636
/* stylelint-disable -- Disable reason: View Transitions not supported properly by stylelint. */
3737
::view-transition-image-pair(root) {

packages/media-editor/src/components/media-editor/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
// The skeleton must always sit in the modal's flow (`top: auto`). The reset
3333
// above sets that, but external rules can outrank its low specificity — e.g.
34-
// the "Toolbar in editor" experiment (`gutenberg-admin-bar-in-editor`)
34+
// the "Omnipresent Toolbar" experiment (`gutenberg-omnibar`)
3535
// offsets every `.interface-interface-skeleton` below the admin bar via a
3636
// `body.has-admin-bar-in-editor.is-fullscreen-mode` rule, which would push
3737
// the editor (and the fine-rotation ruler under the canvas) down inside our

0 commit comments

Comments
 (0)