u-wave / web

Web client for üWave, the self-hosted collaborative listening platform.
https://demo.u-wave.net
MIT License
68 stars 15 forks source link

Use material-ui v5 LoadingButton #1658

Open goto-bus-stop opened 4 years ago

goto-bus-stop commented 4 years ago

For after https://github.com/u-wave/web/pull/1287

We have a couple of places where we manually stick a CircularProgress in a Button when we're waiting for an HTTP request to finish. material-ui v5 has a LoadingButton component, which takes a pending prop for this purpose. It looks a bit better and it can also keep showing the button text while the operation is in progress.

These are the ones I found:

https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/ConfirmDialog/index.js#L87-L89

https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/LoginDialog/LoginForm.js#L98-L107

https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/LoginDialog/SocialForm.js#L142-L149

https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/PromptDialog/index.js#L129-L131

https://github.com/u-wave/web/blob/1f15e25d8258068e64b041c95fd8918af7ed7718/src/components/Dialogs/LoginDialog/RegisterForm.js#L171-L178

Ananyatiwari19 commented 1 month ago

If no one has taken up this issue, I would like to pick it up