-
Notifications
You must be signed in to change notification settings - Fork 800
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
Gutenberg: jetpack_set_available_blocks revert to get data only from manifest file #10844
Conversation
D21879-code. (newly created revision) |
This is automated check which relies on |
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 works well on my end. Small nitpick though, about the docblock you edited.
class.jetpack-gutenberg.php
Outdated
@@ -124,7 +124,6 @@ public static function get_preset( $preset ) { | |||
/** | |||
* Filters the results of `apply_filter( 'jetpack_set_available_blocks', array() )` | |||
* using the merged contents of `blocks-manifest.json` ( $preset_blocks ) |
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.
You'll need to update that comment since there is no merging happening anymore.
0b79807
to
4deb036
Compare
Only use the filter that applies index.json blocks in development mode or if the `JETPACK_BETA_BLOCKS` are trying to be used.
4deb036
to
ac38bc3
Compare
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.
other than a couple of minor format remarks, 🚢 IT
I am sorry, I may be a bit slow, but I am not sure I understand what is happening here. What do you think about updating https://github.com/Automattic/jetpack/blob/master/docs/guides/gutenberg-blocks.md to mention the different ways a block should be registered:
If I were to add a new block to Jetpack today, how should I go about it basically? Where should the block be added? I would have the same question for plugins, since it seems they are now treated differently, and appear on 3 lists? I think some documentation about all this may help me, and maybe others in the future :) |
Is this still valid? If so, it would need a rebase, and addressing the questions I had above. |
I'm closing, I believe this was superseded by other work like #11075. If that's not the case, please reopen. |
Simplifies the logic in what blocks are available by pulling the data from a single place the
block-manifest.json
.Changes proposed in this Pull Request:
Testing instructions:
cc: @roccotripaldi, @simison