Skip to content
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

Improve support for block directory #215

Open
johngodley opened this issue Jul 1, 2021 · 4 comments
Open

Improve support for block directory #215

johngodley opened this issue Jul 1, 2021 · 4 comments
Labels
Enhancement New feature or request

Comments

@johngodley
Copy link
Member

johngodley commented Jul 1, 2021

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 johngodley added the Enhancement New feature or request label Jul 1, 2021
@oskosk
Copy link
Contributor

oskosk commented Jul 1, 2021

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
Copy link
Contributor

oskosk commented Jul 1, 2021

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.

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

@ajlende
Copy link
Contributor

ajlende commented Jul 1, 2021

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

@oskosk
Copy link
Contributor

oskosk commented Jul 2, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants