Add loading overlay to sign-in page during login#110
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
There was a problem hiding this comment.
@copilot this is the incorrect loading state to account for. The loading state needs to come after the dispatch dispatch(loginWithProvider({ oauthProvider, userCredential }));. There needs to be a way for this component to communicate with the store to display a loading state before the page will naturally navigate automatically (on success) or display an error (on failure)
There was a problem hiding this comment.
Fixed in 8bc161c. The setIsOAuthLoading(false) call before dispatch(loginWithProvider(...)) has been removed, so the overlay now persists through the entire saga execution (getUserFromSession, retrieveUserInformation, loginSuccess). The component clears isOAuthLoading via a new useEffect that watches emailLoginError — this fires when the saga fails and dispatches loginFail. On the happy path the overlay simply stays visible until loginSuccess triggers navigation away from the page.
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/MobilityData/mobilitydatabase-web/sessions/34ee6340-1784-42b7-9c5b-b1d4d4113e00 Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MobilityData/mobilitydatabase-web/sessions/b4256bb5-f74f-4082-9899-f38339538c9a Co-authored-by: Alessandro100 <18631060+Alessandro100@users.noreply.github.com>
8bc161c to
b8d4475
Compare
|
*Lighthouse ran on https://mobilitydatabase-amt50sl1f-mobility-data.vercel.app/ * (Desktop)
*Lighthouse ran on https://mobilitydatabase-amt50sl1f-mobility-data.vercel.app/feeds * (Desktop)
*Lighthouse ran on https://mobilitydatabase-amt50sl1f-mobility-data.vercel.app/feeds/gtfs/mdb-2126 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-amt50sl1f-mobility-data.vercel.app/feeds/gtfs_rt/mdb-2585 * (Desktop)
*Lighthouse ran on https://mobilitydatabase-amt50sl1f-mobility-data.vercel.app/feeds/gbfs/gbfs-flamingo_porirua * (Desktop)
|
Alessandro100
left a comment
There was a problem hiding this comment.
tested with preview link and locally with email and firebase auth, works great
No visual feedback was shown between login submission and account page redirect, leaving users uncertain whether the action was processing.
closes #106
Changes
Backdrop+CircularProgressoverlay renders over the full page while login is in progress; useszIndex: theme.zIndex.drawer + 1to sit above all contentisLoading:userProfileStatus === 'login_in'— covers email/password flow (already set by theloginaction)isOAuthLoadingstate — covers Google/GitHub/Apple OAuth flows wheresignInWithPopupis async and not reflected in Redux until after the popup resolvesisOAuthLoadingis cleared on all three promise exit paths (no-email error, dispatch success, catch) to prevent a stuck spinneraria-label="Signing in..."added toCircularProgressfor screen reader accessibilityWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
download.cypress.io/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node index.js --exec install(dns block)/opt/hostedtoolcache/node/24.14.1/x64/bin/node /opt/hostedtoolcache/node/24.14.1/x64/bin/node dist/index.js --exec install(dns block)If you need me to access, download, or install something from one of these locations, you can either: