-
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
Add template lock attribute to column and group #26128
Add template lock attribute to column and group #26128
Conversation
Size Change: +38 B (0%) Total Size: 1.19 MB
ℹ️ View Unchanged
|
53f51a0
to
0abfa0c
Compare
Co-authored-by: Miguel Fonseca <[email protected]>
78d6b90
to
c1d343d
Compare
Hi @mcsf, your feedback was applied. |
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, though second opinions are welcome. :)
Co-authored-by: Miguel Fonseca <[email protected]>
c1d343d
to
120abca
Compare
"templateLock": { | ||
"type": "string" |
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.
Shouldn't this be a boolean?
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.
Hi @ZebulanStanphill, the template lock attribute can contain values like "all", and "insert" which are strings.
This PR adds a templateLock attribute to columns and group. When this attribute is set the locking of the blocks is set to the attribute value instead of relying on the inherited value.
This allows the locking of these blocks to be controlled by templates, patterns, etc.
supersedes: #25869
How has this been tested?
I verified now locking is not inherited by using sample cpt templates, and sample blocks with inner block templates.
I verified I could control the locking of the group block by using the templateLock attribute.
By pasting the following code on the code editor I verified that the first group block is not locked, while the second group block is locked.
I verified I could control the locking of a column by pasting the following code on the code editor I verified column 1 is locked while the second column is not.