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

Try: Remove opacity animation on canvas. #32266

Merged
merged 2 commits into from
May 28, 2021
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
2 changes: 0 additions & 2 deletions packages/edit-post/src/components/visual-editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ export default function VisualEditor( { styles } ) {
<AnimatePresence>
<motion.div
Copy link
Member

Choose a reason for hiding this comment

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

Could you also remove this div and AnimatePresence?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Aren't they needed for the canvas to be able to animate when you shift viewports or go into template editing mode? This is the full context:

							<AnimatePresence>
								<motion.div
									key={ isTemplateMode ? 'template' : 'post' }
								>

Copy link
Member

Choose a reason for hiding this comment

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

You removed the animation for that motion.div, so it won't do anything anymore.

Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if we had style targeting that div, specifically something about making it full height

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure what the best way is to search for this. The wrapping container, .edit-post-visual-editor__content-area, only appears once, and does not appear to target any child divs.

It worked well in my testing, but I'll keep an eye on this and follow up on anything that needs it!

key={ isTemplateMode ? 'template' : 'post' }
initial={ { opacity: 0 } }
animate={ { opacity: 1 } }
>
<WritingFlow>
{ ! isTemplateMode && (
Expand Down