Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2012-06-24 11:42:45

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

Re: r3822/3: New Sections panel

@phiw13

I was hoping that since the button is already within a wrapper of .txp-edit-action and the only other item within that wrapper is an input[type="submit"] I could get away without adding another class? What do you think?

Offline

#50 2012-06-24 11:46:04

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

Re: r3822/3: New Sections panel

phiw13 wrote:

It is the only use of <button> in the admin backend so far, but still.

I was looking at <button> tags the other day. We need to bear in mind that the destination action is to go back to the List panel, possibly (err, probably!) retaining any search criteria so it really needs to have an anchor like this:

http://site.com/textpattern/index.php?event=section&name=articles&sort=name&dir=asc&page=1&search_method=name&crit=some_search_term

Does <button> support that? I think I read that you can’t put an anchor inside a button, but that might have been from w3fools so it probably didn’t count for much.

Last edited by Bloke (2012-06-24 11:49:18)


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

#51 2012-06-24 11:56:04

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

Re: r3822/3: New Sections panel

Bloke wrote:

Does <button> support that? I think I read that you can’t put an anchor inside a button, but that might have been from w3fools so it probably didn’t count for much.

As far as I know, element a cannot appear as a descendant of the button element. I’m searching through the HTML5 spec, will report back if otherwise. Can’t you just send something like javascript history.go(-1); or something similar ? (haven’t given it any thought, mind…)

philwareham wrote:

I was hoping that since the button is already within a wrapper of .txp-edit-action and the only other item within that wrapper is an input[type="submit"] I could get away without adding another class? What do you think?

Hmm, but what if you add a similar action (cancel) in another context ? You’ve added so many classes that one more or less won’t kill anybody.

Anyway, given what Stef notes, button might not be the most appropriate markup.

Last edited by phiw13 (2012-06-24 12:01:07)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#52 2012-06-24 11:57:49

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

Re: r3822/3: New Sections panel

OK, I’ll await your findings, then take it from there. If we keep button I’ll add a class.

BTW Stef, just add ‘mdn’ to any google searches you do regarding HTML elements, that should bring up docs from Mozilla Developer Network instead of W3C Schools. Much more reliable.

Last edited by philwareham (2012-06-24 12:00:25)

Offline

#53 2012-06-24 13:42:20

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

Re: r3822/3: New Sections panel

I wrote:

As far as I know, element a cannot appear as a descendant of the button element. I’m searching through the HTML5 spec, will report back if otherwise.

HTMl5 spec on the button element is categorical, here:

Phrasing content, but there must be no interactive content descendant.

(the link element is interactive content).


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#54 2012-06-24 13:48:39

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

Re: r3822/3: New Sections panel

So… we use a link and style it up to look like a button. Everyone happy with that? (I’ll put a class on said link too).

Offline

#55 2012-06-24 14:08:01

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

Re: r3822/3: New Sections panel

philwareham wrote:

So… we use a link and style it up to look like a button. Everyone happy with that? (I’ll put a class on said link too).

That or some JavaScript. Some common classes with some JavaScript attached, and data- params (yes, leads to invalid HTML but how gives a damn when it’s bound to change to HTML5 — or you could as well change it right now, it’s not going to break the admin-pages).

As Cancel buttons go, I’m not really fond of those. Save and cancel buttons in general are overrated and should be avoided if possible. Especially Cancel as it makes it sound as like you could Cancel your latest changes you made, which in most cases isn’t the case at all.

Which reminds me that open source projects have the trend of having fake cancel buttons all over the place. God I love GUIs build for command line tools for that reason.

Offline

#56 2012-06-24 14:20:21

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

Re: r3822/3: New Sections panel

@gocom

HTML5 admin side will have to wait for v4.6.

Do you think just having a close icon on modal boxes is enough, or do you think cancel buttons are ok on modals?

Offline

#57 2012-06-24 15:00:15

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

Re: r3822/3: New Sections panel

philwareham wrote:

Do you think just having a close icon on modal boxes is enough, or do you think cancel buttons are ok on modals?

I would use a close icon for modals.

Offline

#58 2012-06-24 15:09:13

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

Re: r3822/3: New Sections panel

I think I’ll keep this whole ‘cancel’ button issue on the back-burner for now. It only becomes relevant for modals anyway – we’ve lived this long without a cancel button just fine so it can wait until v4.6.

It would be stupid to add it in now, then rip it out again in one release’s time.

Offline

#59 2012-06-24 20:02:30

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

Re: r3822/3: New Sections panel

philwareham wrote:

I’d rather they were links, not buttons

Seven little words…

… and seven KB of changes later (yes, really), I have the prototype done. Now I remember why I left it as a form, sheesh! But it’s worth it because it’ll make the jump to a modal window a lot simpler.

I’ve dumped the code in Phil’s lap to see if he can a) break it, and b) style the link appropriately. Assuming I’ve caught all the edge cases and he can make it pretty, it’ll be committed soon. Then I’ll do the other affected panels to bring them into line.

Last edited by Bloke (2012-06-24 20:03:43)


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

#60 2012-06-25 08:35:43

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

Re: r3822/3: New Sections panel

philwareham wrote:

EDIT: also, we are considering removing the ‘odd’ and ‘even’ classes from table tbody rows. Now that table layouts throughout the admin-side are tidied up this can be achieved with nth-child CSS rules by theme authors instead (OK, I know IE8 and below don’t support that rule but since it’s purely aesthetic we can accept that regression, right?).

You know, using :nth-child() causes a (minor) problem on the Preferences Pane. It also catches the table rows that contain the h3s on the basic and advanced panels. Nothing that can’t be worked around, I just thought I mention it as fwiw.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

Board footer

Powered by FluxBB