While Jira Announcement banner is very usefull it is also very annoying once you read it and people will stop reading it even if you update it.
The solution is to display the message only until someone is reading and closing the message.
Atlassia AUI already have support for closeable messages but it seems that it doesn't memorize that you closed the message, so when you refresh the page the message will be displayed again.
Still, I found at least one place where Jira seems to remember this, if you go to /secure/project/ViewProjects.jspa for the first time you will see a message like this, but once you clicked close it will not appear again.
I looked at the code it my impression is that it doesn't send anything to the server. I guess that the state could be stored in a cookie.
Does anyone have an implementation that works?
<div class="aui-message closeable" id="browse-projects-info" data-type="blankproject"> <h3>Here are your projects</h3> <p>You can create more projects for each of the things your team is working on. Whenever you create a new one it will appear in the list below.</p> <p><a class="browse-projects-info-dismiss">Thanks, I got it</a></p> <span class="aui-icon icon-close" role="button" tabindex="0"></span></div>
I use the following within the announcement banner.
<div id="mycrazyuniqueid" style="display:none;" class="aui-message aui-message-info closeable"> Announcement Banner Text </div> <script> if (AJS.Cookie.read("mycrazyuniqueiddismissed") != "true"){ document.getElementById('mycrazyuniqueid').style.display = 'block'; } document.addEventListener('click', function (e) { var msgid = e.target.parentElement.id; var msgtargetclass = e.target.className; if (msgid == "mycrazyuniqueid" && msgtargetclass == "aui-icon icon-close") { console.log("Hide mycrazyuniqueid Info"); AJS.Cookie.save("mycrazyuniqueiddismissed", "true"); } }); </script>
After reading the documentation I tried addEventListener('aui-message-close',...)
but that doesn't seem to work within the announcement banner.
Henning
I'm really interested in this. Otherwise, how do you guys notify users of changes / updates? At the moment we have the permanent bar at the top and I find it really annoying...
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.