utmgdsc / PollVotingSystem

MCS Project with Prof. Zingaro and Prof. Ilir
https://poll.utm.utoronto.ca
MIT License
6 stars 10 forks source link

Better UX when server is unresponsive #73

Open embeddedt opened 2 years ago

embeddedt commented 2 years ago

Describe the bug

Currently, the selected vote only changes on the frontend once the server has acknowledged the vote. This leads to bad UX if the server is slow.

Expected behavior

Ideally, there should be some sort of visual indication that the vote is being sent to the server, and if no acknowledgement is received after 10 seconds or so, an error should be displayed.

Additional context

This is particularly relevant until we are able to sort out the ongoing server load issues.

huonggiangbui commented 2 years ago

In case you want to work on this, feel free to assign yourself. If not, we will wait for someone interested to comment and we can assign the issue to them : )

embeddedt commented 2 years ago

In case you want to work on this, feel free to assign yourself.

Hmm, I don't think users can assign themselves to issues unless they're added as collaborators on a repository.

I would be willing to work on it later but at the moment I am looking into https://github.com/utmgdsc/PollVotingSystem/issues/68, could you assign me to that please?

huonggiangbui commented 2 years ago

sure, got it! if you want to work on any issue, just leave a comment and we will assign it to you!

huonggiangbui commented 2 years ago

I would be willing to work on it later but at the moment I am looking into #68, could you assign me to that please?

can you leave a comment there so I can assign it to you?

ggggg commented 2 years ago

Would this behaviour solve this issue: User clicks new vote -> overlay with a spinning wheel animation appears until the server responds -> if it errors just show an alert('Vote not received, please try again') message

huonggiangbui commented 2 years ago

that's correct ! maybe you can do a Alert/Snackbar with library for better UI : ) something like this https://mui.com/material-ui/react-snackbar/

ggggg commented 2 years ago

Alrighty, can you assign this issue to me?

huonggiangbui commented 2 years ago

Done! Good luck !! Feel free to ping us if you have any questions or want to discuss anything!

hiimchrislim commented 2 years ago

One thing to also note is, we also added in an additional feature to prevent students from spamming votes all the time. If you have more questions about it @shubhbapna can probably talk more about this