lantern icon indicating copy to clipboard operation
lantern copied to clipboard

hide notifications after a timeout

Open lanterndev opened this issue 13 years ago • 8 comments

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.

lanterndev avatar Mar 06 '13 20:03 lanterndev

@skivvies Why can't these just timeout on the front-end?

ghostdance avatar Mar 08 '13 23:03 ghostdance

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?

lanterndev avatar Mar 11 '13 19:03 lanterndev

Please assign to me when the frontend is done

leahxschmidt avatar Mar 11 '13 22:03 leahxschmidt

All set @leahxschmidt. See getlantern/lantern-ui@b5bdec76b907f7b39e44da5abe44f4bbb117dd59 and ping me if you have any questions.

lanterndev avatar Mar 13 '13 01:03 lanterndev

When should autoClose be set?

leahxschmidt avatar Mar 13 '13 02:03 leahxschmidt

30 seconds sound reasonable?

lanterndev avatar Mar 13 '13 02:03 lanterndev

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 .

leahxschmidt avatar Mar 13 '13 02:03 leahxschmidt

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.

lanterndev avatar Mar 13 '13 03:03 lanterndev