supabase-community / auth-ui

Pre-built Auth UI for React
https://supabase.com/docs/guides/auth/auth-helpers/auth-ui
MIT License
487 stars 121 forks source link

Feature: UI loading state feedback #108

Closed giovanniRodighiero closed 1 year ago

giovanniRodighiero commented 1 year ago

What kind of change does this PR introduce?

Feature proposal for a small UI change in order to provide a visual feedback to the user while an action (login, registration ...) is performed. I would like to present the "loading state" to the end user by updating the submit button style and label.

What is the current behavior?

Right now nothing happens on the UI once the form is submitted and the end user might think that the app is not working properly.

What is the new behavior?

Once the form is submitted and the internal state is "loading", the button gets styled with less opacity and its label changes to something else more meaningful.

Screenshot 2023-02-06 alle 17 32 28

Additional context

I only implemented this change for the EmailAuth component (sign_in, sign_up views), but if you like the idea I'll do the other forms as well.