-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Patterns: Create a pattern in a similar way to how we create a Reusable block. #31298
Comments
We used to allow this briefly and removed it because it's confusing. Even in that dialogue it's not clear to me when I should choose one option over the other. A project to allow user editable patterns could be worthwhile but it needs a much broader scope and proposal, as it'd be a subtype of |
I am wondering if we should do something like this: Add to Reusable blocks Add to Pattern blocks As it gives a short explanation of what each is. It would use the current method, and it can be an easy way to choose to use a global connected block or an independent block. It would give a quick access to creating both types of blocks directly in Gutenberg. |
I am thinking something similar to this: A one liner that Reusable blocks are still connected with the original block. Associated: Reusable blocks: Convert a Reusable block to a pattern. |
Could be, or perhaps we need to use a modal where we can offer more context on what each option allows. In any case it needs a more in depth look to all the implications. |
I reopened the issue as it would be helpful to save blocks to a Pattern block. |
Perhaps make the option only available from the FSE editor. Something like an advanced option. |
There is already a plugin that converts reusable blocks to patterns and it works good. Reusable Blocks Extended: https://wordpress.org/plugins/reusable-blocks-extended/ Since there is a concern about generating confusion in the posts editor we could polish this plugin. Instead of "convert to reusable block" we could add the option "save as pattern" making a copy of the reusable block and listing it in /wp-admin/edit.php?post_type=wp_block There could be a filter at the top of the list, please see my attachment. |
Hi @JosVelasco That is a very good idea! Adding the option to the Reusable blocks manage screen as you are showing is one good way of handling it. One thing that comes to mind. To create a pattern one would first need to save it as a Reusable block and then -> convert/save it as a pattern. I do look forward to having a method to click multiple blocks and then save these as a Reusable block or as a Pattern directly through the ellipsis /3 dot drop down. |
Also related: #32682. There's a proposed flow there for creating patterns as part of a design library. |
This would indeed be very helpful. The way we create reusable blocks is really easy and intuitive. But I only need to reuse the structures (and not the content) so I'm looking at block patterns. And it seems to be a lot more involved to create those compared to reusable blocks. |
This is done now! |
That's great news! Where can we find more info about this feature? |
What problem does this address?
At current there is no user interface to create a pattern. Let's change that.
What is your proposed solution?
Similar to how we add blocks to become a Reusable block it would be helpful to add blocks to become Pattern blocks.
The text was updated successfully, but these errors were encountered: