TecKnow / muster-tools

A package for assigning players to tables at multi-table, walk-in gaming events.
GNU General Public License v3.0
0 stars 0 forks source link

Add loading spinner to Chips for seats with moves in progress #12

Open TecKnow opened 3 years ago

TecKnow commented 3 years ago

https://github.com/TecKnow/muster-tools/blob/2398c7ba7a7d9d4090e22e2ab00a4d7c3da0e990/muster_client/src/features/players/SignIn.js#L45-L45

TecKnow commented 3 years ago

During development the server and client are hosted on the same machine so latency is low. In production latency will be higher and may be observable to the user. Right now, there's no way for the user to tell that a pending action might be reversed if the server fails to confirm it. This is most obvious when dragging player chips between tables. This can be fixed by changing the icon of Chips with moves that are in-progress.

Since the previous position of a Seat is only logged in the redux store if a move is in progress, it probably possible to make this change based on the values in the store alone. It shouldn't be necessary to do anything with the data from React Beautiful DND and may not be necessary to use Material UI styling functions at all.