Skip to content

Editing a Synced Pattern that you don't have permission to edit is a poor user experience #54442

@MadtownLems

Description

@MadtownLems

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

  1. Have User 1 create a sync'd pattern.
  2. Have Author 2 insert it into a new Post.
  3. Have author 3 edit the pattern and try to publish the post.
  4. Confirm that the post was published with the OLD content of the pattern, and that the only error message I'm shown is a generic "Saving failed."

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

Metadata

Metadata

Assignees

Labels

[Feature] Synced PatternsRelated to synced patterns (formerly reusable blocks)[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions