{ /*
The NavigableRegion must always be rendered and not use
`inert` otherwise `useNavigateRegions` will fail.
*/ }
+
+
+
+
+
+
div {
border-radius: $radius-block-ui * 4;
// Not sure why this is necessary.
@@ -136,10 +108,6 @@
}
.edit-site-layout.is-full-canvas & {
- top: 0;
- bottom: 0;
- width: 100%;
-
& > div {
border-radius: 0;
}
@@ -157,61 +125,37 @@
height: 100%;
}
-.edit-site-layout__view-mode-toggle.components-button {
- position: relative;
- color: $white;
- border-radius: 0;
+.edit-site-layout__view-mode-toggle {
+ position: fixed;
+ top: $canvas-padding;
height: $header-height;
width: $header-height;
- overflow: hidden;
- padding: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- border-bottom: 1px solid transparent;
-
- .edit-site-layout.is-full-canvas & {
- border-bottom-color: $gray-200;
- transition: border-bottom-color 0.15s 0.4s ease-out;
- }
-
- &:hover,
- &:active {
+ z-index: 100;
+ .components-button {
color: $white;
- }
-
- &:focus {
- box-shadow: none;
- }
-
- &::before {
- transition: box-shadow 0.1s ease;
- @include reduce-motion("transition");
- content: "";
- display: block;
- position: absolute;
- top: 9px;
- right: 9px;
- bottom: 9px;
- left: 9px;
- border-radius: $radius-block-ui + $border-width + $border-width;
- box-shadow: none;
- }
+ height: 100%;
+ width: 100%;
+ border-radius: 0;
+ overflow: hidden;
+ padding: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ &:hover,
+ &:active {
+ color: $white;
+ }
- // Lightened spot color focus.
- &:focus::before {
- box-shadow:
- inset 0 0 0 var(--wp-admin-border-width-focus) rgba($white, 0.1),
- inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color);
+ &:focus {
+ box-shadow: none;
+ }
}
.edit-site-layout__view-mode-toggle-icon {
- display: flex;
- border-radius: $radius-block-ui;
- height: $grid-unit-80;
- width: $grid-unit-80;
- justify-content: center;
- align-items: center;
+ svg,
+ img {
+ display: block;
+ }
}
}
@@ -268,19 +212,12 @@
}
}
- .edit-site-site-hub,
.edit-site-layout__header {
position: absolute;
top: 0;
z-index: z-index(".edit-site-layout__header");
- }
- .edit-site-site-hub {
- z-index: z-index(".edit-site-layout__hub");
- }
- .edit-site-layout__header {
width: 100%;
}
-
}
.edit-site-layout__area {
diff --git a/packages/edit-site/src/components/resizable-frame/style.scss b/packages/edit-site/src/components/resizable-frame/style.scss
index 3247525cc2e16..98d367726f9bd 100644
--- a/packages/edit-site/src/components/resizable-frame/style.scss
+++ b/packages/edit-site/src/components/resizable-frame/style.scss
@@ -23,6 +23,7 @@
.edit-site-resizable-frame__inner-content {
position: absolute;
+ overflow: hidden;
z-index: 0;
inset: 0;
}
diff --git a/packages/edit-site/src/components/sidebar-navigation-item/style.scss b/packages/edit-site/src/components/sidebar-navigation-item/style.scss
index 908056d52af48..8cb5181fb30dd 100644
--- a/packages/edit-site/src/components/sidebar-navigation-item/style.scss
+++ b/packages/edit-site/src/components/sidebar-navigation-item/style.scss
@@ -1,7 +1,7 @@
.edit-site-sidebar-navigation-item.components-item {
color: $gray-600;
// 6px right padding to align with + button
- padding: $grid-unit-10 6px $grid-unit-10 $grid-unit-20;
+ padding: $grid-unit-10 $grid-unit-20;
border: none;
min-height: $grid-unit-50;
border-radius: $radius-block-ui;
diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss
index 44e266cdf6011..be6ce56f5c8a2 100644
--- a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss
+++ b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss
@@ -16,8 +16,6 @@
}
.edit-site-sidebar-navigation-screen__content {
- padding: 0 $grid-unit-20;
-
.components-item-group {
margin-left: -$grid-unit-20;
margin-right: -$grid-unit-20;
@@ -60,7 +58,7 @@
position: sticky;
top: 0;
background: $gray-900;
- padding-top: $grid-unit-60 + $header-height;
+ padding-top: $grid-unit-40;
margin-bottom: $grid-unit-10;
padding-bottom: $grid-unit-10;
z-index: z-index(".edit-site-sidebar-navigation-screen__title-icon");
diff --git a/packages/edit-site/src/components/sidebar/index.js b/packages/edit-site/src/components/sidebar/index.js
index 19cd55ae6fac2..0c99d3632d474 100644
--- a/packages/edit-site/src/components/sidebar/index.js
+++ b/packages/edit-site/src/components/sidebar/index.js
@@ -33,6 +33,7 @@ import { unlock } from '../../lock-unlock';
import SidebarNavigationScreenPages from '../sidebar-navigation-screen-pages';
import SidebarNavigationScreenPagesDataViews from '../sidebar-navigation-screen-pages-dataviews';
import SidebarNavigationScreenPage from '../sidebar-navigation-screen-page';
+import SiteHub from '../site-hub';
const { useLocation } = unlock( routerPrivateApis );
@@ -99,6 +100,7 @@ function Sidebar() {
return (
<>
+
{
- const { canvasMode, dashboardLink, homeUrl, siteTitle } = useSelect(
- ( select ) => {
- const { getCanvasMode, getSettings } = unlock(
- select( editSiteStore )
- );
-
- const {
- getSite,
- getUnstableBase, // Site index.
- } = select( coreStore );
+ const { homeUrl, siteTitle } = useSelect( ( select ) => {
+ const {
+ getSite,
+ getUnstableBase, // Site index.
+ } = select( coreStore );
- return {
- canvasMode: getCanvasMode(),
- dashboardLink:
- getSettings().__experimentalDashboardLink || 'index.php',
- homeUrl: getUnstableBase()?.home,
- siteTitle: getSite()?.title,
- };
- },
- []
- );
+ return {
+ homeUrl: getUnstableBase()?.home,
+ siteTitle: getSite()?.title,
+ };
+ }, [] );
const { open: openCommandCenter } = useDispatch( commandsStore );
- const disableMotion = useReducedMotion();
- const { setCanvasMode } = unlock( useDispatch( editSiteStore ) );
- const { clearSelectedBlock } = useDispatch( blockEditorStore );
- const { setDeviceType } = useDispatch( editorStore );
- const isBackToDashboardButton = canvasMode === 'view';
- const siteIconButtonProps = isBackToDashboardButton
- ? {
- href: dashboardLink,
- label: __( 'Go to the Dashboard' ),
- }
- : {
- href: dashboardLink, // We need to keep the `href` here so the component doesn't remount as a `