manekinekko / manekinekko/angular2-drupal

Explore the Twig integration with Angular 2

Open
#1 13 comments 0 reactions 1 assignee View on GitHub

@manekinekko is already working on this.

Since Jan 25, 2016.

Dominant language
PHP
Stars
4
Forks
1
PR merge metrics
No merged PRs in 30d

Description

A rendered comment (like all rendered output in Drupal) can be heavily customized by themes. For example, comment.html.twig can be overridden with entirely different markup. In this project, we would like to explore two different architectural approaches:
1. What the code looks like when the custom Twig templates are manually re-implemented in the framework's preferred template language (Handlebars, Angular templates, JSX, etc.). Although this would mean duplication of the same markup in Twig and the framework's template language, we are hoping that it would not additionally require duplication of non-trivial JS logic (especially for the more JS-centric template languages like JSX and ElmHtml) across custom themes for the case where each custom theme only needs to customize the markup and not the logic.
2. Whether it's feasible and what the effort would be to make the framework use the existing Twig templates. For example, can Twig.js be modified to compile the Twig templates to what Ember normally compiles Handlebar templates to, etc. We suspect this is more feasible for Ember and Angular than for React and Elm, but are curious to learn if that's right or wrong.

Dedicated Drupal thread https://github.com/acquia/js-exploration/issues/4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.