Update 05 Nov 2012: Please note that this announcement has been superceded.

Textpattern 4.2.0 and earlier has a predominantly table-based admin side. In some places tables make perfect sense when displaying tabular data; on list pages, for example. In other places (e.g. Images panel, Write panel) it’s a bad use of space and very restrictive for plugins and themes.

The good news is that where 4.3.0 is hamstrung by tables, Textpattern 5 will not be. The admin side will be remodelled wherever it makes sense with a more semantic markup system (perhaps HTML5 if it’s accepted by then).

To that end, we need a way to bridge the gap between today’s Textpattern admin side and tomorrow’s Textpattern 5 that won’t break huge swathes of plugins and admin-side themes. Textpattern 4.3.0 is that bridge.

If Textpattern 5 launches without a solid user base of plugins and themes, adoption will be slow and upgraders will—quite rightly—not move forward without their arsenal of plugins. This is largely based on a gut feeling and some anecdotal evidence that plugins are the backbone of many CMSes.

Come with me if you want to live

The idea is to introduce new classes, IDs and wrappers in the 4.3.0 release that plugin authors and admin theme designers can begin to use. The crucial factor is:

Even if the tables or other markup falls away, the class names and IDs will prevail in the new markup wherever possible.

This means, to all intents and purposes, more plugins and themes are likely to work out of the box in future Txp versions if we all start to use these new selectors from 4.3.0 onwards.

The history of things to come

Under 4.3.0, virtually every admin-side widget/logical group of widgets can be directly accessed without chains of descendent selectors or back-and-forth jQuery manipulation. The hope is that the underlying markup can be changed without affecting plugins and themes too much. Of course there’ll be casualties, but we hope to mitigate these.

Getting to r3372 has been anything but a smooth ride because the current names, IDs and classes leave a lot to be desired in places. To preserve backwards compatibility in the 4.x branch, we can only add stuff, not rename existing entities.

The sections below give some idea of what’s going on beneath the 4.3.0 admin side—which looks fairly similar to 4.2.0 to the untrained eye ?. If you have Firebug installed, feel free to browse around the new names and become acquainted.

Beneath the hyper-alloy combat chassis

There are a number of guiding principles behind the changes:

Regarding the wrapper containers noted above, here’s an example from the Write tab. This is the existing markup:

<td id="article-col-1">...</td>
<td id="article-main">...</td>
<td id="article-tabs">...</td>
<td id="article-col-2">...</td>

New bloaty, class-soup markup in 4.3.0:

<td id="article-col-1"><div id="configuration_content">...</div></td>
<td id="article-main"><div id="main_content">...</div></td>
<td id="article-tabs"><div id="view_modes">...</div></td>
<td id="article-col-2"><div id="supporting_content">...</div></td>

Semantic markup in 5.0.x:

<div id="configuration_content">...</div>
<div id="view_modes">...</div>
<div id="main_content">...</div>
<div id="supporting_content">...</div>

You can see from this how important it is to start using the new names as soon as possible. Any plugin or theme that expects <td> elements to exist, or relies on some implied node order will likely fall over in Textpattern 5.

There’s a storm coming in

Tables will probably be retained in list-type areas because they contain tabular data. These include the Articles, Files, Links, Comments, Users, Visitor Logs and Plugins panels. But the markup of the tables has been sharpened now:

Say… that’s a nice bike

While the tables remain in some areas, other places will get a make-over. Most of the details pages have been positioned so the tables can be removed to leave behind the sleeker markup. Specifically:

Other CPU upgrades

Uzi 9mm required (a.k.a. I’ll be back)

Two tabs that still pose problems are the Sections and Preferences panels. Sections are just a complete nightmare to handle elegantly and need significant brain power devoted to them.

For the Preferences panel, current thinking is:

The future is not set

That pretty much covers the ethos behind the changes. Now and over the coming weeks, please take a look under the hood of the new admin side and if you like what you see or have any thoughts on how things could be done better (or perhaps have some better naming convention) speak up now! Once 4.3.0 is out, we’re stuck with it.

It would be remiss not to mention the fine folk who have kindly assisted with guidance, mods, feedback, suggestions and all important road testing so far while this has been in development over the past six months or so. In no particular order: jakob, renobird, phiw13, redbot, jstubbs, maxvoltar, net-carver, squaredeye, masa, and Sam (brown). You’re all oceans of awesome!