Skip to content

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

Open
sakina1303 wants to merge 5 commits intoAOSSIE-Org:mainfrom
sakina1303:loaderissue
Open

Discarded Loading Without Input and Added an Alert for Missing Data#143
sakina1303 wants to merge 5 commits intoAOSSIE-Org:mainfrom
sakina1303:loaderissue

Conversation

@sakina1303
Copy link
Contributor

@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
Contributor 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
Contributor Author

Hey, pls mimic these changes in the extension too

for sure sir! thank you.

@sakina1303
Copy link
Contributor 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!

@sakina1303
Copy link
Contributor Author

@Aditya062003 sir I've done the necessary changes in extension as well as you mentioned. please check it out. thanks!

@Aditya062003
Copy link
Contributor

Great! Could you just revert the changes for package-lock.json, seems unnecessary. Otherwise, looks good to go!

@sakina1303
Copy link
Contributor Author

Great! Could you just revert the changes for package-lock.json, seems unnecessary. Otherwise, looks good to go!

sure sir, i'm updating it.

@sakina1303
Copy link
Contributor Author

Hey @Aditya062003 sir, I've reverted the changes for package-lock.json, 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