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

Fix Email Input Type and Improve Error Messaging on Signup and Login Pages #180

Closed
wants to merge 1 commit into from

Conversation

Aniket-2504
Copy link

Description:
fixes #129

This pull request addresses the issues described in issue #129 regarding the email input type and error messaging on the signup and login pages.

Changes Made:

  1. Email Input Type Defined:

    • Updated the email input fields on both the signup and login pages to have the type "email". This ensures that the browser performs proper validation for email formats, preventing invalid emails from being entered.
  2. Improved Error Messaging:

    • Replaced the small red text error messages with beautiful and user-friendly toast messages using react-toastify. This enhancement provides a better user experience by clearly indicating errors and successful actions in a more visually appealing way.

Implementation Details:

  • Error Messaging:
    • Integrated react-toastify to display toast messages for various scenarios:
      • Displaying error messages when required fields are empty.
      • Showing error messages for password mismatch.
      • Indicating successful signup with a toast message.
    • Included the ToastContainer component in the respective components to ensure that the toasts are rendered.

Testing:

  • Verified that invalid email formats are now rejected by the browser.
  • Checked that toast messages are displayed for the following cases:
    • Empty email, username, or password fields.
    • Passwords do not match.
    • Successful signup or login.

Screenshots:

Screenshot 2024-06-14 175026
Screenshot 2024-06-14 175005
Screenshot 2024-06-14 174948

Conclusion:

These changes enhance the form validation and user feedback on the signup and login pages, providing a smoother and more intuitive user experience. I look forward to feedback and am confident that this fix will improve the overall usability of the application.


Please let me know if there are any additional changes or details needed.

Fix Email Input Type and Improve Error Messaging on Signup and Login Pages
Copy link

vercel bot commented Jun 14, 2024

@Aniket-2504 is attempting to deploy a commit to the Alogovengers' projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, @Aniket-2504! 🎉 Thank you for your contribution and efforts to enhance Hairify.

We will review your changes soon and provide feedback.

Please ensure that you have followed the contributing guidelines for a smooth review process.

@@ -29,21 +31,21 @@ function SignupInner() {
const [Signingup, setSigningUp] = useState<boolean>(false);

const handleSignup = async (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
e.preventDefault();
// e.preventDefault();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific reason for this?

@Aniket-2504
Copy link
Author

I removed e.preventDefault(); because it was handling the required error, which prevented the browser from showing it to the user. Now, the browser handles the required error now its shows properly you can see it in screenshots,

@Aniket-2504
Copy link
Author

Thank you bro for giving me this opportunity.

@Aniket-2504
Copy link
Author

hello bro is everything all right ?

Copy link

vercel bot commented Jul 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hairify ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 4, 2024 8:48am

@afeefuddin
Copy link
Collaborator

The toast is looking pretty weird as per the design, can we just show the message there instead of showing the toast.

@Aniket-2504
Copy link
Author

can i change the position of toast or show the message only ?

@afeefuddin
Copy link
Collaborator

Please show messages only!

@Aniket-2504
Copy link
Author

ok bro thanks , ill work on it

@Aniket-2504 Aniket-2504 closed this by deleting the head repository Sep 25, 2024
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.

Bug: Email Input Type and Error Messaging on Signup and Login Pages , i can add beautiful toast message
2 participants