Opened 15 years ago
Closed 15 years ago
#15973 closed defect (bug) (fixed)
Searching, sorting and paginating don't clear messages
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.1 | Priority: | high |
| Severity: | normal | Version: | 3.1 |
| Component: | UI | Keywords: | has-patch commit |
| Focuses: | Cc: |
Description
Trash a post. Then search. You'll still see the "Item moved to the Trash." message.
Granted, in the case of trashing there is still an undo link. However, that's not going to be the case for many other actions. For example, plugin or theme activation/deactivation. I'm searching for a theme and paginating among many themes, and yet still see "2 themes enabled" staring me down. It's very distracting.
If this is not the proper UX -- I can't imagine it is -- then an ajax action (searching, sorting, paginating) needs to unhook div.updated and div.error. I'm not sure of a clearer or cleaner way to do it.
Maybe not a blocker for 3.1, but it is a regression. In 3.0 all of these actions resulted in page refreshes, clearing the slate. Here though, it doesn't, and it's really tough to follow a message that lingers.
(NB: It also probably should reset the pop state URL to remove whichever arguments are left, but it's too difficult to detect which arguments need to go, even just across our screens. We'd need to encapsulate the typical remove_querg_arg from wp_get_referer logic.)
Attachments (2)
Change History (11)
#3
@
15 years ago
Actually, if we simply use $('div.updated, div.error').not('.inline') to select them, then that gives plugins a way to implement persistent-like messages.
#5
@
15 years ago
Sweet. I like the new class. We should probably add .inline too, just due to the existing use case (despite only really being used on settings screens, rather than with list tables).
Potential side effect: We end up unhooking too many messages. Perhaps one by a plugin is designed to linger. I would argue they're using it wrong there, though.