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

Discarded Loading Without Input and Added an Alert for Missing Data #143

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sakina1303
Copy link

@sakina1303 sakina1303 commented Jan 13, 2025

This pull request addresses the issue #142 .

Changes Implemented:

Input Validation:

-Added a check to ensure at least one input (text, file, or URL) is provided before proceeding.

Alert Message:

-Displays a concise and professional alert: "Please provide input (text, file, or URL) to generate your quiz."

Prevent Loading:

-Blocked the loading spinner from displaying unless the input validation passes.

Code Refactor:

-Updated the handleSaveToLocalStorage function to include validation logic for input fields.

Benefits:

-Improved User Experience: Guides the user to provide input, reducing confusion.

-Backend Optimization: Prevents empty requests, saving server resources.

-Error Prevention: Ensures meaningful data is sent to the backend.

-Professional Feedback: Aligns application behavior with standard UI/UX practices.

Testing:

  • Manual tests conducted to verify:

  1. Alert displays when no input is provided.
  2. Loading does not proceed without input.
  3. Normal functionality works seamlessly when input is valid.

Before changes:

Screenshot 2025-01-13 at 7 25 58 PM

After changes:

Screenshot 2025-01-13 at 7 24 07 PM

Fixes #142

@sakina1303
Copy link
Author

Hi Sir's @Roaster05 @Aditya062003 ,

Awaiting your reviews and let me know if further improvement needed .
Thanks !

@Aditya062003
Copy link
Contributor

Hey, pls mimic these changes in the extension too

@sakina1303
Copy link
Author

Hey, pls mimic these changes in the extension too

for sure sir! thank you.

@sakina1303
Copy link
Author

sakina1303 commented Jan 24, 2025

Hey, pls mimic these changes in the extension too

Hi Sir @Aditya062003 , I've implemented the required changes in the extension as well.

Before :

Screenshot 2025-01-24 at 4 58 02 PM

After:

Screenshot 2025-01-24 at 4 58 29 PM

Please check it out.

Thanks!

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.

Prevent Loading Without Input and Add Alert for Missing Data
2 participants