Closed bwhet closed 7 years ago
Personally, I find interrupting modals incredibly off-putting (I think most people do). But it would definitely get the job done. I might start with creating a highly visible alert banner between the header and the content and then giving them the ability to dismiss it. If we feel like that works, I think that is the better option.
Yeah, that's a great idea. Better than either footer (too far removed) or modal (too annoying).
I wanted to make it the first thing you see, so it's a little bit blatant, but here you go. I had never made a cookie before, but I went ahead and took a stab at it. I based it off of code on MDN, and it seems to be working. Check it out and let me know if it works for y'all. Then @gabeotisbenson can implement it.
I think that looks good.
Is there a way to hide by default and only show if the cookie's not there? The way it is now, there's a flash of the message on every page load.
Also, we'll want the cookie's domain to be *.caes.uga.edu so that it's not displayed on each application. Actually, is that true? Should we store cookies (and display notices) per application? Or just one note for all apps? Once it's dismissed for one app, dismiss for all?
@bwhet yes, so here is what the logic/setup will be for the alert-bar:
display: none
by defaultIn terms of the URL, I honestly feel like it might be fine to add the domain and have it appear one time for all apps. Because if they dismiss it, and then go to another app they would have already seen the message and wouldn't necessarily be thrown by the update. If you have a final opinion about that, let me know. I'll get started applying the above style.
@bwhet @gabeotisbenson Just pushed the updated code. I'll wait to close the issue until we can test. I've also waited on adding the URL because if all apps have the same global JavaScript, then each page will check for the cookie by default.
I think you're right about adding the cookie to the entire *.caes.uga.edu domain - so that it appears only once for all apps.
Let me know if you'd like help testing, etc.
Sure thing. I would like help testing. @gabeotisbenson is gonna add the updates to the template and then we can test it on dev.
Alright. Let me know.
I've added this to the template generator (along with any other pending changes). It looks like it's working!
Just to note: it dismisses and saves for each app individually, but not globally
That's fine (each app individually).
I don't see them, though.
Any chance you already have the cookie on your system? It's showing up for me in different browsers+private sessions.
what's the cookie called?
It looks like it's called "doSomethingOnlyOnce"... Do you care if I change that to something more descriptive, John?
I have deleted all cookies - still no alert message for some reason. I could be missing something...
@gabeotisbenson something like appsUpdateAlertMessage? I'd like to change it locally as well for consistency.
@bwhet Also, I am not sure why you aren't getting the cookie. I will do some testing as well and see why that might be the case.
I've renamed the cookie to appsUpdateAlertMessage, and set it to be global (so you only need to set it once on a single app for it to apply to all apps)
Still not working for me. I'll test more after lunch.
All of a sudden the alert seems to be appearing for me.
Awesome! Do you think that is good enough to close the issue, or do you want to recruit someone else to test?
It would be great to recruit one more person. Maybe Reed?
By the way, I can see the cookie now, and the alerts are working great -- delete the cookie, alert comes back, etc. No need to pull in reed, I don't think.
Last thing on this, though. I'd like to think through how long the display should last. Perhaps we can wrap the JS code that displays the alert with a date condition - display only if before some future date. One month out? Two? Some of our users don't use the systems frequently. So we might think about going longer.
Okay, I was actually just about to email Reed, so that saves the time. Since there is a cookie, and it can be dismissed, why not say three months? If they don't use any apps for three months, I don't know that the alert message is going to help all that much, haha.
Sounds good.
Benjamin Whetstone | IT Senior Manager, Web Team Office of Information Technology College of Agricultural and Environmental Sciences University of Georgia 706) 542 -9018
From: John French notifications@github.com Sent: Thursday, December 22, 2016 12:49:12 PM To: johnfrenchxyz/Intranet Cc: Benjamin Whetstone; Mention Subject: Re: [johnfrenchxyz/Intranet] Create temporary alert to ease users' fear that they're in the wrong place. (#47)
Okay, I was actually just about to email Reed, so that saves the time. Since there is a cookie, and it can be dismissed, why not say three months? If they don't use any apps for three months, I don't know that the alert message is going to help all that much, haha.
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/johnfrenchxyz/Intranet/issues/47#issuecomment-268852940, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXeP5K0EzRt8KzSodUkJeECAoePpBZtBks5rKrgYgaJpZM4LQ1Ub.
Okay, I added some JavaScript that sets the expiration date of the alert to March 1st. If the current date is after March 1st, the alert won't display.
Do you think we're good to close this issue?
I've added the changes to dev. Good on my end.
Is the expiration set in the cookie and ColdFusion? Or just one or the other?
My cookie still expires in 9999 (after deleting and resetting it).
We might want to wrap the alert in some CF, too, if it's easy.
<cfif now() lt '3/1/17'>
... do the alert stuff...
Benjamin Whetstone | IT Senior Manager, Web Team Office of Information Technology College of Agricultural and Environmental Sciences University of Georgia 706) 542 -9018
From: Gabriel Benson notifications@github.com Sent: Thursday, December 22, 2016 1:40:00 PM To: johnfrenchxyz/Intranet Cc: Benjamin Whetstone; Mention Subject: Re: [johnfrenchxyz/Intranet] Create temporary alert to ease users' fear that they're in the wrong place. (#47)
I've added the changes to dev. Good on my end.
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/johnfrenchxyz/Intranet/issues/47#issuecomment-268862842, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXeP5Fto0gRrhJXjdZogO2axfWQINFfTks5rKsQAgaJpZM4LQ1Ub.
The cookie expires then, but the JS prevents the alert from being displayed after March 1st. I don't care if it's done in CF or JS. Is there a trade-off either way?
I could probably also set the cookie to expire on March 1st as well. What do y'all think?
Okay, I see.
I think that's fine.
Benjamin Whetstone | IT Senior Manager, Web Team Office of Information Technology College of Agricultural and Environmental Sciences University of Georgia 706) 542 -9018
From: John French notifications@github.com Sent: Thursday, December 22, 2016 1:47:10 PM To: johnfrenchxyz/Intranet Cc: Benjamin Whetstone; Mention Subject: Re: [johnfrenchxyz/Intranet] Create temporary alert to ease users' fear that they're in the wrong place. (#47)
The cookie expires then, but the JS prevents the alert from being displayed after March 1st. I don't care if it's done in CF or JS. Is there a trade-off either way?
I could probably also set the cookie to expire on March 1st as well. What do y'all think?
- You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/johnfrenchxyz/Intranet/issues/47#issuecomment-268864243, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AXeP5C-JBD1XI0SxhqIwtoQAWVklU3-Mks5rKsWugaJpZM4LQ1Ub.