WordPress/gutenberg

Documentation: Clarify the behavior of parent when empty during block registration

Open

#15,731 创建于 2019年5月20日

在 GitHub 查看
 (5 评论) (1 反应) (0 负责人)JavaScript (9,607 star) (3,893 fork)batch import
Good First IssueNeeds Dev[Feature] Block API[Type] Developer Documentation

描述

Part of https://github.com/WordPress/gutenberg/issues/41236.

Describe the bug

https://developer.wordpress.org/block-editor/developers/block-api/block-registration/#parent-optional

It might be good to update the documentation here to clarify that you can restrict it to the root if you pass an empty array. (Also good to check if there are tests for this or if it just happens to work.)

This also leads to the question what the default is for this parameter. undefined? null? In any case just "Type: Array" doesn't seem correct.

贡献者指南