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

Support new block collection functionality in WordPress 5.4 #1367

Merged
merged 9 commits into from
Mar 3, 2020

Conversation

richtabor
Copy link
Contributor

Description

WordPress 5.4 adds support for block collections; i.e. groups of blocks from a plugin. This allows for plugins like ours to add our blocks in the proper categories within the block library - while also still providing a section of the library just for our blocks.

The one addition I added was renaming the "CoBlocks Galleries" category to simply "Galleries".

There's a PR to simplify the inserter categories in Gutenberg (WordPress/gutenberg#19279) , which when implemented we could simply assign our gallery blocks within the upcoming "Media" category.

Screenshots

Screen Shot 2020-02-18 at 9 27 02 PM

Types of changes

New feature (non-breaking change which adds functionality). Although this change should be merged when we're ready for WordPress 5.4. < WP 5.4 will work fine, but registerBlockCollection is not available - so while the "CoBlocks" category is missing, the blocks are found within their respective new categories.

Checklist:

  • My code is tested
  • My code follows accessibility standards
  • I've added proper labels to this pull request

@richtabor richtabor added [Type] Enhancement Something new that adds functionality [Priority] Low This issue/pull request is not immediate [Status] Waiting Issues/PRs that are on hold labels Feb 19, 2020
@richtabor richtabor self-assigned this Feb 19, 2020
@simison
Copy link

simison commented Feb 19, 2020

Although this change should be merged when we're ready for WordPress 5.4. < WP 5.4 will work fine, but registerBlockCollection is not available - so while the "CoBlocks" category is missing, the blocks are found within their respective new categories.

You could look into conditionally registering into collection vs category depending on feature availability. Example here:

Automattic/jetpack#14454

@richtabor richtabor added this to the Next Release milestone Feb 24, 2020
@richtabor richtabor added [Status] In Progress Tracking issues with work in progress and removed [Status] Waiting Issues/PRs that are on hold labels Feb 24, 2020
@cypress
Copy link

cypress bot commented Feb 26, 2020



Test summary

105 0 0 0


Run details

Project CoBlocks
Status Passed
Commit 6e63957
Started Mar 3, 2020 10:25 PM
Ended Mar 3, 2020 10:30 PM
Duration 04:30 💡
OS Linux Debian - 10.3
Browser Chrome 80

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@AnthonyLedesma AnthonyLedesma added [Status] Needs Review Tracking pull requests that need another set of eyes and removed [Status] In Progress Tracking issues with work in progress labels Feb 26, 2020
@AnthonyLedesma
Copy link
Member

@jrtashjian Ready for review.
Tested with
WP 5.3.2, WP 5.4beta, and the Gutenberg plugin.

@AnthonyLedesma AnthonyLedesma removed their request for review February 26, 2020 15:28
@simison
Copy link

simison commented Feb 27, 2020

You got highlighted! ;-)

https://make.wordpress.org/core/2020/02/27/block-collections/

Copy link
Member

@jrtashjian jrtashjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@jrtashjian jrtashjian changed the title Try block collections Support new block collection functionality in WordPress 5.4 Mar 3, 2020
@jrtashjian jrtashjian merged commit e3cd3b4 into master Mar 3, 2020
@jrtashjian jrtashjian deleted the try/block-collections branch March 3, 2020 22:31
@jrtashjian jrtashjian added [Status] Ready to Merge Tracking pull requests that are 100% approved and passing, ready to merge into master and removed [Status] Needs Review Tracking pull requests that need another set of eyes labels Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] Low This issue/pull request is not immediate [Status] Ready to Merge Tracking pull requests that are 100% approved and passing, ready to merge into master [Type] Enhancement Something new that adds functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants