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
Issue fork zurb_foundation-3273854
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
Comment #3
sim_1Comment #4
erutan commentedI 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.
Comment #5
erutan commentedI 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.
Comment #6
sim_1Hmm, I am so far unable to reproduce that issue. But I think you're right that we should definitely recommend a
drush cras a part of the update process since so many twig and yml files will be changing.Comment #7
erutan commentedIf 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.
Comment #8
sim_1Great, 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!
Comment #9
sim_1Comment #11
sim_1Yay! Ok, i'm going to create a 8.x-6.x-beta1 release!