Problem/Motivation

The 8.x-7.x branch contains the .twig templates that came with Zen 7.x-6.x. But these .twig files were built to show example markup when building a KSS style guide. Most of them are not reusable because they have hard-coded example content.

And they were not meant to be run through the Twig PHP library in a Drupal environment as they don't have any variables we can use to add content to them.

Proposed resolution

We need to convert these 7.x-6.x components to be Drupal 8-compatible.

These files are located in the STARTERKIT/components folder.

For each component:

  • Add new Twig variables.
  • Add new Twig blocks if necessary.
  • Find the *.html.twig that needs to use this component and add it to STARTERKIT/templates. The file might be in STARTERKIT/templates/_d7_templates_to_be_ported; otherwise in core/classy/templates.
  • Add a library for each component's CSS and JS to the .libraries.yml file
  • Determine which Classy library will need a libraries-override so we don't have duplicate CSS.

Note: the only Drupal 8-specific Twig extensions we should use in STARTERKIT/components is {{ library_attach() }}. All of the D8 Twig stuff should go in STARTERKIT/templates and pushed to components via variables or Twig blocks.

Completed tasks

These components are done already:

  • base/* [edit: actually there might be a couple of these in D8 core]
  • layouts/*
  • navigation/skip-link/

Remaining tasks

These components need updating and need their own issues:

At the very least, these components need to be completed before 8.x-7.0-beta1 can be released:

These components need to be completed before 8.x-7.0-rc1 can be released:

This is the meta issue. For each component, please:

  1. create a separate issue using this handy link that auto-sets this issue as the parent of the new issue
  2. and then update this issue's summary to add a link of format [#ISSUE-NUMBER].

Here's the issue summary you can use for the new issues:

Title: Convert [component name] component to be Drupal 8-compatible

<h3 id="summary-problem-motivation">Problem/Motivation</h3>
As described in [#2716773], we need to convert the [component name] component from Zen 7.x-6.x to be compatible with Drupal 8.

<h3 id="summary-proposed-resolution">Proposed resolution</h3>
The parent issue describes the <a href="https://www.drupal.org/node/2716773#summary-proposed-resolution">general solution</a> we need to use when converting a component.

Solutions specific to the [component name] component should be added here as we figure them out.

<h3 id="summary-remaining-tasks">Remaining tasks</h3>
(reviews needed, tests to be written or run, documentation to be written, etc.)

Comments

JohnAlbin created an issue. See original summary.

JohnAlbin’s picture

Title: [meta] Convert 7.x-6.x components to be Drupal 8-compatible. » [Meta] Convert 7.x-6.x Twig components to be Drupal 8-compatible
Issue summary: View changes
JohnAlbin’s picture

Component: CSS/SASS/HTML markup » Component markup (CSS/Sass/HTML/Twig)
Issue summary: View changes

Updating summary

JohnAlbin’s picture

Issue summary: View changes

Added issue summary template for child issues.

JohnAlbin’s picture

Issue summary: View changes
JohnAlbin’s picture

Issue summary: View changes
sarahjean’s picture

Issue summary: View changes
BLadwin’s picture

Issue summary: View changes
JimSmith’s picture

Issue summary: View changes
sarahjean’s picture

Issue summary: View changes
chaquea’s picture

Issue summary: View changes
JohnAlbin’s picture

Issue summary: View changes

Whoops. Apparently, there are some base HTML twig files in D8 core. Adding one for textarea to the issue summary now.

JohnAlbin’s picture

Issue summary: View changes

Added a "handy link" to the issue summary that can create a new child issue with the title and issue summary already set.

JohnAlbin’s picture

Issue summary: View changes
JohnAlbin’s picture

Issue summary: View changes

Added new sub-tickets.

JohnAlbin’s picture

Issue summary: View changes
finnsky’s picture

Issue summary: View changes
finnsky’s picture

Issue summary: View changes
andriyun’s picture

Issue summary: View changes
finnsky’s picture

Issue summary: View changes
andriyun’s picture

Issue summary: View changes
andypost’s picture