block-experiments icon indicating copy to clipboard operation
block-experiments copied to clipboard

Improve support for block directory

Open johngodley opened this issue 3 years ago • 4 comments

A block.json file is needed for the wordpress.org block directory. This should be added, either manually for each plugin, or as part of the bundling process.

For example: https://jhalabi.com/blog/gutenberg-block-json

https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/block-api/block-metadata.md https://make.wordpress.org/plugins/2020/07/11/you-can-now-add-your-own-plugins-to-the-block-directory/ https://make.wordpress.org/core/2021/06/23/block-api-enhancements-in-wordpress-5-8/

johngodley avatar Jul 01 '21 15:07 johngodley

For reference, this is the direct link to the validator.

https://wordpress.org/plugins/developers/block-plugin-validator/

These are some notes from my experience publishing the Sketch block:

This block already had the block.json file present when first published...

  1. Adding the tag block to the readme.txt file made the plugin show in this listing https://wordpress.org/plugins/browse/block
  2. I "think" what ended up making it finally show in the inserter was the addition of the keys style, editorStyle, and editorScript to the block.json file. Though I'm not quite sure if this was the last thing needed, as it seemed there was some caching on the inserter search. I kept typing sketch on the inserter but the block still didn't appear after doing all of the above... Eventually I typed drawing which was one of the tags the plugin readme shows... It seems like at that point, the cache missed, and then the block started showing. After that, searching for sketch again started working as expected by showing the block

oskosk avatar Jul 01 '21 21:07 oskosk

Took the liberty to take action on the Waves, Starscape and Bauhaus plugins by doing the following

  • Adding block and blocks tags to their readme files.
  • Adding editorScript, editorStyle and style keys to their block.json

@ajlende I also took the liberty of bumping those plugins versions (hotfix number) so they'd be ready for a release on the plugin directory.

  • Bauhaus Centenary to 1.0.3 #219
  • Waves to 1.0.2 #220
  • Starscape to 1.0.3 #221

Please excuse if I did wrong here. Feel free to roll back (or I can do it) if these PRs were undesired. On the other hand I'd be glad to handle the publishing of these releases if you provide me with commit access to those plugins on the .org directory

oskosk avatar Jul 01 '21 22:07 oskosk

@oskosk I added you as a committer to them all. Thanks so much for fixing them all up!

ajlende avatar Jul 01 '21 23:07 ajlende

Bauhaus, Waves and Starscape now show on the inserter too 🥳

oskosk avatar Jul 02 '21 02:07 oskosk