-
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
Pattern Overrides: Add template-lock: all
to pattern inner blocks to prevent deletion/insertion
#57661
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
talldan
added
[Type] Bug
An existing feature does not function as intended
[Feature] Synced Patterns
Related to synced patterns (formerly reusable blocks)
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Block] Pattern
Affects the Patterns Block
labels
Jan 9, 2024
49 tasks
Size Change: +8 B (0%) Total Size: 1.69 MB
ℹ️ View Unchanged
|
kevin940726
approved these changes
Jan 9, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Block] Pattern
Affects the Patterns Block
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
[Feature] Synced Patterns
Related to synced patterns (formerly reusable blocks)
[Type] Bug
An existing feature does not function as intended
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
In #53705 there are two bugs mentioned:
Why?
The bug happens because the inner block list is open to modifications.
#57036 used
blockEditingMode
to prevent edits to some inner blocks, but it only applies the changes to individual inner blocks and not the block list.The conundrum is that
blockEditingMode
doesn't offer a way to disable the inner block list of a block while still keeping the rest of the block itself open to changes.How?
To fix this, this PR uses
templateLock
. A drawback is that the lock icon shows for blocks in List View:This is probably not a long term solution. It might be better to explore adding a new
blockEditingMode
called something likedisabledInnerBlocks
. Or more granular controls. That needs some further conversation.Testing Instructions
Screenshots or screencast
Before
Kapture.2024-01-09.at.15.01.57.mp4
After
Kapture.2024-01-09.at.14.58.46.mp4