Ticket #2560 (closed defect: wontfix)

Opened 3 years ago

Last modified 10 months ago

Javascript alert I18N and interface consistency

Reported by: SteveAgl Assigned to:
Priority: high Milestone:
Component: Administration Version: 2.0.1
Severity: normal Keywords:
Cc:

Description

Referring to the thrad on polyglot ML: http://comox.textdrive.com/pipermail/wp-polyglots/2006-March/000882.html

Javascript alerts:  some have "OK" to delete, "Cancel" to stop;  
others have "Cancel" to stop, "OK" to delete (and variations).  I  
suggest standardising on the first, since that's the order the  
buttons appear in Windows.

Her the patch to stndardise all the alert to OK - Cancel order.

Attachments

javascript-alerts.patch (10.9 kB) - added by SteveAgl on 03/11/06 19:44:35.

Change History

03/11/06 19:44:35 changed by SteveAgl

  • attachment javascript-alerts.patch added.

03/12/06 15:29:02 changed by davidhouse

Can we not have verb-based buttons which are regarded to be more usable? I.e.,

"Warning; this will irretrievably delete this post. [ Delete ]; [ Cancel ]"

03/12/06 20:39:21 changed by ryan

I prefer using imperative verbs too.

Alert Buttons

03/12/06 21:01:24 changed by markjaquith

+1 ... and let's standardize the order of them as SteveAgl? suggested... so that it's always [ Delete ] [ Cancel ] or [ VERB ] [ Cancel ] in generic form.

03/13/06 16:00:10 changed by SteveAgl

+1 for using imperative verbs too, using the order suggested on polyglots ML.

03/14/06 02:39:09 changed by ryan

Let's do it. Anyone want to work up a new patch?

03/14/06 07:53:02 changed by davidhouse

  • owner changed from SteveAgl to davidhouse.
  • status changed from new to assigned.

I'll give this a shot. If anyone feels like working up a list of where in the admin the dialogs appear, that'd be great ;) If not, I'll do a hunt myself.

03/14/06 08:04:25 changed by mdawaffe

davidhouse, you may run into collision here with the patch I'm working on over at #2561. I'll be putting up some code soon.

03/14/06 08:11:00 changed by davidhouse

Sure. I'll wait.

03/16/06 18:40:01 changed by davidhouse

This could be tricky. There's no JS call to pop up a dialog with custom text on the buttons: you get OK or OK/Cancel.

We could do this with a window, but it'd likely get popup-blocked. How about doing some JS-fu to grey out the screen, then display a box in the middle with some text and some buttons? This really goes beyond the JS skills/knowledge I have, so shoot this down if it sucks. Also, for the coding, I'd probably want to delegate as this isn't exactly my area of expertise.

03/17/06 00:54:16 changed by mdawaffe

I don't know where all the JS confirms are in WP, but consider this.

For the JS confirms spawned by AJAX calls (see #2561), what if we replaced the actual HTML item being deleted with an "Are you sure..." message? As an example, say you go to Manage->Categories and delete one of the categories listed in that table. The TR is replaced with "Are you sure you want to delete this Category named X? _Delete_ _Cancel_". On Delete, the TR would fade away, on Cancel the TR would be re-replaced by the old information.

My friend Greg thought of this idea, seems slick to me.

05/01/06 03:07:33 changed by matt

I like the direction of the modal dialogs, especially if there was a checkbox "never show this to me again." They would need to be just as accesible as regular popups, in that they should have proper tabbing between them (and no where else in the page), they should capture proper key presses, and have a sane "enter" default, be exitable with "esc", etc.

Also a little visual pizazz would be nice, say a OS X type drop shadow on the box, and a smoother background transition (like the widgets plugin has).

05/01/06 03:08:29 changed by matt

BTW, the above comment was in response to:

http://leftjustified.net/lab/wordpress/modal-windows

Whoops!

05/01/06 05:32:51 changed by leftjustified

I've started on the modifications suggested by Matt.

  • 'Do not show me again' checkbox added. Should ticking this box disable the Cancel button? Allowing them to set an auto-cancel makes the delete functionality unusable :-/
  • The captureKeys observer kicks in when a modal dialog is activated and gets removed on closing the dialog.
  • Escape key is mapped to the cancel function.
  • Focus is immedietly moved to the first input element (the 'Do not show me..' check) upon display of the window.

I'm in the process of restricting the tab order to form elements and links within the window. It's a mess at the moment, if anyone would like to have a look the function is called captureKeys. Go on, you know you want to! ;)

12/03/06 21:19:13 changed by matt

  • priority changed from normal to high.
  • milestone changed from 2.1 to 2.2.

BTW, I really want to get the modal windows from above in, but let's target 2.2.

04/05/07 14:16:19 changed by rob1n

I'm +100 for modal windows. Makes for UI consistency and it's more reliable/useful than JavaScript?'s alert() or its sisters.

04/05/07 14:17:16 changed by rob1n

  • owner changed from davidhouse to rob1n.
  • status changed from assigned to new.

04/05/07 14:24:47 changed by rob1n

See #4089.

04/09/07 04:09:18 changed by rob1n

  • milestone changed from 2.2 to 2.3.

06/14/07 02:44:06 changed by rob1n

  • owner deleted.

08/14/07 17:05:16 changed by Nazgul

  • milestone changed from 2.3 (trunk) to 2.4 (future).

01/24/08 17:34:06 changed by Nazgul

  • status changed from new to closed.
  • resolution set to wontfix.
  • milestone deleted.

This ticket has had no real activity for some time and has partially been superseded by #4089, so closing as wontfix for now.

Feel free to re-open if you have additional patches/information/suggestions/...