Skip to content

Commit

Permalink
Remove the experimental flag of the command center (#50781)
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 19, 2023
1 parent 542fa17 commit d746e55
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 31 deletions.
6 changes: 0 additions & 6 deletions lib/experimental/editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ function gutenberg_enable_experiments() {
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-color-randomizer', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableColorRandomizer = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-command-center', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-edit-site', 'window.__experimentalEnableCommandCenter = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-command-center', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-edit-post', 'window.__experimentalEnableCommandCenter = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-group-grid-variation', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableGroupGridVariation = true', 'before' );
}
Expand Down
12 changes: 0 additions & 12 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,6 @@ function gutenberg_initialize_experiments_settings() {
)
);

add_settings_field(
'gutenberg-command-center',
__( 'Command center ', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Test the command center; Open it using cmd + k in the site or post editors.', 'gutenberg' ),
'id' => 'gutenberg-command-center',
)
);

add_settings_field(
'gutenberg-group-grid-variation',
__( 'Grid variation for Group block ', 'gutenberg' ),
Expand Down
4 changes: 1 addition & 3 deletions packages/edit-post/src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ function Editor( { postId, postType, settings, initialEdits, ...props } ) {
{ ...props }
>
<ErrorBoundary>
{ window?.__experimentalEnableCommandCenter && (
<CommandMenu />
) }
<CommandMenu />
<EditorInitialization postId={ postId } />
<Layout styles={ styles } />
</ErrorBoundary>
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default function Layout() {

return (
<>
{ window?.__experimentalEnableCommandCenter && <CommandMenu /> }
<CommandMenu />
<KeyboardShortcutsRegister />
<KeyboardShortcutsGlobal />
{ fullResizer }
Expand Down
17 changes: 8 additions & 9 deletions packages/edit-site/src/components/site-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,14 @@ const SiteHub = forwardRef( ( props, ref ) => {
</motion.div>
</AnimatePresence>
</HStack>
{ window?.__experimentalEnableCommandCenter &&
canvasMode === 'view' && (
<Button
className="edit-site-site-hub_toggle-command-center"
icon={ search }
onClick={ () => openCommandCenter() }
label={ __( 'Open command center' ) }
/>
) }
{ canvasMode === 'view' && (
<Button
className="edit-site-site-hub_toggle-command-center"
icon={ search }
onClick={ () => openCommandCenter() }
label={ __( 'Open command center' ) }
/>
) }
</HStack>
</motion.div>
);
Expand Down

1 comment on commit d746e55

@github-actions
Copy link

Choose a reason for hiding this comment

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

Flaky tests detected in d746e55.
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/5024074527
📝 Reported issues:

Please sign in to comment.