processing / p5.js-web-editor

The p5.js Editor is a website for creating p5.js sketches, with a focus on making coding accessible and inclusive for artists, designers, educators, beginners, and anyone else! You can create, share, or remix p5.js sketches without needing to download or configure anything.
https://editor.p5js.org
GNU Lesser General Public License v2.1
1.4k stars 1.35k forks source link

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

Closed ManasRanjanSahoo11 closed 1 month ago

ManasRanjanSahoo11 commented 1 month ago

πŸš€ 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:

πŸ” Technical Details:

πŸ“Š Expected Impact:

πŸ§ͺ 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.
welcome[bot] commented 1 month ago

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

release-com[bot] commented 1 month ago

Release Environments

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

:wrench:Environment Status : https://app.release.com/public/Processing%20Foundation/env-88d15b1663

raclim commented 1 month ago

Thank you for submitting this! After giving this a look, although this handles the debounce properly, there's a few issues and places for improvement here!

Since the debounce logic for the username and email fields are pretty similar, I think this could be refactored to have some consolidation there. There also seems to be a few linting and styling issues. For example, besides the ones caught by the linter, we'd also prefer to keep as much as the original file as possible, and would probably want to revert areas like line 150-151 for readability.

After doing some functional testing, there also seems to be inconsistent changes to the size of the input fields when a user tries to type into it. This might be due to the addition of the "Validating..." text underneath it, and might require some CSS changes there.

Due to some of the issues described I don't think we can merge this in at the moment. I'm going to close this for now, but please feel free to reopen this PR or create a new one with any additional changes!