-
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
Docs: add tutorial for creating a custom block editor instance #20410
Conversation
Size Change: 0 B Total Size: 863 kB ℹ️ View Unchanged
|
Question - as it's quite long, should we split this tutorial up over multiple (interlinked) files with one per "section"? This might make it easier to consume. |
Wow, this is an awesome tutorial to include 🥇
@mkaz or @nosolosw - might have the best answer here as they authored several existing tutorials. |
@getdave – it would be nice to optimize the size of media included because it's something all contributors will have to download. Ideally, all those assets are hosted outside of git so we don't keep all versions in its history. |
Thanks 🙇
I've resized to 800px in width and run through an image optimizer. Now slimmed down.
Do we have a preference for where? |
@getdave @gziolo I've split between one long post, or multiple pages. I think my preference now is a single long post with anchor links on the headings that make them bookmarkable so you can link/jump to any section. As far as assets, we don't have a great solution. Previously we've attached them to Github tickets and then referred to the absolute URL being served from Github. If you have author writes, you can also upload to the developer.wordpress.org blog media library and use the absolute URL from there. |
@mapk or @karmatosed – what's the preferred approach for design-related assets? We should follow the same approach. |
Regardless of precedent, I would strongly advocate against including image assets in the repository, since this adds significant non-recoverable, non-diffable growth to the downloaded clone size of the repository, which already exceeds 300MB. At least in the context of GitHub, it's fairly straight-forward and consistent to use GitHub's image uploading (via comment box or issue form). It's maybe questionable in how we sync this content to WordPress.org. It should still work, I expect. Alternatives like Cloudup, WordPress.com, or WordPress.org (for those with access) could be possible as well. |
@getdave could your sample repo be a candidate to move into the |
I think this would be a good candidate to move to a new section I just created in the developer documents ( PR #20666 ) for Gutenberg as a Platform. I believe @youknowriad discussed it previously with me about needing a spot for documents on developers using Gutenberg Packages, not just for extending within WordPress but for any app development. I feel your tutorial fits this nicely. Your tutorial is great, and provides a ton of knowledge to learn the platform, but better in an advanced section. The tutorials section feels like it should focus more on things a WordPress developer would do for creating a plugin to extend the editor or other parts of WP. Thoughts? |
@mkaz All done. Please could you 👍 if you're happy?
@mkaz Agreed. Could you let me know the anticipated timeline for when your PR might land? I'm keen to get this tutorial merged as soon as I can so things don't change underneath me 😄 |
I think the PR #20666 is ready to go now, its more of a stub page for things to be added to as we go. If you can give me a 👍 there I'll merge it in. Then you can adjust this PR to move into that new directory and we'll be good to ship. Does that work? |
About to sort out media files |
…itor This is copy/pasted from my original at https://github.com/getdave/standalone-block-editor
d2768ad
to
0ee024c
Compare
@mkaz Shall I just create |
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.
This is looking good, thanks!
@getdave Great tutorial! I can't find it in the block editor handbook: https://developer.wordpress.org/block-editor/ |
It is also listed on the bottom of this page: https://developer.wordpress.org/block-editor/developers/platform/ But the link doesn't work and everything looks right, is that because it's not in the Table of Contents? |
Description
I wrote a "tutorial" (more a "walkthrough guide") on creating a custom instance of the block editor within WP Admin.
This is highly relevant as the Full Site Editing project editor starts to expand the editor beyond Post content.
This tutorial was originally published on a standalone repo, but having spoken with @youknowriad he's suggested it might be useful as a public tutorial within the Gutenberg docs.
This PR:
Note that the code for the tutorial still lives in the original repo. I wonder whether this should be moved within the Gutenberg project somehow to ensure it is preserved.
How has this been tested?
This tutorial has been reviewed by members of the Core team including @epiqueras and @youknowriad.
To test you can:
Types of changes
New feature (non-breaking change which adds functionality).
Checklist: