-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Tabs: move animation-related utilities into separate utils file. #62946
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: 0 B Total Size: 1.76 MB ℹ️ View Unchanged
|
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.
Just left a couple of comments, but overall looking good (let's also add a CHANGELOG entry, could be using the same entry as #62942)
I addressed all comments, please re-review @ciampo @WordPress/gutenberg-components :) |
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.
LGTM 🚀
Can be merged once open feedback is addressed.
As for the next steps, here's a recap of what I gathered from all conversations in this PR:
- move
useEvent
to the@wordpress/compose
package - resume work on Support a new API for useResizeObserver #41001, and see if we can provide a new version of the hook based on modern Web technologies that satisfies the requirements of its consumers in the editor, providing a good, non-breaking migration strategy
- [optional] review the structure and organisation of the
packages/components/src/utils/
folder - refactor
ToggleGroupControl
to use the newly introduced utils to animate its indicator without usingframer-motion
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.
Should this file be renamed use-track-element-offset-rec.ts
to match how other files are named, and moved to the hooks
directory?
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.
It contains multiple utilities related to tracking and obtaining element rects, and they are a mix of hooks and other things, so it wouldn't make sense to do so without completely dislocating all of these utilities. It's why I raised the point that the utils folder just doesn't have a good structure.
@ciampo yep, got all of that on my backlog already 👍 |
…dPress#62946) * Split animation logic into multiple separate composable utilities. * JSDoc tweak. * Tabs: move animation-related utilities into separate utils file. * Rename hook and update some docs. * Revert eslint rule and disable for the file. * Re-organize utils to fit current structure better. Co-authored-by: DaniGuardiola <[email protected]> Co-authored-by: ciampo <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: mirka <[email protected]>
Note: #62942 needs to be merged first
What?
Move animation-related utilities from Tabs into separate utils file.
Why?
For future use in other components. Related: #62942