diff --git a/packages/edit-site/src/components/editor/index.js b/packages/edit-site/src/components/editor/index.js
index ada8367f701748..0384b3c80ab42d 100644
--- a/packages/edit-site/src/components/editor/index.js
+++ b/packages/edit-site/src/components/editor/index.js
@@ -7,16 +7,8 @@ import clsx from 'clsx';
* WordPress dependencies
*/
import { useDispatch, useSelect } from '@wordpress/data';
-import {
- Notice,
- __unstableAnimatePresence as AnimatePresence,
- __unstableMotion as motion,
-} from '@wordpress/components';
-import {
- useInstanceId,
- useViewportMatch,
- useReducedMotion,
-} from '@wordpress/compose';
+import { Notice } from '@wordpress/components';
+import { useInstanceId, useViewportMatch } from '@wordpress/compose';
import { store as preferencesStore } from '@wordpress/preferences';
import {
BlockBreadcrumb,
@@ -80,8 +72,6 @@ const interfaceLabels = {
header: __( 'Editor top bar' ),
};
-const ANIMATION_DURATION = 0.25;
-
export default function Editor( { isLoading } ) {
const {
record: editedPost,
@@ -92,7 +82,6 @@ export default function Editor( { isLoading } ) {
const { type: editedPostType } = editedPost;
const isLargeViewport = useViewportMatch( 'medium' );
- const disableMotion = useReducedMotion();
const {
context,
@@ -292,37 +281,13 @@ export default function Editor( { isLoading } ) {
}
) }
header={
-
- { canvasMode === 'edit' && (
-
-
-
- ) }
-
+ canvasMode === 'edit' && (
+
+ )
}
actions={
-
+
+
+
{ ! customSaveButton && ! isPublishSidebarOpened && (
diff --git a/packages/interface/src/components/interface-skeleton/index.js b/packages/interface/src/components/interface-skeleton/index.js
index dc04ccec6fe5e5..81d95a97602737 100644
--- a/packages/interface/src/components/interface-skeleton/index.js
+++ b/packages/interface/src/components/interface-skeleton/index.js
@@ -26,6 +26,11 @@ import {
import NavigableRegion from '../navigable-region';
const ANIMATION_DURATION = 0.25;
+const commonTransition = {
+ type: 'tween',
+ duration: ANIMATION_DURATION,
+ ease: [ 0.6, 0, 0.4, 1 ],
+};
function useHTMLClass( className ) {
useEffect( () => {
@@ -42,12 +47,30 @@ function useHTMLClass( className ) {
}
const headerVariants = {
- hidden: { opacity: 0 },
- hover: {
+ hidden: { opacity: 1, marginTop: -60 },
+ visible: { opacity: 1, marginTop: 0 },
+ distractionFreeHover: {
opacity: 1,
- transition: { type: 'tween', delay: 0.2, delayChildren: 0.2 },
+ marginTop: 0,
+ transition: {
+ ...commonTransition,
+ delay: 0.2,
+ delayChildren: 0.2,
+ },
+ },
+ distractionFreeHidden: {
+ opacity: 0,
+ marginTop: -60,
+ },
+ distractionFreeDisabled: {
+ opacity: 0,
+ marginTop: 0,
+ transition: {
+ ...commonTransition,
+ delay: 0.8,
+ delayChildren: 0.8,
+ },
},
- distractionFreeInactive: { opacity: 1, transition: { delay: 0 } },
};
function InterfaceSkeleton(
@@ -114,36 +137,39 @@ function InterfaceSkeleton(
) }
>
- { !! header && (
-
- { header }
-
- ) }
+
+ { !! header && (
+
+ { header }
+
+ ) }
+
{ isDistractionFree && (
{ editorNotices }