-
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
Documentation/Tutorial issues/enhancements #6185
Comments
Agreed. The documentation at least needs a STEP-BY-STEP tutorial on how to build a plugin that registers a simple custom block using both ES5 and ES6. |
https://wordpress.org/gutenberg/handbook/blocks/ is a tutorial but as you noted, the links on the bottom are broken :( cc @pento All those subpages listed on the left side help you to create blocks using ES5 and ES.next.
This is already covered as noted above. We need to improve on page navigation.
It is part of the API. It is required to properly register a dynamic block. The one that is rendered on the server using
I'm not aware of anyone responsible for this handbook other than all of us :) So every PR that improves the docs is more than expected.
At this stage we don't plan to change APIs. There might be very subtle refinements, but you should consider everything stable.
Yes, sure. There is even section where such links are listed: https://wordpress.org/gutenberg/handbook/outreach/articles/#community-contribution and https://wordpress.org/gutenberg/handbook/outreach/articles/#article-compilations I didn't covered all questions, but I hope I helped where I could. Thanks for opening this issue 👍 |
I fixed the ordering of the previous/next footer links: https://meta.trac.wordpress.org/changeset/7118 |
Ah. OK. So, I'm gonna raise my hand ✋ and say that I got confused here because of a change that seems to have happened since I last tried to create a block: it looks like the PHP Realising this has certainly helped, as has @pento's change (thank you!). So my specific issues 2, 3, and 4 have all been fixed by this, I think.
I can't see this function documented anywhere (yet?). Have I missed it? Does it need adding? I also find the API page really hard to navigate and digest. The visual hierarchy really doesn't aid comprehension. The first few paragraphs demonstrate this... I'll try to take some time to make some PRs for some of this. But someone else may need to do some work on the API documentation design/styling - is this auto-generated from code at all? Thanks - we are making this better! 👍 |
Gutenberg handbook is manually crafted using markdown and converted to HTML using some tooling on WordPress.org. There is a plan to introduce other docs for code which would be machine-generated. |
The issue is with community tooling which isn't updated with the recent recommendations in Gutenberg handbook. |
As a note we'd like to include this in the new designer/dev handbook. If anyone wants to step up to write this tutorial, that would be super cool :) |
I think this issue is old and not actionable in the current state. The auto generation of documentation looks to be addressed in PR #13329 by @nosolosw So I think the main problems raised in this Issue have been or will be addressed. I'm going to mark as closed and please reopen, or add new issues if there is something I missed that still needs addressing. I'll be glad to help. |
I just chatted to Tammie at WordCamp London where she encouraged me to open an issue.
Overview of issue
The docs seem incomplete and confusing for developers coming to the handbook to work out how to create a custom block for the first time.
Background
I confess that I've never actually created a block. Rather then use one of the existing scaffolds/boilerplates I decided I'd try starting by writing a simple plugin that used ES5 JS to create a simple block.
I thought I'd find the information I needed to do this in the Handbook. But I quickly ran into dead ends and realised that the handbook does not currently help someone do this (perhaps this is a not what the handbook is intended for?)
(Some) specific issues
enqueue_block_editor_assets
andenqueue_block_assets
hooksregister_block_type
function that is shown on this page but that doesn't seem to be in the block API (because it's probably not part of the block API as such) or in the reference sectionQuestions/what next?
I decided to open this rather than to dive into creating PRs because I'm not sure just going and adding/changing a load of stuff at this point is the right thing to do.
Questions then:
Thanks
The text was updated successfully, but these errors were encountered: