The way we have been approaching changes to core templates has, at least afaict, been a piecemeal affair - we change one or two templates at a time working through the various markup issues until such time as we have some broad consensus and ta da, here's our new template.
This bottom-up-esque methodology seems reasonable because we we are not overhauling the entire system at any one time and are just looking to adjust or tweak parts of it.
I think this has worked OK in the past, however I tend to think this methodology has a few drawbacks.
It makes systems thinking harder. While we are always looking over our shoulder at the entire markup system, this gets very hard when in the thick of the day to day grind of getting shit done in the issue queues.
It suffers from bikesheditis, and not just once, but often repeatedly. Building consensus is hard and tiring. You know the deal, right?
Enter HTML5 - now we really are overhauling the entire system - time for a rethink?
HTML5 ushers in a whole raft of new semantic elements, not least of which are the new sectioning elements and a new way of using heading levels. It is critical to think at the system level when introducing new sections and headings - no one template outputs the entire document, so we must consider the template stack and how they affect the outline and overall structure of the document.
I recently created a whole bunch of issues to deal with converting our core markup to HTML5. I've actually done this myself at least 3 times already, and to my mind this bottom-up approach is going to be a long winded affair that may not yield us optimal results. Tbh I am not 100% happy with any of my previous attempts and here's why:
- There are too many templates.
- There are many inconsistencies.
- Building from the bottom up can obfuscate breakages in the grand scheme.
Let me explain this third point a little more - its very easy to build one template, iterate it until you consider it perfect and consider it done. In XHTML this approach sort of worked because we only had to think about a few heading levels. In HTML5 we have think about what each section means and on top of that apply a whole new set of rules to our heading levels, and of course wrangle implicit sections.
OK, so before this becomes an essay/brain-dump I have a few ideas on how we might be able to do a better job of this whole HTML5 conversion thing.
First I want to propose that we hold off on the tpl conversions and in the first instance build our ideal document structures in HTML only. No Drupal, no templates, no theme functions - just strait out HTML wireframes. We'll need to build a lot of these because there is no one structure, however many of us will have a pretty good idea of what these will look like most of the time.
Once we have our "ideal structures" in place we start breaking them down into their component parts and actually rethink what these are. I'm not saying we should tear the entire system apart, just rethink how and why we are doing things - maybe there are better ways.
Never iterate a component in isolation from the overall structure.
Look for ways to ensure the structure always matches our ideal notions of a good outline.
At the end of the day what I am hoping to do is streamline our markup conversion process, to avoid as many bikesheds as possible and end up with a more robust set of templates. Thoughts?