Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-06-01 21:57:34

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

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

Offline

#2 2012-06-02 01:38:00

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,188
Website

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

#3 2012-06-02 03:24:32

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

#4 2012-06-02 11:26:29

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,446
Website GitHub

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

Offline

#5 2012-06-02 14:19:56

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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:

  1. Removed all inline CSS (was mostly done before phase 1 but a few extra ones were mopped up in this patch).
  2. The naming conventions of id and class attributes are more logical, and many are now prefixed with txp- to avoid potential clashes.
  3. 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.
  4. The various confusing button classes such as smallbox, smallerboxsp etc have also been removed. A new class="destroy" is now used on the delete buttons (class="publish" stays unchanged).
  5. 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.
  6. 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.
  7. Modernisation of the CSS in core themes, and a generally cleaner, more modern look (this work will be continued further in phase 2).
  8. Many inconsistencies in tag structure between various pages have been fixed/improved.
  9. 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:

  1. 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).
  2. Redesign and improve the setup/installation pages.
  3. Sort out some layout problems on the users admin page.
  4. Redesign and improve the layout of the import pages.
  5. Continue to work on core theme CSS.
  6. Continue to iron out inconsistencies and display issues throughout the admin area.
  7. 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

#6 2012-06-02 15:37:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,090
Website GitHub Mastodon Twitter

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

#7 2012-06-02 15:45:01

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#8 2012-06-03 02:42:00

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,188
Website

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

#9 2012-06-03 02:43:46

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: r3798, r3809, r3817: Don't Panic

grr… yay…

lots of custom plugins. one workhorse custom theme.

Offline

#10 2012-06-04 08:29:10

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

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

#11 2012-06-04 08:42:13

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

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

#12 2012-06-04 12:33:57

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

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

Board footer

Powered by FluxBB