-
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
Add nested block / inner block to tutorial #17559
Conversation
174d1b1
to
70cc70a
Compare
Adds an exmaple using InnerBlocks to the block tutorial
70cc70a
to
b9b7e0c
Compare
@@ -86,7 +86,9 @@ | |||
{ "docs/designers-developers/developers/tutorials/block-tutorial/introducing-attributes-and-editable-fields.md": [] }, | |||
{ "docs/designers-developers/developers/tutorials/block-tutorial/block-controls-toolbar-and-sidebar.md": [] }, | |||
{ "docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md": [] }, | |||
{ "docs/designers-developers/developers/tutorials/block-tutorial/generate-blocks-with-wp-cli.md": [] } | |||
{ "docs/designers-developers/developers/tutorials/block-tutorial/generate-blocks-with-wp-cli.md": [] }, |
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.
How about shifting the order and having the inner blocks tutorial first? The steps of the block tutorial look clearer that way (build more complex things as you advanced) and the rhythm doesn't get broken by the CLI tutorial (which isn't about things you could use to build blocks but block set up instead).
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'm wondering if this CLI tutorial is still up to date 🤔
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.
Yeh, I kinda want to remove the CLI suggestion. I was going to post about that in a separate PR. I'm not sure if the scaffolding that it generates is really what we want.
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.
It may be worth revisiting the CLI part, even to delete it. In the meantime, I think that section fits better after the nested/inner blocks tutorial.
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Outdated
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Outdated
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Outdated
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Outdated
Show resolved
Hide resolved
I've gone too tactical perhaps in that I've commented on little things here and there. My bigger question is: do we require this new addition to the block tutorial to be a full working example with the corresponding code in gutenberg-examples repo? The other parts of the tutorial do have that, so I guess we should follow that pattern. If we feel that we can do differently, I'm open to other approaches. |
Thanks for the improvements! Co-Authored-By: Andrés <nosolosw@users.noreply.github.com>
@nosolosw yes, I think we should add it to gutenberg-examples repo, but that should not be necessary for merge, it is better to get some documentation up than none. The gutenberg-examples repo being numbered makes it tricky to add items to it. Since I think this one could fit in-between other lessons. I also don't like the disconnect between the explanation in the tutorial and the examples repo, but not quite sure how to solve. So I've been mulling over how we could adopt and change that repo, but haven't really come up with something concrete enough to propose. |
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Outdated
Show resolved
Hide resolved
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've left a couple of comments; otherwise, this can be merged.
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Outdated
Show resolved
Hide resolved
docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
Outdated
Show resolved
Hide resolved
I've created WordPress/gutenberg-examples#102 to port this example to gutenberg-examples. |
Co-Authored-By: Andrés <nosolosw@users.noreply.github.com>
Description
Adds a new page to the block tutorial for Nested Blocks using InnerBlocks.
How has this been tested?
Follow documentation and confirm it works. View live on branch here.
Types of changes
Documentation.