原文链接:https://drupal.org/node/2008464
Shortcuts:
定期会义
我们努力组织通过以下几个渠道:
- 每周google聚会: 星期四 4:00PM PT (6:00PM ET, Friday 01:00 CET). 我们将发布一个讨论过程和讨论进展和下一步行动。
-
聊天: #drupal-twig on Freenode. 欢迎加入讨论的提问。我们在这里定期举行办公时间周四之前和之后的电话。
如果你想参与,但不确定从哪里开始, 参加 核心会议 是一个很好的开始点. 在drupal twig 主题层跟导师和提到你想帮助
重要资源
这里有一些重要资源主要帮组我们了解Twig:
- 核心模块转换问题
- 主题核心函数转换问题
- 清理核心标记的问题
- 当前的Twig TODO列表
- 新建一个Twig? 简要介绍 Drupal 和Twig, 请阅读这一篇 博客发布 作者是: Anthony Ringoet.
会议记要
目前计划清理系统的主题。
- 更新核心引擎使用两个不同的主题, & 依懒PHPTemplate:
- 在Twig核心里添加简单的例子:
- 转换 PHPtemplate 到件到 Twig 且默认使用Twig:
-
Must-have's for Drupal 8
- Theme System/Architectural Issues
- #2004872: [meta] Theme system architecture changes
- #1843650: Remove the process layer (hook_process and hook_process_HOOK)
- #1751194: Introduce hook_theme_suggestions[_HOOK]() and hook_theme_suggestions[_HOOK]_alter()
- #2035055: Introduce hook_theme_prepare[_alter]() and deprecate hook_preprocess_HOOK()
- #1886448: Rewrite the theme registry into a proper service
- #2029819: Implement a ThemeHandler to manage themes (@see ModuleHandler)
- #2060767: Replace Drupal::moduleHandler()->themeInvoke() with Drupal::themeHandler()->invoke()
- #2060773: [META] Migrate all hook_preprocess() functions to hook_theme_prepare() Assigned to: Mark Carver
- #2060783: Remove the preprocess layer.
- Multilingual
- #1927584: Add support for the Twig {% trans %} tag extensionAssigned to: Mark Carver
- #2049241: Add support for language options to the Twig {% trans %} tag extension Assigned to: Mark Carver
- Variables in templates must be drillable
- #2008450: Provide for a drillable variable structure in Twig templatesAssigned to: steveoliver
- #2047263: Provide inline_template tag within Twig Assigned to: Fabianx
- Security
- Theme System/Architectural Issues
-
Nice-to-have for Drupal 8
- Consolidate template files (also performance enhancement)
- Convert theme functions to Twig & benchmark:
- Replace Drupal's crappy markup with our Dream Markup(tm)
- Add a theme component library:
-
Drupal 8 - NEW markup "nice-to-haves" (lowest priority)
- Icon: #1849712: Add theming template and prepare logic for rendering iconsAssigned to: Mark Carver
Issue tags & Documentation
See the following tags for core issues related to Twig and revising Drupal's theme system.
- Queue Search: Twig
- Queue Search: Twig engine
- Queue Search: dreammarkup
- Queue Search: Theme system cleanup
- Queue Search: Theme system consistency
- Twig documentation on drupal.org
- Twig documentation on Sensio labs
- DrupalTwig folder in Google Docs
- Google Doc: Conversion instructions
- Drupal Twig (Sandbox -> Core) Conversion Instructions
- Google Doc: Conversion worksheet
- Google Doc: Consolidation opportunities
- A 10 minute overview of working with the old sandbox
- [meta] New theme system
Code sprints
Date | Sprint | ||
---|---|---|---|
Current and upcoming sprints | |||
Mar 24-30, 2014 | Drupal Developer Days | ||
Mar 27-30, 2014 with sprints @ Palantir before | MidCamp | ||
Past sprints | Docs | ||
Nov 24-25, 2012 | DrupalCamp North West | Summary | |
Nov 16-17, 2012 | Drupal 8 Code Sprint in Vancouver | ||
Nov 1-4, 2012 | BADCamp | Summary | |
Oct 26-28, 2012 | DrupalHagen | ||
Sept 29, 2012 | DrupalCamp London | ||
Sept 8-9, 2012 | Drupal Night, Ukraine | ||
Aug 20-24, 2012 | DrupalCon Munich | Summary | Resources |
July 21-22, 2012 | NYC Camp | Summary | |
May 20, 2012 | Twin Cities Drupal Camp | Summary | Resources |
April 20-22, 2012 | Chapter Three | Summary | Resources |
Feb 9th, 2013 | DrupalCon Sydney | ||
Jan 26th, 2013 | SandCamp | ||
March 9th & 10th, 2013 | Drupal Sprint Weekend | ||
Mar 22nd, 2013 | Twig Sprint (online) | ||
Apr 19th, 2013 | Twig Sprint (online) | ||
Apr 20th, 2013 | Twig Sprint (Charlotte, NC) | ||
May 3rd, 2013 | Twig Sprint (Stanford University, & online) | ||
May 24th, 2013 | DrupalCon Portland | ||
June 2nd, 2013 | CodeSprint UA 2013 | ||
July 12-15, 2013 | NYC Camp | ||
July 18-20, 2013 | Twin Cities Drupal Camp | ||
July 25-27, 2013 | Midwest Developer Summit | ||
Sept 23-27, 2013 | DrupalCon Prague | ||
Oct 5-6, 2013 | PNWDS | ||
Oct 24-27, 2013 | BADCamp | ||
March 01-02, 2014 | DrupalCamp London | ||
March 15-015, 2014 | DrupalCamp Stockholm |
Principles: Waypoints to guide us
At the BADCamp 2012 theme sprint, we outlined some core principles to guide our work for the D8 theme layer.
- Start with nothing
- Core default markup should strive for semantic simplicity, with few HTML elements, added only as needed
- Build from use cases
- Don't assume you know what people want or add features based on "What-if?" Think about the 90% of use cases.
- Provide tools
- Give front-end experts a way to achieve specific goals; goals that apply to the remaining 10% of use cases. Keep in mind that complex problems may require complex solutions.
- Consolidate
- "Your markup is not special." Don't make something new. Work toward common theme functions that modules leverage (i.e. a Theme Component Library).
- Visibility
- You should be able to see what's going on in a template without reading docs. Twig provides a lot of this by virtue of its syntax (it looks like HTML). Form follows function.
- Consistency
- Do the same things everywhere, follow patterns. Use similar variable names across templates if they represent similar things.
- Don't dumb it down
- Complexity should be reduced but not obscured. Themers *can* understand template logic and loops. When complexity does happen, use comments to explain why.
- Organization should be driven by meaning and semantics over technical convenience
- Consider what an element means rather than how it structurally appears. For example: theme_item_list() came about from a developer's perspective: OL and UL markup is nearly structurally the same, so providing a single function with the type argument came about from a code efficiency standpoint. However, from a semantic HTML perspective, we do not use a singular 'list' element with an attribute to indicate whether it is ordered or unordered, we have two different elements. Semantically, OL and UL represent different information. Therefore, we should provide a separate templates for OL and UL, even though they contain nearly identical markup.
- Related to this principle (and the principle of Visibility), names and locations of templates should be self-evident. Consider where a newcomer might expect to override markup. Example: Someone looking to override a menu isn't going to look for a item_list template, even if a menu is structurally identical. So we should not simply have a menu use an item list, nor should we simply include an item list from a menu template. Themers want to see markup in templates, not abstraction.
Tell your friends
Send people to this page using this link: http://lb.cm/twig
Shortcuts:
- Regular meetings
- Essential Resources
- Roadmap
- Issue tags & Documentation
- Code sprints
- Principles: Waypoints to guide us
- Tell your friends