Skip to content

Commit

Permalink
Site editor: remove isResizing variable from layout component as it…
Browse files Browse the repository at this point in the history
… is always false (#57119)
  • Loading branch information
oandregal authored Dec 15, 2023
1 parent 04b5889 commit 9879b85
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export default function Layout() {
( isMobileViewport && isListPage ) || ( isEditorPage && isEditing );
const [ canvasResizer, canvasSize ] = useResizeObserver();
const [ fullResizer ] = useResizeObserver();
const [ isResizing ] = useState( false );
const isEditorLoading = useIsSiteEditorLoading();
const [ isResizableFrameOversized, setIsResizableFrameOversized ] =
useState( false );
Expand Down Expand Up @@ -307,14 +306,7 @@ export default function Layout() {
<>
{ isListPage && <PageMain /> }
{ isEditorPage && (
<div
className={ classnames(
'edit-site-layout__canvas-container',
{
'is-resizing': isResizing,
}
) }
>
<div className="edit-site-layout__canvas-container">
{ canvasResizer }
{ !! canvasSize.width && (
<motion.div
Expand All @@ -325,8 +317,7 @@ export default function Layout() {
scale: 1.005,
transition: {
duration:
disableMotion ||
isResizing
disableMotion
? 0
: 0.5,
ease: 'easeOut',
Expand All @@ -345,10 +336,9 @@ export default function Layout() {
) }
transition={ {
type: 'tween',
duration:
disableMotion || isResizing
? 0
: ANIMATION_DURATION,
duration: disableMotion
? 0
: ANIMATION_DURATION,
ease: 'easeOut',
} }
>
Expand Down

1 comment on commit 9879b85

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 9879b85.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7225847601
📝 Reported issues:

Please sign in to comment.