diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index 4bcab85d80062..6e8a7fb42eb9b 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -20,7 +20,7 @@ } @include break-medium { - width: calc(#{$nav-sidebar-width} - #{$canvas-padding * 2}); + width: calc(#{$nav-sidebar-width} - #{$canvas-padding}); } .edit-site-layout.is-full-canvas & { diff --git a/packages/edit-site/src/components/site-hub/index.js b/packages/edit-site/src/components/site-hub/index.js index 5419317bdac4d..eadd9bbad68b9 100644 --- a/packages/edit-site/src/components/site-hub/index.js +++ b/packages/edit-site/src/components/site-hub/index.js @@ -19,6 +19,8 @@ import { store as blockEditorStore } from '@wordpress/block-editor'; import { store as coreStore } from '@wordpress/core-data'; import { decodeEntities } from '@wordpress/html-entities'; import { forwardRef } from '@wordpress/element'; +import { search } from '@wordpress/icons'; +import { privateApis as commandsPrivateApis } from '@wordpress/commands'; /** * Internal dependencies @@ -27,6 +29,8 @@ import { store as editSiteStore } from '../../store'; import SiteIcon from '../site-icon'; import { unlock } from '../../private-apis'; +const { store: commandsStore } = unlock( commandsPrivateApis ); + const HUB_ANIMATION_DURATION = 0.3; const SiteHub = forwardRef( ( props, ref ) => { @@ -41,6 +45,7 @@ const SiteHub = forwardRef( ( props, ref ) => { getSettings().__experimentalDashboardLink || 'index.php', }; }, [] ); + const { open: openCommandCenter } = useDispatch( commandsStore ); const disableMotion = useReducedMotion(); const { setCanvasMode } = unlock( useDispatch( editSiteStore ) ); @@ -82,65 +87,78 @@ const SiteHub = forwardRef( ( props, ref ) => { ease: 'easeOut', } } > - - + - + + + - + { decodeEntities( siteTitle ) } - - - - - - { decodeEntities( siteTitle ) } - - + + + { window?.__experimentalEnableCommandCenter && + canvasMode === 'view' && ( +