Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add block collections #17609
As proposed in #16866, this adds a new function
This enables blocks to be added to both collections and categories, ensuring that blocks can be put in the category that they make the most sense in, but also make it possible to see all the blocks coming from a single source.
How has this been tested?
Tested in Chrome on a .org installation with no other plugins.
Types of changes
New feature (non-breaking change which adds functionality)
gziolo left a comment
This is definitely a good direction. It raises some questions like:
We still need documentation, a note in the changelog and unit tests for new APIs.
Thanks for the review @gziolo. Some thoughts:
I think there is still value in the custom categories. The way I see it this just adds another option for block developers, but they can continue doing it how they are without a problem.
how do we encourage plugin developers to use collections instead of categories?
I'll add it to the docs.
One more question, how this would work for blocks registered on the server? Do you think this should be something which should be handled only on the front-end?
One more thing, as far as I remember, all the APIs that register something take an object as 2nd param. Should we follow the same pattern here? In general, it's more flexible as it allows to easily introduce more options in the future.
I think having it front-end only is fine for now. We can add a server side option for it if there's a demand.