Repository navigation
useInnerBlocksProps: Make dropZoneElement private, access via PrivateBlockList - #56308
andrewserong wants to merge 1 commit into
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
dropZoneElementused inuseInnerBlocksPropsprivate 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
dropZoneElementis unstable foruseInnerBlocksPropsandBlockListas we're not 100% certain if this should be a public API. It is however stable foruseBlockDropZonewhere 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
dropZoneElementinuseInnerBlocksPropsandBlockList— 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?
useInnerBlocksPropstousePrivateInnerBlocksPropsso that it can usedropZoneElementinternallyuseInnerBlocksPropsback in as an export, and internally overridedropZoneElementto make it privateBlockList'sRootcomponent, useusePrivateInnerBlocksPropsso that we can supportdropZoneElementinternallyPrivateBlockListthat supportsdropZoneElementBlockListoverridedropZoneElementto make it privateTesting Instructions
Mostly ensure that #56070 works as expected and that this PR does not break
useInnerBlocksPropsin any wayuseInnerBlocksPropsworks as on trunk, via testing container blocks such as Columns, Group, Gallery, etc