illinois / queue

A microservice queue for holding open office hours
University of Illinois/NCSA Open Source License
82 stars 36 forks source link

Notify when close the front of line #341

Open ekcom opened 11 months ago

ekcom commented 11 months ago

[Feature request]

Notify the user when there are a given number of people ahead of them in line.

This has the use case of letting people know when they are next up so that they can be prepared, especially if they have been waiting a while.

I've made a simple gist which periodically checks whenever the number of people in line has been updated and sends a notification to the user when they are a set number of spots away. Of course, this would be better integrated into the Queue by checking directly after the relevant sockets message. This injected script is a merely a proof-of-concept.

Ideally, this would be a user-customizable setting so that people could turn this notification off if desired while leaving the "you are being helped now" notification enabled. Also, customization on how many people out before getting the notification. E.g., some queues move faster and someone might want to be notified five people away while another person might just want to be notified when they are one spot away from being helped.

I'm not sure if this service is storing any persistent user data itself (it seems like most is authentication and directory information from Shibboleth), so this last customizable setting feature may not be feasible. Simply using localStorage may be a possibility