-
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
DocumentBar: Simplify component, use framer for animation #58656
Conversation
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. |
Size Change: -114 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
I like all the proposed changes here. Thanks for this work Robert :) |
I believe the back buttons have been unified on trunk though, so this probably needs refreshing. |
3e98761
to
0de3c9e
Compare
Trunk 2024-02-20.13.15.50.mp4This PR 2024-02-20.13.12.45.mp4 |
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.
Thanks for the review 🙂 it pleases me to get rid of that |
What and why
Simplifies the
DocumentBar
the component.I split these changes out of #58528.
DocumentBar
andBaseDocumentActions
. Having the component split up like this made sense back when we would conditionally return a different "base" component depending on the rendering mode. We don't do that now, though, so it just adds unnecessarily complexity.useSelect()
anduseEntityRecord
hooks into a singleuseSelect
. This is simpler and ought to result in less updates.is-animated
CSS class which is added on mount. I originally used framer when implementing the animation in DocumentActions: Animate between page and template mode #51224 but had to get rid of it because we were rendering different base components depending on the mode (see above). We no longer do that.Testing Instructions