Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
r3798, r3809, r3817: Don't Panic
Anyone keeping up to date with SVN, please remember the immortal words of The Hitchhiker’s Guide to the Galaxy when updating to r3798 / r3809 / r3817.
Don’t Panic
The markup is a lot different under the hood to help support forthcoming admin-side changes and Phil Wareham has been steering.
Phase 1 of this is an extension of the Inline Styles Eradication Programme but has gone further to remove some more loose ends such as the list/edit table names which are not particularly semantic. A few highlights from this megapatch:
- More consistent layout and class/ID names.
- Removal of more inline paraphernalia (Phase 2, landing in a few weeks, will zap HTML
width
attributes on table cells, among other things, so the CSS can control it all). - Pophelp widgets moved alongside the labels, instead of taking up a 3rd table column or being tacked onto the end of the input widget.
- Languages panel overhauled to improve the workflow; ‘Show details’ is a misnomer but it’s hard-coded into the library function so can’t easily be changed (yet).
- Some previously mandatory arguments to things like
startTable()
are now optional. - Lots of hard-coded nbsp; / <br> elements removed.
- smallerbox / smallbox / smallboxsp / noline classes removed from core files. Class definitions still exist in CSS for backwards compatibility in plugins.
- txp-head, txp-body and txp-foot wrappers introduced which simplify markup and provide a consistent baseline for themers / plugin authors
- Visual tweaks to buttons and spacing and stuff
Some things in themes will be a bit wonky for the time being (odd positioning, primarily). These will be fixed as part of subsequent phases, in the not too distant future so please bear with us as the furniture is rearranged.
Last edited by Bloke (2012-06-18 10:59:21)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: r3798, r3809, r3817: Don't Panic
Ok, I do panic! :-p. I fixed Sandspace in 17 minutes 32 seconds.
Slightly more seriously.
One (minor) issue that jumped out: Preferences pane > Languages, check the ‘details’ checkbox. The tfoot
doesn’t extend the full width of the table (the td
has colspan=2
hardcoded). The fix would be to hardcode the colspan to ‘4’ (txp_prefs.php, line 855), similar to what is done e.g. Contents > articles, where the colspan has the max-number of columns.
(stick a .txp-list tfoot > tr { border-top: 3px solid lime }
in the stylesheet to see)
Also nitpicking or whatever:
txp-head
and txp-foot
. Wouldn’t that be better as txp-header
and txp-footer
? Implied association with HTML5 header
and footer
.
I’ll have some more thoughts later. Nothing major, mind. At least, I don’t think so.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: r3798, r3809, r3817: Don't Panic
Good work all in all.
Well, the only thing is that this obliterates backwards compatibility. All rah plugins, and probably other decent admin plugins, that had their own decent interfaces were/are pretty screwed. Didn’t take me long to fix mine dev branches (i.e. rah_post_versions and rah_backup), but now the plugin’s are locked to TXP 4.5+ (unless plugins are supposed to duplicate old code). Not that it really matters as rah plugin’s go, most of those are already on at least 4.4.1 or 4.5+ exclusive list.
Offline
Re: r3798, r3809, r3817: Don't Panic
Thanks for the feedback guys. There will be more changes soon, so some other stuff might break, but we are sensitive to backwards compatibility as much as we can. Any thoughts on that welcome. Glad the changes (so far) haven’t resulted in the necessity of changing tonnes of code. That means we’re moving in the right direction.
I think I agree that txp-footer and txp-header make more sense. Will fix those at some point. Will also fix the colspan, thanks for the report. On that note I wasn’t sure if the highlight bar (for installed languages that need updating) should go all the way across in ‘Show Details’ view. At the moment it spans the first two columns and looks a bit odd. Thoughts? And please keep the reports coming in if you find anything else not right (besides the Sections panel, Styles panel, the ‘Show spam’ box and the plugin install box: they’re noted already). Thanks!
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
Re: r3798, r3809, r3817: Don't Panic
Hi all. Thanks for the comments – the txp-header and txp-footer labels are a great idea and we’ll definitely change the naming to that. Previously the core theme had txp-head so we just kept that, but this makes more sense.
You are all obviously correct that this breaks backwards compatibility of plugins and existing themes somewhat. It’s something Stef and I debated long and hard about but looking to the future the previous admin-side HTML had some serious flaws and outdated coding methods that needed to be addressed which affect the perception of Textpattern as a quality product. Once plugin/theme authors have familiarised themselves with the new code structure I’m sure they’ll be able to build tools quicker and with less unexpected results than previously.
The amount of tables used purely for layout have been reduced, and although we did look at removing layout tables entirely (apart of course from tabular data lists), we felt that with all the other changes happening in v4.5 that might be a step too far as this stage. However, the groundwork has been laid which makes removing those tables more straightforward beyond 4.5.
We realise that there will be some pain in moving plugins over to the new structure, and I’ll try to work with plugin authors as much as I can to ease that move. All the major structural changes made here will be documented prior to the release of v4.5 along with a few new interface elements we will make available to plugin authors. Hopefully this new structure will serve us well as a baseline for many years to come.
I’ll briefly outline some of the changes that were in phase 1 patch:
- Removed all inline CSS (was mostly done before phase 1 but a few extra ones were mopped up in this patch).
- The naming conventions of id and class attributes are more logical, and many are now prefixed with
txp-
to avoid potential clashes. - A general reduction in the number of class names, which makes authoring themes easier. Ambiguous classes/ids such as
class="edit"
,id="edit"
,class="list"
,id="list"
etc have been removed as they were used incoherently and are confusing. - The various confusing button classes such as
smallbox
,smallerboxsp
etc have also been removed. A newclass="destroy"
is now used on the delete buttons (class="publish"
stays unchanged). - Added containers around the head, content and foot sections of the page – previously
txp-container
did not actually contain all elements and left some UI floating outside of a container, so this has been rectified. - Tables and their rows and cells don’t have cellpadding, cellspacing and other attributes any more, as this can be done easier with CSS. We are looking into removing the implicit width attributes from columns too if we can as part of phase 2.
- Modernisation of the CSS in core themes, and a generally cleaner, more modern look (this work will be continued further in phase 2).
- Many inconsistencies in tag structure between various pages have been fixed/improved.
- Initial work on improving the preferences section of Textpattern, especially the languages page. Stef plans to work further on this prior to release of v4.5 – I think the plan is to consolidate preferences into a single page (so no advanced and basic any more). Allowances will be made to enable plugin prefs to be stored within this area better too.
Plans for phase 2 are:
- Redesign the sections page with a more logical structure, removing the inconstant table layout that is present here (in fact we’ve almost solved that but felt it could wait until phase 2 as it involves some large code changes behind the scenes).
- Redesign and improve the setup/installation pages.
- Sort out some layout problems on the users admin page.
- Redesign and improve the layout of the import pages.
- Continue to work on core theme CSS.
- Continue to iron out inconsistencies and display issues throughout the admin area.
- Add more UI widgets/tools/classes for the benefit of plugin authors.
Please leave any constructive comments and criticisms and we’ll take them all into consideration as this progresses.
Last edited by philwareham (2012-06-02 14:23:11)
Offline
Re: r3798, r3809, r3817: Don't Panic
the txp-header and txp-footer labels are a great idea and we’ll definitely change the naming to that. Previously the core theme had txp-head so we just kept that, but this makes more sense.
You are all obviously correct that this breaks backwards compatibility of plugins and existing themes somewhat.
Are the plugins going to break just because of this naming issue?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: r3798, r3809, r3817: Don't Panic
No it’s more involved than that. In fact no plugins will break exactly, but some will have layout issues that will need to be fixed by plugin authors over time. Probably best to wait until after phase 2 if you have plugins with display issues and want to correct them, as still some work to be done.
Offline
Re: r3798, r3809, r3817: Don't Panic
Bloke wrote:
Glad the changes (so far) haven’t resulted in the necessity of changing tonnes of code. That means we’re moving in the right direction.
It wasn’t too bad, at least as far as the main positioning is concerned. Counting the difference in bytes between the code I use before and after, I saved 700bytes (but on the way I optimised my code as well).
On that note I wasn’t sure if the highlight bar (for installed languages that need updating) should go all the way across in ‘Show Details’ view. At the moment it spans the first two columns and looks a bit odd. Thoughts?
lol, yeah. Now that I checked this on an install with outdated lang packs, it looks poor. Highlighting the whole row would definitively be better.
On the suggestion side, while you’re shuffling around with classes etc.:- on the Write pane, the paragraph that wraps around the ‘publish’/‘Save’ button: it has and
ID
for each (#write-publish, #write-save
); could they share a class as well (one and the same class for both states) ? - on the same Write pane, the
prev
/next
buttons for paging between articles have little arrows hardcoded in the html. Could those be added as generated content instead (in the stylesheet) ? Currently, if you look at it with an RTL lang pack (e.g persian), it definitely looks wrong; the arrow points to the wrong side.
Last edited by phiw13 (2012-06-03 02:44:27)
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: r3798, r3809, r3817: Don't Panic
grr… yay…
lots of custom plugins. one workhorse custom theme.
Offline
Re: r3798, r3809, r3817: Don't Panic
philwareham wrote:
Plans for phase 2 are:
Redesign the sections page with a more logical structure, removing the inconstant table layout that is present here (in fact we’ve almost solved that but felt it could wait until phase 2 as it involves some large code changes behind the scenes).
Is this just a style change or a more invasive change that turns the sections page into something more like categories and articles? I’m hoping it’s the latter, because that would make it much easier to manage website with lots and lots of sections. Also it would be more consistent with the rest of the admin interface :)
Offline
Re: r3798, r3809, r3817: Don't Panic
Re: sections page – It was mainly a layout cleanup and a few improvements such as moving the ‘selected by default’ into a single option at the top of page.
So you mean list of all sections in column on right hand side, section options on left column? Bit like styles page layout? It depends how far stef wants to rewrite the php really, I know he plans further work on prefs section so maybe he’s willing to rework sections too.
Offline
Re: r3798, r3809, r3817: Don't Panic
philwareham wrote:
So you mean list of all sections in column on right hand side, section options on left column? Bit like styles page layout? It depends how far stef wants to rewrite the php really, I know he plans further work on prefs section so maybe he’s willing to rework sections too.
That type Pages like interface could be good. Other option would be just a simple table with list of section (without forms) and then a separate editing page — like with Articles. The simplest change, collapsing sections could be great too.
Offline