-
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
InspectorControlsSlot: remove unused framer motion context forwarding #67522
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: -29 B (0%) Total Size: 1.83 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.
Nice cleanup, LGTM 🚀
@@ -1,11 +1,8 @@ | |||
/** | |||
* WordPress dependencies | |||
*/ | |||
import { | |||
__experimentalUseSlotFills as useSlotFills, | |||
__unstableMotionContext as MotionContext, |
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.
Now that we removed the last usage, I think this is a good time to remove the unstable MotionContext
re-export:
MotionContext as __unstableMotionContext, |
__unstableMotionContext, |
Looks like there's no usage in plugins:
https://wpdirectory.net/search/01JE66GHXATVJHR1K7PQQG074W
Can be done in a separate PR IMHO.
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.
I'm always hesitant about removing APIs, but that should be OK given that there are no usages.
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.
packages/block-editor/src/components/inspector-controls/slot.js
Outdated
Show resolved
Hide resolved
31b5711
to
07ddcb6
Compare
Flaky tests detected in 07ddcb6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12178770117
|
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.
🚀
…#67522) * InspectorControlsSlot: remove unused framer motion context forwarding * Remove computedFillProps, use fillProps directly --- Co-authored-by: ciampo <[email protected]> Co-authored-by: tyxla <[email protected]> Co-authored-by: jsnajdr <[email protected]>
What?
Stop forwarding Framer Motion's context in the inspector controls SlotFill
Why?
The forwarding was introduced in #50278, but shouldn't be necessary anymore after refactoring
ToggleGroupControl
andTabs
away fromframer-motion
.Removing unnecessary lines of code and runtime computation is always a good idea.
How?
Deleted the relevant lines of code.
Testing Instructions
Smoke tests a few different block controls in the inspector controls, make sure that they all work as expected, especially any framer-motion-based animation (if any).