bobbingwide / sb-children-block

List children of the current content as links.
2 stars 0 forks source link

Improve documentation / format of the Depth attribute #7

Closed bobbingwide closed 1 year ago

bobbingwide commented 4 years ago

In #1 I produced a table documenting the possible values for the Depth attribute.

depth= Meaning
0 Any depth
1 Children
2 Children and grandchildren
n>2 More descendants
-1 Don't show the nesting

Now I need to find a way of providing this as help to the block user.

My first pass is to add a help= parameter to the <TextControl>. See https://developer.wordpress.org/block-editor/components/text-control/#development-guidelines

A future version may make use of the <RangeControl>. See https://developer.wordpress.org/block-editor/components/range-control/

bobbingwide commented 1 year ago

The help text in v1.2.0 is "0 for all levels, 1-n for defined,-1 for flat."