-
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
useInnerBlocksProps: Make dropZoneElement private, access via PrivateBlockList #56308
useInnerBlocksProps: Make dropZoneElement private, access via PrivateBlockList #56308
Conversation
Size Change: +67 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
Flaky tests detected in ba2a932. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6924152507
|
Update: I have also opened an alternative PR that takes the simpler approach of stabilising the property instead, over in #56313 — I think that might be the preferable approach as after digging into a prototype in #56312, I believe we'll likely need the prop on |
I trust your judgement here, both options work for me. we just should stop using the prefixes. |
Thanks for confirming, Riad! I'll close this one out, and merge the stabilisation PR. |
What?
Follow-up to #56070 to make the
dropZoneElement
used inuseInnerBlocksProps
private for now, as suggested in this comment: #56070 (comment) from @youknowriad.Note
A potential alternative that is simpler and might be a better direction, is to stabilise the property, which is also explored over in #56313 — I'd love to hear if folks prefer the idea of stabilising for now, or making private for now.
Why?
Currently the API for
dropZoneElement
is unstable foruseInnerBlocksProps
andBlockList
as we're not 100% certain if this should be a public API. It is however stable foruseBlockDropZone
where it is stable.If the API is to remain unstable, then for now, it would be better to make the API private.
An alternative to this PR would be to stabilise
dropZoneElement
inuseInnerBlocksProps
andBlockList
— I'm happy to try that if there is consensus that we think we should support exposing it there in the long-term.Also, let me know if anyone can think of a simpler way of making these props private.
How?
useInnerBlocksProps
tousePrivateInnerBlocksProps
so that it can usedropZoneElement
internallyuseInnerBlocksProps
back in as an export, and internally overridedropZoneElement
to make it privateBlockList
'sRoot
component, useusePrivateInnerBlocksProps
so that we can supportdropZoneElement
internallyPrivateBlockList
that supportsdropZoneElement
BlockList
overridedropZoneElement
to make it privateTesting Instructions
Mostly ensure that #56070 works as expected and that this PR does not break
useInnerBlocksProps
in any wayuseInnerBlocksProps
works as on trunk, via testing container blocks such as Columns, Group, Gallery, etc