-
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
Stabilize __experimentalMoverDirection InnerBlocks prop and rename to orientation #23416
Stabilize __experimentalMoverDirection InnerBlocks prop and rename to orientation #23416
Conversation
__experimentalMoverDirection
to __experimentalBlockListOrientation
packages/block-editor/src/components/block-list/block-popover.js
Outdated
Show resolved
Hide resolved
Size Change: -266 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
@@ -45,7 +45,7 @@ function UncontrolledInnerBlocks( props ) { | |||
forwardedRef, | |||
templateInsertUpdatesSelection, | |||
__experimentalCaptureToolbars: captureToolbars, | |||
__experimentalMoverDirection, | |||
__experimentalBlockListOrientation, |
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.
maybe it could be just "orientation" and make it stable? do we expect any other changes to this API?
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 don't think so, sounds good to me to stabilize it.
ed7a33d
to
288e652
Compare
af82e63
to
1c73a82
Compare
clientIds={ blockClientIds } | ||
__experimentalOrientation={ moverDirection } | ||
/> | ||
<BlockMover clientIds={ blockClientIds } /> |
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.
Removed the not needed prop here.
@@ -195,7 +194,6 @@ function BlockPopover( { | |||
<BlockSelectionButton | |||
clientId={ clientId } | |||
rootClientId={ rootClientId } | |||
moverDirection={ moverDirection } |
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.
Made BlockSelectionButton use its own selector instead of requiring a prop.
This should be ready for a re-review. It's largely just a re-name apart from the two comments I've mentioned above. The property is now called Is there a good label for this change? I'm not sure if |
yes, New API sounds good. thanks @talldan |
Co-authored-by: Riad Benguella <[email protected]>
Are we expecting more than two orientations? If it's a binary thing, a boolean prop could avoid a string, which I think is a bit cleaner. |
I think a binary doesn't convey the right message. You can say Whether we'll have other values, I'm not sure but potentially something like "grid" could be supported or "both". |
@youknowriad Makes sense :) |
I’d loooove grid someday! Thanks for stabilising this API yall! |
Description
As mentioned in #23020 (comment), the
__experimentalMoverDirection
block list setting is now being use for a lot more than establishing the mover direction. While it's experimental and not stable, it'd be a good opportunity to rename it.This PR changes it to
__experimentalBlockListOrientation
. Other suggestions welcome.Should we also consider stabilizing/documenting this API?
How has this been tested?
Manual testing
Types of changes
Non-breaking code quality
Checklist: