Skip to content
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

Pattern Overrides: No opt-out mechanism exists for named overrides #59812

Closed
talldan opened this issue Mar 13, 2024 · 4 comments
Closed

Pattern Overrides: No opt-out mechanism exists for named overrides #59812

talldan opened this issue Mar 13, 2024 · 4 comments
Assignees
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Needs design efforts. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@talldan
Copy link
Contributor

talldan commented Mar 13, 2024

Problem

Since the PR 'Use block naming for marking blocks as overridable in patterns' was merged, all a user has to do to mark a block within a pattern as overridable is to provide a block name—either using List View, or the input in the 'Advanced' inspector controls.

Currently there's no way to name a block for organizational purposes, and not have it be overridable, which is a problem.

Let's discuss potential solutions to this problem in the comments.

@talldan talldan added [Type] Enhancement A suggestion for improvement. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Mar 13, 2024
@talldan talldan changed the title Pattern Overrides: There's no opt-out mechanism for named overrides Pattern Overrides: No opt-out mechanism exists for named overrides Mar 13, 2024
@talldan talldan added the Needs Design Needs design efforts. label Mar 13, 2024
@talldan
Copy link
Contributor Author

talldan commented Mar 13, 2024

My idea to solve this would to implement this feature - Add option for fully locking a block

Within the pattern blocks could be completely locked and this would be respected in instances of the pattern.

The option could also be surfaced as part of the naming process so that a user could name the block and also opt-out as part of one step.

Potentially in the future, this could be more granular and allow locking/unlocking individual attributes, but right now that seems like a longer term goal.

@fabiankaegy
Copy link
Member

I still hold the opinion that the default state of whether something is overwritable should be false. Even when named.

The main interface for renaming a block is the list view. Not the advanced inspector controls. To me, this does not really solve the full UX issue. From my point of view, it is a bad experience to have a side-effect on a feature as common as renaming.

Like I've said before. Users are so used to the fact that they can rename files, layers, elements, etc. in other pieces of software / operating systems. And that action should not have a side-effect. I'm fine with using the name as the underlying API for us to determine what overrides are connected to instead of a unique ID (even though I still think that fixing a typo in a name should not mean that all instances lose the connection because it is really hard for users to understand why that happened)

(Originally shared this in #60066 but @kevin940726 shared it would be best to share here also :))

@jasmussen
Copy link
Contributor

I still hold the opinion that the default state of whether something is overwritable should be false. Even when named.

I don't yet personally have a full enough picture of the consequences one way or the other, but will say that if named overrides require opt-in, then it could potentially allow us to show a modal warning when renaming.

@kevin940726
Copy link
Member

Closing as since #60234 this feature requires opt-in by default.

@github-project-automation github-project-automation bot moved this from 📥 Todo to ✅ Done in WordPress 6.6 Editor Tasks Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Needs design efforts. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants