Comments

jenlampton’s picture

Issue summary: View changes

link

mgifford’s picture

Looking forward to seeing this. Want to know if patches like this should be pushed RTBC now or after you've done this work? #1913692: Convert Seven to HTML5

Cottser’s picture

I talked to @jenlampton and we'll convert any template files in core themes as part of their respective issues, now that #1938948: Temporarily allow PHPTemplate themes to use .html.twig templates during Twig conversion is in. So Bartik's comment.tpl.php should be converted in #1898054: comment.module - Convert PHPTemplate templates to Twig.

But we'll still use these sub-issues to add 'engine: twig' in the .info.yml file and (if we can) convert any theme function overrides to template overrides. We're not yet sure if that will work. If we're not able to do that, then the theme function overrides will need to be part of their respective conversion issues or the conversion issues will need to get committed before these theme conversion patches get committed.

Edit: added link.

Cottser’s picture

I see three main options for handling the core theme conversions and manual testing:

  1. We move the core theme templates and overrides to their respective issues as suggested in #2. In some cases this could be a bit messy and I don't want to overcomplicate the other issues if we can help it.
  2. Provide a link to simplytest.me to apply all the necessary patches for manual testing. This could work the other way around too - the issue summary on #1898054: comment.module - Convert PHPTemplate templates to Twig could have a simplytest.me link that applies the comment.module patch as well as the #1938840: bartik.theme - Convert PHPTemplate templates to Twig patch for manual testing.
  3. We provide a separate, combined patch (i.e. comment.module + bartik theme) on the core theme issues to include any dependencies (very messy, hardest to maintain).

I'm leaning towards #2. Any other opinions?

Cottser’s picture

#1 is happening on its own in some cases though, #1898054: comment.module - Convert PHPTemplate templates to Twig and #1898038: custom_block.module - Convert theme_ functions to Twig. If we go with #1 then "converting all the core themes" would just be a matter of patching all the .info.yml files.

So that might be simplest of all, and less issues to perform manual testing on.

Cottser’s picture

Issue summary: View changes

Add related issues

Cottser’s picture

Issue summary: View changes

Update summary

jenlampton’s picture

Issue summary: View changes

remove stark conversion, since it is not related.

mgifford’s picture

Now that this is in Core, would be good to get a pointer to the documentation which explains the conversion.

What was now X, now looks like Y.

I'm sure I'll come to love twig in time, but right now frustrated that I can find the theme functions any more.

Where's the stub for the documentation page on the D7->D8 upgrade?

Cottser’s picture

@mgifford - sorry for the delayed response, the stub has not been created yet.

https://drupal.org/update/theme would be the place to create it. I had originally volunteered to get those docs started but haven't had the time unfortunately.

Cottser’s picture

Issue summary: View changes

bartik

Cottser’s picture

Issue summary: View changes
Status: Active » Fixed

All core themes have been using Twig for quite some time, now :)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.