Skip to content

Commit

Permalink
Remove the experimental flag of the command center
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed May 19, 2023
1 parent 7a93783 commit ffba042
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

0 comments on commit ffba042

Please sign in to comment.