Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site editor: remove isResizing variable from layout component as it is always false #57119

Merged
merged 2 commits into from
Dec 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 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 @@ -309,10 +308,7 @@ export default function Layout() {
{ isEditorPage && (
<div
className={ classnames(
Copy link
Contributor

Choose a reason for hiding this comment

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

The classnames call is useless here as well.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, removed it 7b94302

'edit-site-layout__canvas-container',
{
'is-resizing': isResizing,
}
'edit-site-layout__canvas-container'
) }
>
{ canvasResizer }
Expand All @@ -325,8 +321,7 @@ export default function Layout() {
scale: 1.005,
transition: {
duration:
disableMotion ||
isResizing
disableMotion
? 0
: 0.5,
ease: 'easeOut',
Expand All @@ -345,10 +340,9 @@ export default function Layout() {
) }
transition={ {
type: 'tween',
duration:
disableMotion || isResizing
? 0
: ANIMATION_DURATION,
duration: disableMotion
? 0
: ANIMATION_DURATION,
ease: 'easeOut',
} }
>
Expand Down
Loading