Skip to content
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 debounced keyup validation to registration inputs, and loading behavior to submit button #9511

Closed
Tracked by #9315
rebecca-shoptaw opened this issue Jul 1, 2024 · 0 comments · Fixed by #9512
Closed
Tracked by #9315
Assignees
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 3 Issues that we can consider at our leisure. [managed] registration Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed]

Comments

@rebecca-shoptaw
Copy link
Collaborator

rebecca-shoptaw commented Jul 1, 2024

Dependency to epic #7694. Sub-task of #9315.

Problem

A couple more planned UX tweaks to further improve the registration form on two fronts:

  1. The form can take a little while to submit depending on internet connection and we definitely don't want to allow double-submits, so we'll need a disable/loading indicator for the submit button
  2. When a user has an invalid input they may expect the error message to disappear as soon as the input is fixed, and may be confused when it doesn't, so we could use a (debounced) on-keyup call to the validation functions just for invalid inputs

Expected behavior / screenshots

  • When the form is submitted, the submit button is disabled and the text replaced with Loading... while the on-submit checks run
  • When a user makes changes to an empty or already-valid input, the validation only happens on click away (blur)
  • When a user makes changes to an already-invalid input, the validation happens on key up

Proposal & Constraints

What is the proposed solution / implementation?

  1. Use jQuery in realtime_account_validation.js to simply disable and modify the text of the Submit button using the same approach as Disable cover upload submit button while uploading #8754.
  2. Use debounce and a keyup listener to each invalid input in realtime_account_validation.js

Leads

Related files

realtime_account_validation.js

Stakeholders

@mekarpeles @cdrini


Instructions for Contributors

  • Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.
@rebecca-shoptaw rebecca-shoptaw added Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Needs: Lead labels Jul 1, 2024
@rebecca-shoptaw rebecca-shoptaw added registration Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed] labels Jul 1, 2024
@mekarpeles mekarpeles added Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] and removed Needs: Lead labels Jul 1, 2024
@rebecca-shoptaw rebecca-shoptaw self-assigned this Jul 1, 2024
@mekarpeles mekarpeles added Priority: 3 Issues that we can consider at our leisure. [managed] and removed Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] labels Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 3 Issues that we can consider at our leisure. [managed] registration Type: Feature Request Issue describes a feature or enhancement we'd like to implement. [managed] Type: Subtask of Epic A subtask that is part of the work breakdown of an epic issue (see comments). [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants