Problem/Motivation
Some messages, such as the ones being discussed in #3041885: Display relevant Security Advisories data for Drupal, are important for users to see. But then after they've seen them, there's nothing they can do about it until later. It would be great to allow the user the option to dismiss them.
(Looks like there are numerous attempts found in contrib, but I couldn't find a core issue, so here is one. :)
Proposed resolution
Probably several ways to go about this, but one stab is:
- Add a
dismissableflag to the Message API. - If
true, pull in some JS code for dismissing the message
Remaining tasks
1. Talk about it
2. Research best implementation approach
3. Get 'er done!
User interface changes
Yes.
API changes
Yes.
Data model changes
Yes.
Comments
Comment #2
aaronmchaleYes I agree this is valuable.
One initial thought I have is, once the user triggers the "dismissal" of a given message, how do we track that between page loads and sessions? Do we need to generate a UUID for every message that the messaging service handles and track which ones have been "read" or "dismissed" (kind of like how the Track module works for allowing users to track new comments/updates on content)?
I presume we care about this, it could be pretty poor UX if the user dismisses a message, then when they navigate to another page the message is back.
If we do go down that road, to save on resources, do we introduce a technical difference between say:
Heck, do we need a whole new "notifications UI" which is more catered to these persistent messages and facilitates the persistent dismissal of messages?