Should developers bundle block patterns with their themes or submit them to the WordPress.org directory? That is the question that some will likely need to answer in the future.
Currently, submissions are not open for the block pattern directory. However, that will change as the contributors eventually wrap up the pattern creation process. The milestone for this is set to October 15, but it is sitting at 25% completion at the moment.
There are 146 themes in the directory with block patterns. Thus far, developers who have wanted to implement them have had no other choice but to bundle them. However, that may all change.
Core contributor Kjell Reigstad recently proposed an alternative method. “With the launch of the pattern directory (and the upcoming ability for folks to submit their own patterns to it), we should consider building a route through which themes can highlight specific patterns to their users,” he said.
Reigstad proposed using the standard
theme.json file to allow theme authors to surface or give special attention to patterns best suited to the theme’s design.
He listed four primary benefits such a system would bring:
- It would cut back on theme code, creating a side benefit of simplifying the review process for the Themes Team.
- Patterns could be updated, tested, and reviewed separately.
- More patterns would be accessible for all users if theme authors jumped on board.
- Multiple themes could make use of the same patterns, reducing redundancy in the pattern directory.
The idea would be an additional step to this sort of utopian future where users can mix and match various elements and have them just work with whatever theme they are using. I am excited about it, but we still have a long way to go. When all of the core blocks support a full suite of design options, this will be far easier to accomplish, particularly when it comes to layouts.
The idea is built on the premise that themes have begun to create their own de facto standard of putting all of their patterns into a single category titled “Theme Name.” This is the part where the concept breaks down. The truth is that not many themes are bundling dozens of patterns yet, but I have no doubts that they will.
Tove, a recently-released block theme by Anders Norén, includes over 40 patterns under seven custom categories. If the developer had put all of them into a single group, it would have been a poor user experience.
I expect dozens of patterns will be common as they become a more vital piece of the theme development experience. If we build a system that encourages themers to highlight those from .ORG, it should be created with that reality in mind.
Reigstad did mention another idea that might work better if themes are highlighting dozens of patterns. He proposed bubbling them to the top of the list and giving them a special badge of some sort. This method would keep theme authors from overfilling the “theme category” with dozens or hundreds of patterns.
If democratizing the site design process is the ultimate goal, this feature should help further it. The more pathways we can enable for end-users to build the sites they want, the better.
There is no reason for every theme to bundle a custom-made hero banner with a heading, paragraph, and button. Narrowing that down to a set of options that work everywhere gives users more power. They might also not feel locked out of a favored design element if they switch themes down the road.
It would give theme developers more flexibility too. When someone else has already created several of the patterns they wanted to bundle, they can simply highlight them and not write any code to, essentially, make them a part of the theme itself.
The biggest holdup for patterns is the existing interface for finding and inserting them. The experience is sub-par at best when you move beyond a couple of dozen.
I am still in favor of an overlay with tiled patterns that are easily explorable. An earlier concept by Shaun Andrews was shared in a recent draft ticket for a new patterns explorer.
When we get an interface that is fleshed out like this, other ideas around patterns should feel like a natural part of WordPress.
There will likely always be a place for developers to build and bundle their own patterns. Some make use of specific styles or other design elements that are only present within the theme itself.
For now, I am looking forward to a time when I can mix and match patterns from different community designers on a single site.