-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Make Synced Patterns lockable so content cannot be edited inline #32353
Comments
There's an issue here (#32317) exploring a similar concept for the Query block. A similar pattern is required for editing content in the template editor as well. |
I love this idea. I would definitely disable direct editing of Reusable Blocks in the current Gutenberg implementation. It's super unclear to people that they are impacting content beyond the current post/page, and this solves that. |
There's now a hover overlay rendered on reusable blocks that should give clearer indication. It might still warrant an extra click to to the children. |
@mtias Yeah, that's cool. But still, a possibility to "lock" unwanted changes to reusable blocks (maybe it could be turned on/off in the settings) would be perfect. I could imagine that if the "Edit reusable blocks directly" is enabled, you will see this, otherwise, new CPT "Reusable blocks" will be added to the menu and users could edit reusable blocks there. At least this would solve a lot of headaches for my clients. |
Yes, locking in general is definitely an important aspect to develop. It should be coming soon: #29864. The initial infrastructure is there, we need to develop a UI now so it can be controlled. |
Yes, or maybe have an option for the reusable block to be converted into a regular block before it can be edited. An alert of some sort maybe? |
Yes, this really need to be fixed. I have clients that, unknowingly, add content to the reusable block, since it's editable from any page or post it's used on, when they really mean to add content AFTER the reusable block. |
I would like to +1 this request, I have a large enterprise client who is experiencing significant issues as a result of this, they have many users accidentally/unknowingly are altering reusable blocks, as they think it is part of the page/post that they are on. The client considers this to be a huge issue, they feel that reusable blocks are no longer fit for purpose in their current state. |
+1 here as well. |
So glad this is on the radar. In our multisite instance, we are building child themes in which I plan to use a combination of local templates and reusable blocks for site administrators to select from when building their child sites at a local university. Upon clicking the blue Update button a message appears in the right column with a subtitle Select the changes you want to save and the checkboxes to save these changes to both the page and the Reusable block(s) are checked. It would be great to know how to uncheck those boxes by default (see graphic) but I like the idea of locking as well as a long term solution. Definitely a concern because I envision that many of our site administrators may overwrite their reusable blocks accidentally. |
Yes, please push this fix soon. I've had to replace reusable blocks that some team members have mistakenly deleted the contents for on a couple of sites. I have trained them, however humans are not infallible, especially when they are busy, stressed, or tired so a warning message or the ability to lock the contents of a reusable block would be ideal. |
@paaljoachim will this functionality be included in WP 6.2? |
My setup. Going through a few comments in this issue: @BenWittert Ben. A lock is then seen in the toolbar.
From the sentence I quoted it seems there is a need to automatically lock the Reusable block as it is being added to the page/post. Not needing to manually click the 3 dots -> lock -> content editing. @Giorgos-pl The theme Twenty Twenty Tree active. I made a Reusable block. Please let me know if there is anything that I missed. |
@paaljoachim in the use cases of my customers, they would want the ability to have reusable blocks automatically locked. The challenge they are facing is editorial teams accidentally editing and changing reusable blocks. So they want the blocks to be locked by default whenever they are used. |
@mtias I believe what we do need is a way to where we inside preferences by default should have a checkbox for having Reusable blocks automatically locked. So when a customer adds a Reusable block into a page/post it is pre-locked and can not so easily be edited/moved/etc. Making accidental changes harder to do. To edit one would then need to click the lock seen in the toolbar. There might be ways to through code to add this lock today and even make it harder for the customer to unlock a Reusable block. |
Agree 100% – locking not being set at the block and/or site level makes this feature far less useful. |
You could probably filter the metadata for |
There could be some overlap between this and #43608. |
I've updated the title for clarity - but also noting that this kind of thing may be resolved with Partial Syncing |
I've added this as something to explore on the partial syncing tracking issue 👍 |
The plan currently with the work being done to enable partial syncing pattern blocks is that full global editing of synced patterns will be disabled in the editor by default. Certain parts of the pattern will be able to be flagged as editable just for that instance of the pattern, and there will be an |
What problem does this address?
The seamless experience of editing reusable blocks (in core since 5.7) causes a lot of trouble for my clients. They are struggling to know when they are editing a reusable block and when the normal content.
For example, you have a reusable block in a column and you want to add another content to the column, no to the RB. What do you do? Users do click on the existing content and click on the + icon.
I've been explaining it since the 5.7 is out and it doesn't help at all. They don't want to pay that much attention to the editing and "locked" reusable block content would be the best.
What is your proposed solution?
Option to disable direct editing for reusable blocks - either allow to return to the state before 5.7 was released or just lock it (and users would go to revealed wp_blocks post archive or something).
I would love to select a reusable block just as a parent to move it around, but not the child (I think that's the part when it causes a lot of trouble).
If I miss a filter or something I'll be really glad if you point me in the right direction. I've tried to disable it via CSS and pointer events and it's just super tricky and kind of mission impossible when I want to move the blocks but not to edit them (eg you need to select them via list view and then move them around):
The text was updated successfully, but these errors were encountered: