-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Remove reusable block removes complete block from editor #12791
Comments
Note that this is what the "Convert to Regular Block" option is for. Perhaps we can change the labels to make this more clear. |
I ran into this as well and was super confused. Honestly, I wonder if we shouldn't have this option in the menu at all — maybe it should only live within the Reusable Blocks screen. |
Sounds like a good thing to explore. I wonder what happens when you do that by the way. Will the block be silently removed from all posts it's being used in? Does the Reusable Blocks screen show which posts are using the block? (A often requested feature for attachments, by the way) |
We'll definitely need some good copy in an "are you sure?" prompt when deleting reusable blocks.
I think that would be great, personally. |
I recently did it again — I selected "Remove from reusable blocks" thinking it would detach this instance from my reusable block, which is how I expect it to work. Then it deleted all instances of the reusable block 😩 I still think you should only be able to delete all instances from the reusable block management screen, not directly from the editor, and that "remove from reusable blocks" in the block dropdown should detach the instance. |
I had the same issue, lost two days worth of work. The ability to delete block entirely should not reside within the post editor at all. Is there a way to fix this? |
From this week design triage, we came up with the idea of replacing "Remove from Reusable Blocks" with "Manage Reusable Block" instead and rearrange/grouping actions of managing Reusable block into the same section. For a quick fix, it can be just a link to "Manage All Reusable Blocks" screen. A further idea for "Manage Reusable Block" is showing a modal popup as same as "Block Manager" from tools & options. Here is the proposal for managing selected Reusable Block modal showing all post instances that will be affected by the action: |
I really like the idea of a quick fix. Let's see about moving this to development, thanks. |
I see this issue has been sitting a while. If there is still interest I'd like to take on dev for this as my first issue. |
@wallstead, that would be great! It looks like we've got the "Convert to blocks" as a button in the toolbar now, so all we need here is to swap the "Remove from Reusable blocks" button to one that says, "Manage Reusable blocks" and it should take the user to the Reusable blocks manage screen. This will require a notification if there are unsaved changes so the user doesn't lose any changes. |
@mapk Great! I'll start work on this today. |
This is a problem for me as well. Not getting confused by what "remove from reusable block" means, but the fact that I might accidentally click it. I work with reusable blocks all the time across many pages. It's an accident just waiting to happen and no way to fix it when it does. Even a simple "Are you sure you want to delete this block?" would be really great. |
I just submitted the above pull request, it's my first ever so please let me know if I need to do anything else other than keep checking in here! |
* Removed ReusableBlockDeleteButton component and added ReusableBlocksManageButton in its place. * On click, ReusableBlocksManageButton sends the user to the reusable blocks management screen. * Added '@wordpress/url' dependency to the package. This is used to build the url for the reusable blocks management screen. Fixes WordPress#12791.
…27026) * Replace 'Remove from Reusable blocks' with 'Manage Reusable blocks'. * Removed ReusableBlockDeleteButton component and added ReusableBlocksManageButton in its place. * On click, ReusableBlocksManageButton sends the user to the reusable blocks management screen. * Added '@wordpress/url' dependency to the package. This is used to build the url for the reusable blocks management screen. Fixes #12791. * Fix logic and dependency for new 'Manage Reusable blocks' menu item. * Use file link for new @wordpress/url dependency. * Rename abbreviated blockObj variable to reusableBlock to follow coding standards. * Simplified logic to check if the 'Manage Reusable blocks' menu item should be visible. * Use MenuItem's href prop to create an a tag instead of relying on onClick on a button. Fixes #27026. * Update package lock. (#27026) * Remove unused e2e test for deleting reusable blocks. (#27026)
So how do i detach a single instance of a reusable block from its global "symbol". For example Page 1
Page 2
Page 3
|
@KennySing There's a button on the toolbar of the reusable block: |
Remove reusable block removes complete block from editor.
Steps to reproduce
What I expected
That block is not Reusable Block anymore and it should stay in Editor
What happened instead
Complete block is removed from Editor
NOTE: From confirmation window is clear that block will be deleted. but from More options menu it looks like that block will only be removed from reusable blocks.
Browser / OS version
Chrome 70 / macOS High Sierra 10.13.3
Screenshot / Video
The text was updated successfully, but these errors were encountered: