-
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
Block Editor: Implement a responsive grid mode for InnerBlocks
and a basic grid block that leverages it 2.
#20000
Conversation
The lighter DOM seems to have done wonders for this approach, nice work @ellatrix! |
@shaunandrews This is what I meant in #19254 (comment). |
cc @mtias |
Been playing with this block for the past day or two, and I see a lot of potential to create some really nice layouts. I've worked up a prototype that walks through the creation and manipulation of multiple Section blocks within the Grid block. This briefly explores the drag-and-drop interactions for creating a new section, resizing and section, and moving a section. The empty Grid block shows a, um, grid of squares to represent the rows and columns, and the space between them. The toolbar includes controls for adjusting the number of rows and columns, along with the spacing; Changes to these controls would be reflected with the squares in realtime. I also wanted to consider how we could use the keyboard for creation of new Sections: You can dive into the Figma file to see the full-resolution screens and try the prototype for yourself. |
Beautiful! |
d4b5ecb
to
89e3ad3
Compare
Size Change: +24.1 kB (2%) Total Size: 889 kB
ℹ️ View Unchanged
|
Apologies for the obvious question, but how do I test this? Specifically, which kind of block do I insert into a post to get this Grid layout? |
5b0911d
to
0a39cb4
Compare
Rebased. |
The grid block. |
Btw here is another Grid issue: #16271 |
Closing this for now. |
This PR is an alternative to #18600 that implements everything from #19254 (comment) except for resizable gridlines.
The most important feature which differentiates this from #18600 is:
Here is a demo of such a breakpoint in action:
Editor => Breakpoint
Editor < Breakpoint
Front End => Breakpoint
Front End < Breakpoint