New module: Dismiss

Anyone working with the Drupal theme layer knows that sometimes our frontend debugging is accompanied by some backend trouble as well. While this is manageable in some cases, other times you really need those error messages to go away so you can work on the theme.

Inspecting the element and deleting manually using browser devtools is tedious. Setting some development CSS is risky, because you might commit the change into your codebase. What’s a frontend dev to do?

Enter Dismiss

Dismiss is a very simple module that uses jQuery to add — you guessed it — a “Dismiss” button to each group of messages within Drupal. So each group of status, warning, and error messages will have a little X button that allows you to quickly get rid of them, rather than using one of the workarounds I listed above.

It can also be a nice feature for user-facing messages. If a user has read and understood a message they can easily get rid of it when you install this module.

I don’t have any further features planned, as I want it to stay simple. If you use it, let me know what you think!

Chris Ruppel is a frontend developer who makes websites load fast and shrink on your phone. Although he’s a native Texan, Chris currently lives in the beautiful town of Freiburg, Germany

Commenting on this Blog post is closed.

Comments

The functionality should be in core. Though to grasp that, the problem needs to be turned around into a feature:

“Allow to persist certain messages across requests and the user to dismiss them.”

I’m 99% sure there is an issue for that proposal already, but I wasn’t able to find it.

Related:
http://drupal.org/node/1049648
http://drupal.org/node/65605