Problem/Motivation

At this point, much of the markup in the templates is extremely out of date. Standard class names, structure, and comments are out of date with core. I think it's important we update these before Beta because there will be some risk of breaking (though we can try to keep things backwards compatible as much as possible.)

Proposed resolution

Review all templates in the theme and update them to better reflect D9 features and standards.

Templates updated:
- Block template comment block and changing section wrapper to a div.
- Breadcrumb template indentation and accessibility text.
- Field template with the D9 class structure. This is probably the greatest breaking change. Instead of field-name-[name], field-type-[type], the classes follow core class naming conventions so be field--name-[name], field--type-[type] etc.
- Form Element Label to include core js-form-required class.
- Node template to update the comment block and remove the node id from the article wrapper.
- Page template to place the sidebars inside main (like core does), and to update the comment block.
- Pager template to use Foundation visibility classes and remove unnecessary empty links.
- Status Messages template to include the data-drupal-messages wrapper.

Remaining tasks

- Review and list impacted templates
- Patch
- Review
- Write up upgrade notes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sim_1 created an issue. See original summary.

sim_1’s picture

Issue summary: View changes
Status: Active » Needs review
erutan’s picture

I haven't developed in Drupal using a non Foundation theme for a while now, so can't really comment on current naming standards. I can check for basic markup integrity and then sign off on that.

It should be pretty straighforward to rename some template files, and going forward I'm not sure it's worth supporting the current and new ones as they'd either have to be dropped at some later point or sit around forever as debt.

erutan’s picture

I looked over the changes and from a structural standpoint they look good - I'm not up on modern Drupal templating standards as I'm most familiar with D7.

I goton error on my local dev site with both this & the Foundation 6.7.4 enabled, that `status-messages.html.twig` wasn't defined in the twig loader. I was able to get the site working normally eventually, the simplest solution might just be an out of band CC via Drush. If someone else can chime in that'd be useful.

sim_1’s picture

Hmm, I am so far unable to reproduce that issue. But I think you're right that we should definitely recommend a drush cr as a part of the update process since so many twig and yml files will be changing.

erutan’s picture

If I remember correctly it was a glitch on my end from playing around with the 6.7.4 update and this and the order of which I did it.

I don't think it's anything serious to worry about.

sim_1’s picture

Status: Needs review » Reviewed & tested by the community

Great, ok! I'm going to mark this RTBC because I'm not sure how much other testing we're going to get. I think once I merge it we can push a beta release and scope what's we want to work on before making a fully stable release!

sim_1’s picture

  • sim_1 committed 08a9163 on 8.x-6.x
    Issue #3273854 by sim_1, erutan: Template updates to keep up with Core
    
sim_1’s picture

Status: Reviewed & tested by the community » Fixed

Yay! Ok, i'm going to create a 8.x-6.x-beta1 release!

Status: Fixed » Closed (fixed)

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