Editing a Synced Pattern that you don't have permission to edit is a poor user experience #54442
Labels
[Feature] Synced Patterns
Related to synced patterns (formerly reusable blocks)
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
Take an Author who inserts a Sync'd Pattern into a new Post. The editor lets them edit it. There's no clear indication that I shouldn't be allowed to.
Once I go to Publish my post, things get ugly and could end up in a really bad state. I'm presented with a series of checkboxes about what I want to Save. Again, the UI gives me the option to save updates to the Pattern (and it's checked by default), so I'd imagine that I can. However, I can't. And the only reason given for this is a big red generic error that says "Saving failed." At this point, I'd imagine my entire attempt to publish failed, but that's not the case.
My post has actually been published in a state that looks different from what it is in the editor, because the Pattern wasn't updated. This feels really wrong.
The best solution, in my opinion, is to not let me edit the Synced Pattern to begin with. If I can't save the changes, why let me edit it in the editor? I think that any attempts to edit the Pattern should prompt me with a message saying I can't edit it - perhaps I want to detach it (and what that means).
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
6.3.1. No Gutenberg plugin.
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: