From 98c950170964a003e6ebc726928bde73f908423e Mon Sep 17 00:00:00 2001 From: Daniel Richards Date: Tue, 4 Jul 2023 17:49:32 +0800 Subject: [PATCH] Try restoring the site editor animation (#51956) * Try restoring the site editor animation * fix header animation * Remove accidental addition of layout prop * tidy up formatting * fix animate presence issue * Fix animation between sidebar view and distraction free edit view * Leave sidebar present and maintain canvas to sidebar animation The sidebar is necessary for routing on mobile so we have to maintain its presence in the DOM. Just hiding it isn't enough though, as it is still able to be reached with keyboard tabs and screen readers. Using the relatively new `inert` property disables the element from user interaction, so we add that when we don't want the sidebar to be shown. * Fix mobile view for pattern library On Mobile, the canvas mode wasn't being set to edit when using the pattern library. This updates it to use the showSidbar value instead, keeping it in sync with the inert setting. --------- Co-authored-by: Saxon Fletcher Co-authored-by: Jerry Jones --- .../edit-site/src/components/layout/index.js | 81 +++++++++---------- 1 file changed, 38 insertions(+), 43 deletions(-) diff --git a/packages/edit-site/src/components/layout/index.js b/packages/edit-site/src/components/layout/index.js index bbe9d7ff707ca6..cd7890649c60af 100644 --- a/packages/edit-site/src/components/layout/index.js +++ b/packages/edit-site/src/components/layout/index.js @@ -224,14 +224,25 @@ export default function Layout() { { isEditorPage && isEditing && ( - { isEditing &&
} +
) }
- - { - - - - - - } - + + + + +