[wp-trac] [WordPress Trac] #4735: OK/Cancel dialogs should have choices specific to the situation

WordPress Trac wp-trac at lists.automattic.com
Tue Dec 1 11:21:00 UTC 2009


#4735: OK/Cancel dialogs should have choices specific to the situation
----------------------------+-----------------------------------------------
 Reporter:  novasource      |        Type:  enhancement
   Status:  new             |    Priority:  normal     
Milestone:  Future Release  |   Component:  UI         
  Version:                  |    Severity:  normal     
 Keywords:                  |  
----------------------------+-----------------------------------------------

Comment(by caesarsgrunt):

 The most common JS confirm(...) dialogs have been replaced by the
 Trash/Undo functionality. However, there are still both confrim(...)
 dialogs and HTML confirmation pages, and there is some inconsistency about
 which system used in some places.

 ----

 To the best of my knowledge, the situation is currently as follows.

 '''Trash/Undo''' has replaced confirmation dialogs in the following
 places:[[BR]]
 * Deleting Posts[[BR]]
 * Deleting Pages[[BR]]
 * Deleting Media[[BR]]
 * Deleting Comments

 '''JS confirm(...)''' still exists in the following places:[[BR]]
 * Deleting Tags[[BR]]
 * Deleting Categories[[BR]]
 * Deleting Links[[BR]]
 * Deleting Link Categories[[BR]]
 * Deleting Themes[[BR]]
 * Cancelling the Editing of Media

 '''HTML pages''' are used to confirm the following actions:[[BR]]
 * Deleting Plugins[[BR]]
 * Deleting Users

 And there is '''no confirmation''' of the following:[[BR]]
 * Removing Widgets from the sidebar

 ----

 The biggest inconsistency here is between deleting Plugins and deleting
 Themes. Whilst Plugins get an HTML AYS page with a list of files which
 will be deleted, Themes have a JS confirm(...) dialog. I think Themes
 should also get an HTML page.[[BR]]
 An alternative would be to add a form of Trash/Undo to Plugins and Themes
 too, but personally I don't think it's needed and I would be against the
 idea.

 Regarding Links, Tags, and Categories - these ''could'' also have the
 Trash/Undo.[[BR]]
 However, when implementing Undo I decided not to do it for these for
 various reasons. The main reason for not doing it for Tags and Categories
 is that there is the problem of removing the Tag/Category from all posts
 and then adding it again in the event of restoring it from the
 trash.[[BR]]
 Additionally, I decided that Links are a very minor thing to have to re-
 add in the event of an accidental deletion, compared to Posts, Pages, or
 Comments.[[BR]]
 Trash could be added to all these in the future, though personally I would
 be against it.

 For cancelling the editing of images, the JS confirm(...) could be
 replaced by an inline prompt fairly easily since there is a lot of jQuery
 used for that feature already. I dont know if a prompt is even needed
 there, though.

 For removing widgets from the sidebar, I do think there should be a prompt
 - either JS confirm(...) or an inline prompt like we used to have for
 deleting media.

 ----

 For what it's worth, I personally don't really think a few JS confirm(...)
 dialogs are a problem, now that we've got rid of the major ones.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/4735#comment:17>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list