-
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
Consider adding reusableBlock to the supports block configuration #4722
Comments
@mtias, technically it is an easy task. The question is if we should add this? I don’t see reasons to not do it. |
Pinging also @noisysocks as he implemented most of the logic for the reusable block. |
Sounds reasonable and easy to do. Nesting such an attribute under
I don't think we could do this since one might desire a block that should only appear once in a post but that a user can re-use throughout several posts, e.g. a 'post header' block, a 'google analytics block', etc. |
Thanks! Getting |
Sounds fine to me. Can go with |
I'm having second thoughts here. Once we have nesting, making a block non-reusable doesn't make much sense. It'd be trivial to create a "container" block, add the non-reusable block to the container, and make the container reusable. |
That's a really good point, @mtias. @aduth: How does @fastlinemedia: Could you please describe your use case for this functionality in a little more detail? What block are you building? Why does it not make sense for one to make it reusable? |
@mtias @noisysocks thanks for the follow up on this! I'm not quite following the example for why it wouldn't make sense to make a block non-reusable but I don't think it's a huge issue for what I'm trying to do if that's the case. I've been working on a block for switching between Gutenberg and Beaver Builder. So far, this is what we have... https://www.dropbox.com/s/nc0pnn70ry07g8v/beaver-builder-block.mov?dl=0 I don't really think it makes sense for that block to be reusable (definitely should be useOnce though), however, I don't think it's going to hurt anything if it is turned into a reusable block. I'll go ahead and close this one out. Thanks again! |
@fastlinemedia thank you for the discussion! I think honoring |
@mtias no problem and thanks for explaining it further! That makes perfect sense. |
@fastlinemedia: FYI, this came up again in #5941 and there's now an open PR which adds the functionality you requested: #5970 |
@noisysocks thanks for the heads up! :) |
Issue Overview
My apologies if this is already doable but I didn't see it in the documentation. I don't feel like converting a block I'm working on to a reusable block makes sense.
Would it possible to get
reusableBlock
added to thesupports
block configuration so we can disable saving as a reusable block for our blocks?This block also has
useOnce
set totrue
, so maybe another solution would be to remove converting to a reusable block foruseOnce
blocks.The text was updated successfully, but these errors were encountered: