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

Implement debounced validation for username and email fields βœ… #3240

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ManasRanjanSahoo11
Copy link

πŸš€ Adding SignupForm with Smart Debounced Validation!

🎯 What's New?

I am adding debounced user-friendly validation for usernames and email addresses. Say goodbye to unnecessary API calls and hello to a smoother, more responsive user experience!

✨ Key Improvements:

  • πŸ• Smart Timing: Validation kicks in after 300ms of user inactivity, reducing server load and improving responsiveness.
  • πŸ”„ Instant Reset: The timer resets with each keystroke, ensuring accurate validation of the final input.
  • πŸ‘€ Visual Feedback: Users now see a "Validating..." indicator, keeping them informed of behind-the-scenes action.
  • πŸ›  Custom Hook Magic: Introducing our sleek useDebounce hook for efficient state management.
  • 🧹 Cleaner Dependencies: Removed lodash for a leaner, meaner codebase.

πŸ” Technical Details:

  • Implemented a custom useDebounce hook to manage validation timing.
  • Updated validateUsername and validateEmail functions to leverage debounced logic.
  • A Promise-based structure was added to handle asynchronous validation smoothly.

πŸ“Š Expected Impact:

  • Significantly reduced the number of API calls during form completion.
  • Enhanced user experience with responsive and intuitive validation feedback.
  • Improved overall performance and efficiency of the signup process.

πŸ§ͺ Testing Notes:

Please verify the following scenarios:

  1. Rapid typing in username/email fields should not trigger immediate validation.
  2. Validation should occur 300ms after stopping typing.
  3. "Validating..." indicator should appear and disappear appropriately.
  4. Existing validation error messages should still display correctly.

Copy link

welcome bot commented Sep 21, 2024

πŸŽ‰ Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

Copy link

release-com bot commented Sep 21, 2024

Release Environments

This Environment is provided by Release, learn more!
To see the status of the Environment click on Environment Status below.

πŸ”§Environment Status : https://app.release.com/public/Processing%20Foundation/env-88d15b1663

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant