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

New Block Layouts #6993

Closed
mtias opened this issue May 28, 2018 · 6 comments
Closed

New Block Layouts #6993

mtias opened this issue May 28, 2018 · 6 comments
Assignees
Labels
Customization Issues related to Phase 2: Customization efforts [Feature] Templates API Related to API powering block template functionality in the Site Editor New Block Suggestion for a new block [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues
Milestone

Comments

@mtias
Copy link
Member

mtias commented May 28, 2018

Since adding templates last year we have been working on various features related to the ability to compose multiple blocks together. InnerBlocks has been our for a bit, with refinements to the design and interactions. The Child Block API will be released with 3.0, allowing block authors to create relationships between blocks, and so on.

Given this updates, the editor is already quite flexible in achieving some common layouts by combining pieces. With the addition of the container block, this would expand further. Yet, there's still room for another piece of the puzzle: creating some layout blocks that function as shortcuts for achieving common design patterns. These are not to be confused with templates — which apply to the whole page setup.

@melchoyce explored some in quick mockups: https://cloudup.com/cNXrAMW7FBY

The idea is we can create some of these as registered blocks, available under the "Layout" group, and it'd leverage nested blocks to offer a ready-made unit. Creating this should also push us to refine template locking so that it can be applied at a group level, not only via template registration.

image

@mtias mtias added Customization Issues related to Phase 2: Customization efforts New Block Suggestion for a new block [Feature] Templates API Related to API powering block template functionality in the Site Editor labels May 28, 2018
@chrisvanpatten
Copy link
Contributor

(Vaguely related to #6895, which I think will be necessary to get full front-end cross-browser compatibility on some of these layouts.)

@ZebulanStanphill
Copy link
Member

jorgefilipecosta added a commit that referenced this issue Jul 10, 2018
…t the default block (#7226)

Fixes part of #6569.
Part of a general polishing to get #6993.

Insertion point was violating the allowedBlocks restriction of the parent block. The insertion point always inserts the default block and it may not be possible to insert the default block.

This PR makes sure insertion point only appears if it is possible to insert the default block.
@mtias mtias added this to the Completed: UI / UX milestone Oct 7, 2018
@mtias
Copy link
Member Author

mtias commented Oct 22, 2018

We have one of these blocks implemented. Moving the rest as something to revisit for phase 2. cc @alexislloyd

@alexislloyd
Copy link
Contributor

Thanks @mtias! I would also suggest that we refer to these as "complex blocks" (i.e. blocks containing multiple blocks to achieve a common pattern), to distinguish them from "simple blocks" (blocks that contain only one block) and from "templates" (which apply to the entire page layout).

@mtias mtias added the [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues label Nov 6, 2018
@strarsis
Copy link
Contributor

Also themes should be able to register a layout for their templates.
E.g. a theme template should have two columns, both with main content.
The editor should reflect this, similar to Mesh.

@aristath
Copy link
Member

This is now possible using Block Patterns so I'll go ahead and close this ticket. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Customization Issues related to Phase 2: Customization efforts [Feature] Templates API Related to API powering block template functionality in the Site Editor New Block Suggestion for a new block [Type] Overview Comprehensive, high level view of an area of focus often with multiple tracking issues
Projects
None yet
Development

No branches or pull requests

7 participants