-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Distraction Free: Unify the header animation #62167
Conversation
Size Change: +2 B (0%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
@@ -292,37 +281,13 @@ export default function Editor( { isLoading } ) { | |||
} | |||
) } | |||
header={ | |||
<AnimatePresence initial={ false }> | |||
{ canvasMode === 'edit' && ( | |||
<motion.div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The main purpose of this PR is to move this animation within the "InterfaceSkeleton" component because the header is also animated there. So if these two animations are in two different places, they may cause conflicts (for instance the hover animation within the skeleton might trigger while the other animation is in progress...)
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@jasmussen yes, that's the issue that the other PR solves #61579 but while solving that particular bug, we revealed another bug that was discovered on Firefox in the other PR by @draganescu So the current PR is actually a fix for that hidden Firefox bug but you can consider it a refactoring PR for now:
|
Oh yes, thanks for restating that. Still caffeeinating. Here's a before: And after: They are close, except in the "after", the actual content of the toolbar animates down after a bit of a delay. Can that happen at the same time as the fade? FWIW, I'd change both animations, so that the whole bar animates down, with no fade, rather than just the contents of the bar. |
I removed the delays for the child animations. It's still not 100% the same as before but feels close. |
Very close, animation looks good: The bounce makes the contents of the toolbar briefly break the border, if you look closely. Easiest is probably to remove the bounce on the contents when they animate down. The height of those contents also need to be reduced by 1 or 2 px, probably related to @richtabor's recent PR to unify the borders: |
Ok, I removed the bouncing. I don't think I've touched the heights in this PR, so that's separate right? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a welcome change helping the unification effort and reducing the complexity of the UI orchestration in DFM by bringing all animations in the same place. The result is nearly identical to what WP6.5 has so this is something to totally 🚢
You're right, the half-pixel height offset is an issue in trunk as well. No blocker. |
Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: draganescu <andraganescu@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: draganescu <andraganescu@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
Related #52632
Extracted from #61579
Requirement for #62146
What?
This PR tweaks the DFM animation just a little bit in the post editor and also moves the appearance animation for the Header of the site editor to the InterfaceSkeleton component. The idea is that we now animate the header in a single place. (It's fine to keep its children animations though).
Testing Instructions
1- Check the animation of DFM in the post editor is good enough (the site editor is still broken like trunk)
2- Check that the header appears properly (outside DFM) when clicking the frame in the site editor.