-
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
Reusable blocks: Convert a Reusable block to a pattern block #31296
Comments
This would be too confusing for users to understand the differences. |
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. It is important to have both approaches available because of different use cases. |
(Same comment I made to: #31298 ) I am thinking something similar to this: A one liner that Reusable blocks are still connected with the original block. @kjellr @melchoyce @shaunandrews The purpose Associated: Patterns: Create a pattern in a similar way to have we create a Reusable block. |
Even I, a well seasoned WordPress developper, need to check out the difference between all the different block saving features, namely the full-site templates, the block patterns and reusable blocks. Reusable blocks - Saves one or multiple already registered blocks and its settings in the database and allows the user to put it in multiple pages with a single source of truth. Changes are replicated everywhere this block is displayed, but are "detachable" once they're added to content. Block patterns - Allows registering one or multiple blocks with information and settings pre-filled by using code. There is no single source of truth and is mostly used to pre-populate multiple blocks at once. Full-site editing templates - These will be another beast altogether, but still very much tied to all of this. Theme developers will create html template files to either render blocks or specify areas that users will be able to insert blocks into, such as navigation, header and footer. Mostly works through Gutenberg's parsing of special html comments. -- Apologies for the summary, I needed it for myself and clearing my head on the subject at hand. That being said, I think block patterns and reusable blocks should be the same thing. I don't really get why they're a whole separately named thing when the only technical difference between them is the single source of truth. That "single source of truth" could simply be an option to check named "link to master" or something along those lines. One reusable-block-pattern hybrid could reference to another one with the "<!--wp-block" block type that already exists, but would probably just need to check for circular references to avoid infinite loops of inclusions. |
Done in #51144. |
What problem does this address?
An example is Learn that uses Reusable block "templates". Before using the "template" one needs to remember to convert it to regular blocks or else one might end up overwriting the Reusable block.
What is your proposed solution?
Having a simple way to convert a Reusable block to a pattern. In the 3 dot contextual options drop down. Second option from the bottom.
The text was updated successfully, but these errors were encountered: