hide notifications after a timeout
Notifications can pile up if the user doesn't dismiss them herself. The backend could schedule a notification to be dismissed automatically after a timeout of (say) 30 seconds if it hasn't been dismissed before then to mitigate this.
@skivvies Why can't these just timeout on the front-end?
Actually I think the frontend is the right place to do this. That way the timeout isn't scheduled until after the page is loaded, giving the user a chance to read it. To accomplish this I would want to modify the spec though: Each notification should be given a unique id, so that they can be closed by id rather than by index in the notifications array. I'd also like to add an "autoClose" field, so that the backend can specify that some notifications should not be closed automatically after a timeout. What do you think?
Please assign to me when the frontend is done
All set @leahxschmidt. See getlantern/lantern-ui@b5bdec76b907f7b39e44da5abe44f4bbb117dd59 and ping me if you have any questions.
When should autoClose be set?
30 seconds sound reasonable?
For everything that we currently send notifications on?
On Tue, Mar 12, 2013 at 10:04 PM, skivvies [email protected] wrote:
30 seconds sound reasonable?
— Reply to this email directly or view it on GitHubhttps://github.com/getlantern/lantern/issues/582#issuecomment-14817595 .
Yes, namely for "invite has been queued" and for "message sent" (through contact modal). I think the "ninvites flipped from zero to nonzero" (and vice versa) notification should not be autoClosed. Sound good?
If we start displaying notifications for potentially much more frequent events like "Your friend so-and-so has connected" we can use much lower autoClose values.
Btw I amended the commit I referenced above to add a couple fixes. The new one is at getlantern/lantern-ui@024e72c5417ca0059db2308eb4d795e84fa5b164 but it should not change anything for the backend.