Skip to content

Commit

Permalink
Try: Remove opacity animation on canvas. (#32266)
Browse files Browse the repository at this point in the history
* Try: Remove opacity animation on canvas.

* Remove divs.
  • Loading branch information
jasmussen authored and youknowriad committed May 31, 2021
1 parent f02961c commit a44a226
Showing 1 changed file with 23 additions and 31 deletions.
54 changes: 23 additions & 31 deletions packages/edit-post/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* External dependencies
*/
import classnames from 'classnames';
import { motion, AnimatePresence } from 'framer-motion';
import { motion } from 'framer-motion';

/**
* WordPress dependencies
Expand Down Expand Up @@ -217,36 +217,28 @@ export default function VisualEditor( { styles } ) {
layout={ defaultLayout }
/>
) }
<AnimatePresence>
<motion.div
key={ isTemplateMode ? 'template' : 'post' }
initial={ { opacity: 0 } }
animate={ { opacity: 1 } }
>
<WritingFlow>
{ ! isTemplateMode && (
<div className="edit-post-visual-editor__post-title-wrapper">
<PostTitle />
</div>
) }
<RecursionProvider>
<BlockList
__experimentalLayout={
themeSupportsLayout
? {
type: 'default',
// Find a way to inject this in the support flag code (hooks).
alignments: themeSupportsLayout
? alignments
: undefined,
}
: undefined
}
/>
</RecursionProvider>
</WritingFlow>
</motion.div>
</AnimatePresence>
<WritingFlow>
{ ! isTemplateMode && (
<div className="edit-post-visual-editor__post-title-wrapper">
<PostTitle />
</div>
) }
<RecursionProvider>
<BlockList
__experimentalLayout={
themeSupportsLayout
? {
type: 'default',
// Find a way to inject this in the support flag code (hooks).
alignments: themeSupportsLayout
? alignments
: undefined,
}
: undefined
}
/>
</RecursionProvider>
</WritingFlow>
</MaybeIframe>
</motion.div>
</motion.div>
Expand Down

0 comments on commit a44a226

Please sign in to comment.