Skip to content

Commit

Permalink
Remove outdated padding animation
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed May 10, 2023
1 parent 1ec7597 commit 28ba8d7
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,13 @@ export default function Layout() {
} );
const disableMotion = useReducedMotion();
const isMobileViewport = useViewportMatch( 'medium', '<' );
const canvasPadding = isMobileViewport ? 0 : 24;
const showSidebar =
( isMobileViewport && ! isListPage ) ||
( ! isMobileViewport && ( canvasMode === 'view' || ! isEditorPage ) );
const showCanvas =
( isMobileViewport && isEditorPage && isEditing ) ||
! isMobileViewport ||
! isEditorPage;
const showFrame =
( ! isEditorPage && ! isMobileViewport ) ||
( ! isMobileViewport && isEditorPage && canvasMode === 'view' );
const isFullCanvas =
( isMobileViewport && isListPage ) || ( isEditorPage && isEditing );
const [ canvasResizer, canvasSize ] = useResizeObserver();
Expand Down Expand Up @@ -193,18 +189,13 @@ export default function Layout() {
<SavePanel />

{ showCanvas && (
<motion.div
<div
className={ classnames(
'edit-site-layout__canvas-container',
{
'is-resizing': isResizing,
}
) }
animate={ {
paddingTop: showFrame ? canvasPadding : 0,
paddingBottom: showFrame ? canvasPadding : 0,
} }
transition={ { duration: ANIMATION_DURATION } }
>
{ canvasResizer }
{ !! canvasSize.width && (
Expand Down Expand Up @@ -254,7 +245,7 @@ export default function Layout() {
</ErrorBoundary>
</motion.div>
) }
</motion.div>
</div>
) }
</div>
</div>
Expand Down

0 comments on commit 28ba8d7

Please sign in to comment.