This is a sub-issue to #1813898: [META] Add editable responsive layouts to Drupal core

Problem/motivation

Drupal themes are limited to mostly one specific layout, so site builders opted to use more flexible solutions like Panels that allows people to switch between different layouts for different pages / locations. We have added layouts under #1787634: [META] Decouple layouts from themes to core, which will allow for the selection of layouts, but it is still not possible for site builders to edit layouts on the fly.

Also, today's various output devices require websites to be available with responsive layouts, where a page layout is not fixed to one configuration, but instead depend on how the content should be presented on different devices.

Proposed solution

Drupal core already has breakpoints and grids to offer guides are proposed in #1816650: Add swappable (dynamic) grid systems to core. Finally, a dynamic set of regions are proposed in #1813910: Add region module to Drupal core (for editable responsive layouts). These combined with a user interface to map regions to grids on different breakpoints and exposing those as layouts for the existing layout system provides full flexibility to site builders to create their own layouts.

- Introduce a responsive layout plugin
- Define grids and breakpoints to be used for these layouts (neither module has UIs to make this editable yet)
- Define a default layout to be cloned and edited

EditLayout.jpg

Remaining tasks

There are clearly lots of cleanup tasks and opportunities for this patch. Javascript needs to be cleaned up, more support for non-equal-column grids, em based breakpoints. Tests need to be added, and so on and on.

Files: 
CommentFileSizeAuthor
#6 rlayout-6.patch131.74 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] 48,054 pass(es), 52 fail(s), and 3 exception(s).
[ View ]
#6 interdiff.txt5.43 KBGábor Hojtsy
#5 rlayoutset.test_layout_01.yml_.txt950 bytesnevergone
#4 medium_plan.png20.3 KBnevergone
#4 medium_result.png20.35 KBnevergone
#4 wide_plan.png21.09 KBnevergone
#4 wide_result.png23.24 KBnevergone
#4 some_item_is_not_dragabble_among.png13.29 KBnevergone
#2 EditLayout.jpg95.51 KBGábor Hojtsy
#1 rlayout-1.patch134.95 KBGábor Hojtsy
FAILED: [[SimpleTest]]: [MySQL] 46,280 pass(es), 52 fail(s), and 3 exception(s).
[ View ]

Comments

Issue tags:+Spark, +Spark Sprint 7
StatusFileSize
new134.95 KB
FAILED: [[SimpleTest]]: [MySQL] 46,280 pass(es), 52 fail(s), and 3 exception(s).
[ View ]

The proposed patch is feature equivalent to the http://drupal.org/project/layout module.

StatusFileSize
new95.51 KB

Status:Needs review» Needs work

The last submitted patch, rlayout-1.patch, failed testing.

StatusFileSize
new13.29 KB
new23.24 KB
new21.09 KB
new20.35 KB
new20.3 KB

Some reflection:

I designed a medium width layout:
http://drupal.org/files/medium_plan.png

But after save, the result:
http://drupal.org/files/medium_result.png

Similar the wide layout plan and result:
http://drupal.org/files/wide_plan.png
http://drupal.org/files/wide_result.png

It is not possible to move elements many times between each other:
http://drupal.org/files/some_item_is_not_dragabble_among.png

StatusFileSize
new950 bytes

And the test layout config…

StatusFileSize
new5.43 KB
new131.74 KB
FAILED: [[SimpleTest]]: [MySQL] 48,054 pass(es), 52 fail(s), and 3 exception(s).
[ View ]

Updated pages patch to latest core and other changes carried over form similar codebase in #1813910: Add region module to Drupal core (for editable responsive layouts):

- moved rlayout entity to annotated plugin
- renamed delete_confirm to confirm_delete as per core standards
- added an initial short help text
- removed $items init from hook_menu

Status:Needs work» Needs review

Status:Needs review» Needs work

The last submitted patch, rlayout-6.patch, failed testing.

A nitpick. I know your default layout is just a sample but I was wondering why you define a 'body' region when I thought the drupalism was 'content'. I just thought it confusing to not use a common drupal label and a label in common use as html's 'body' element.

Status:Needs work» Postponed

Well, anyway, due to core things not happening below this layer that we wanted to build on, we just need to go and focus on those things and will pretty likely not have a responsive layout builder (and therefore this module) in core. Unless someone comes and want to run with all these. Start from #1813898: [META] Add editable responsive layouts to Drupal core.

Version:8.x-dev» 9.x-dev
Status:Postponed» Needs work

Given the feature freeze yesterday, this clearly did not happen. Moving to Drupal 9. Watch http://drupal.org/project/layout (or the renamed version rather, given core has now a layout module).

Issue summary:View changes

Add image, more notes on remaining tasks