-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add spinner to the Application Form terms page upon submit #1225
Conversation
* Refactor the loading overlay to use the icons SVG * Use CSS animation for spinner * Equalize the spinner icon across three packages
Deploy preview for clever-edison-cd22c1 ready! Built with commit 0508f96 https://deploy-preview-1225--clever-edison-cd22c1.netlify.app |
The spinner refactor looks great! I'm a little bit unclear about which part of these changes prevents the user from clicking the button more than once and spamming the submit function. From what I can tell a single click starts the spinner but doesn't prevent multiple submits? Definitely could be missing something but I think we need a (if not submitting already) at the top of onSubmit? Update: Found it! It was hidden within Button :) |
@dominikx96 Let me know if this looks good to you, then I can merge. Thanks! |
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.
@jaredcwhite LGTM! 👍
<circle cx="50" cy="50" fill="none" stroke="currentColor" stroke-width="9" r="32" stroke-dasharray="150.79644737231007 52.26548245743669"> | ||
<animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 50 50;360 50 50" keyTimes="0;1"></animateTransform> | ||
</circle> | ||
<circle cx="50" cy="50" fill="none" stroke="currentColor" stroke-width="9" r="32" stroke-dasharray="150.79644737231007 52.26548245743669"></circle> |
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.
Probably conflict with: #1230
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.
Good point, I'll suggest a change to 1230 to incorporate this.
Issue
Addresses #1193
Description
The submit button on the Terms page for the Application was allowing multiple clicks before the form was submitted. This PR uses the "loading" state of the button component to provide visual feedback as well as preventing additional clicks.
In addition, I:
Type of change
How Can This Be Tested/Reviewed?
I manually tested the Terms page of the Application Form, and wrote an example in Storybook for
LoadingOverlay
andButton
with the loading state.Checklist: