This is a matter of taste I suppose, but currently drupal_get_message() return the messages by type in the order that they were set. For some of my pages, this looks strange, as it would be Warning, Success, Error. Probably only noticed this because I'm developing and debugging, but it bothered me. Also it's probably not the best for UX.

Attached is a patch which orders them from "Best" to "Worst" ala bootstrap example:
http://getbootstrap.com/components/#alerts

CommentFileSizeAuthor
status-messages-order.patch2.14 KBj0rd
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

markhalliwell’s picture

Status: Needs review » Closed (won't fix)

Honestly, this is too edge case of a preference. I have had some clients prefer the error messages at the top (to get the users attention) and at the bottom (like your case, to lower the importance). Regardless, this should be handled on a sub-theme level (for a specific site/client), not as part of the base theme. Feel free to add this snippet to the docs though :)

j0rd’s picture

I think we can both agree though, that it probably shouldn't be

Blue
Red
Green
Yellow

and should probably be ordered up or down is a matter of preference (and variable set could handle that)...but the call order, is probably not ideal.

markhalliwell’s picture

The color styling is set by Bootstrap variables. They are matched the same as in Bartik:

error => red
info => blue
status => green
warning => yellow

Again, the order of "color" is just your personal opinion. Setting the order of these in a base theme is not "Drupal Best Practices™". Just sort them via preprocess in your sub-theme (which is specific to your site). I have only ever had a small handful of clients actually care about this kind of thing, not enough to warrant a configurable setting really.

And yes, you are correct:

This is a matter of taste I suppose