-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Remove template locking from the columns block #20465
Conversation
Size Change: -45 B (0%) Total Size: 865 kB
ℹ️ View Unchanged
|
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.
Code-wise, this makes sense to me. I believe one of the original reasons for the locking was due to the lack of a horizontal mover, and the vertical movers not making much sense in this context. Since that the horizontal mover functionality exists, it seems reasonable to me to make this change.
// Ideally all block toolbars should be positioned the same. | ||
.components-popover.block-editor-block-list__block-popover | ||
.components-popover__content | ||
.block-editor-block-contextual-toolbar[data-type="core/column"] { | ||
margin-left: 0; | ||
} | ||
|
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.
What was the purpose of these styles?
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.
I don't know @jasmussen maybe, It was definitely breaking the column block toolbar position though.
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.
These styles were almost certainly necessary due to the complex left/right margins that innerblock containers used to be born with.
But it's easy to test, if the toolbar is positioned correctly according to the block selected, then these styles are not needed anymore. And good riddance!
With all the new UI updates, I don't think there's a valid reason to keep the template locking in the Columns block. What this means concretely is that the columns block becomes just a list of "column" block, you can remove/add any columns you want and also use the block movers (horizontal) from the toolbar to move columns.