🎨 Palette: Add async loading states to authentication forms#165
🎨 Palette: Add async loading states to authentication forms#165singhaditya21 wants to merge 1 commit into
Conversation
- Adds "⏳ Loading..." text, disabled state, and `aria-busy` to login, register, and Google sign-in buttons during async API calls. - Ensures state is reliably restored in `finally` blocks, gracefully handling potential API errors. - Modifies `handleGoogleSignIn` to correctly process the simulated async delay as an awaitable Promise instead of a floating `setTimeout`. - Improves accessibility and prevents duplicate submissions. Co-authored-by: singhaditya21 <53948039+singhaditya21@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What
Added proper loading states (disabled, text change to "⏳ Loading...", and
aria-busy="true") to the authentication form buttons (Login, Register, and Google Sign-in) while they wait for asynchronous API calls to complete.🎯 Why
Users were experiencing a lack of visual feedback during the mock API delay when signing in or registering. This caused confusion and allowed for potential double-submissions if users clicked the buttons multiple times before the async request finished.
📸 Before/After
aria-busy="true". The original state is reliably restored whether the request succeeds or fails.♿ Accessibility
Added
aria-busy="true"dynamically to the buttons during the loading state, informing screen readers that the element is currently processing an action and the user should wait.PR created automatically by Jules for task 11746497168856005904 started by @singhaditya21