Decoupled Blocks brainstorm session

05/11/2016 - 14:15-05/11/2016 - 15:15
290 [Faichi]

Let's talk about the Drupal 8 Decoupled Blocks module, Component API, and where progressive decoupling is heading.

(Text below from the sandbox link above)

This is a proof-of-concept of a Drupal 8 version of the "Presentation Framework" originally built for the project. This is a ground-up rewrite of the entire thing.

In its original conception the Presentation Framework was a progressively decoupled Drupal 7 solution built on top of Panels and Angular 1. The drupal 8 version aims to be much more than that.

Most essentially, it aims to be a javascript-framework-agnostic, progressive decoupling tool to allow custom block types to be written by front end developers in the javascript framework of their choice, without needing to know any Drupal API's or "Drupalisms" other than basic yaml syntax.

The original version used json files instead of yaml to build custom ctools/panels content types, but in Drupal 8 blocks are not the worst now (yay!) and Panels is built on top of them. So we're building block types, with the goal of allowing our decoupled blocks to be placeable via the core block UI, panels, or any other block placing interface someone might come up with!

It works! As of right now the Angular 2 and React frameworks are working, and some barebones example components are provided for your testing! There is a lot of functionality missing but you can download this module, turn on the angular 2 or react sub-module and place a framework-driven block on a page (full disclosure, I've mainly been testing from panels but initial testing with the Block UI looks good too).