-
-
Notifications
You must be signed in to change notification settings - Fork 832
Show spinner whilst processing recaptcha response #767
Conversation
The fact that we showed no feedback whilst submitting the captcha response was causing confusion on slower connections where this took a nontrivial amount of time. Takes a new flag from the js-sdk that indicates whether the request being made is a background request, presenting a spinner appropriately. Requires matrix-org/matrix-js-sdk#396
this.setState({ | ||
busy: true, | ||
busy: !background, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, I'm not quite grokking this. why do we only set busy
if not background
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this was a bit silly (and buggy). I've updated it so it doesn't set the state at all for background requests, and commented it.
errorText: null, | ||
stageErrorText: null, | ||
}); | ||
// only set the busy flag if this is a non-background request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, I'm still not grokking it. A comment that says "do X" doesn't help me understand why X is the right thing to do :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. up to you if you want to rearrange it a bit as discussed irl
This makes the code a bit neater.
loglevel should be a normal dependency
The fact that we showed no feedback whilst submitting the captcha
response was causing confusion on slower connections where this
took a nontrivial amount of time.
Takes a new flag from the js-sdk that indicates whether the
request being made is a background request, presenting a spinner
appropriately.
Requires matrix-org/matrix-js-sdk#396