Repository navigation
Show a loading state on the login page while logging in - #1816
Merged
Merged
Conversation
While a login runs, the login button shows a spinner with 正在登录… in each platform's own style (SwiftUI ProgressView in the filled button, a small M3 circular indicator, a tiny Fluent spinner as the button's icon), and the fields, the graduate switch and the other buttons are disabled, so nothing changes the login under a request in flight. ContainedButton gains a `loading` prop and LoginFields a `disabled` one. The @expo/ui Button test stand-in now lets content replace the label, as the real view does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A disabled SwiftUI field and a Fluent field's label look the same as enabled ones, and the graduate switch's label isn't part of the switch, so the page didn't show that they were locked. The iOS fields' text, the Fluent field labels and the graduate label now take the disabled color, and the iOS spinner takes the disabled label's color instead of the accent. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Rui · project thread
While a login runs, the login page only disabled its Log In button: the fields, the graduate switch and the other buttons stayed live, and nothing showed that anything was happening.
Now, while logging in:
ProgressViewbefore the label inside the filled button, in the disabled label's color (left alone it would take the accent).CircularProgressIndicator(18 dp, the size of a button icon) in the disabled content color, before the label.Spinneras the button's icon.ContainedButtongains aloadingprop andLoginFieldsadisabledone. The@expo/uiButtontest stand-in now lets content replace the label, as the real view does.Testing
loggingIn. Full suite, typecheck, lint and format pass.