AOSSIE-Org / AOSSIE-Org/EduAid

Prevent Loading Without Input and Add Alert for Missing Data

Đang mở
#142 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
171
Fork
425
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

# Description:

## Current Behavior:

The ***"Next"*** button initiates the loading process even when no input (text, file, or URL) is provided.

## Expected Behavior:

The ***"Next"*** button should validate the input fields and:
1. Display an alert if no input is provided.
2. Prevent the loading process from starting until valid input is given.

## Proposed Solution:

1. Add a validation check to ensure input is provided in one of the fields (text, file, or URL).
2. Display a concise alert: "Please provide input (text, file, or URL) to generate your quiz."
Stop execution and prevent loading if validation fails.

## Pros of the Fix:

1. Improves User Experience:

-Prevents confusion by guiding the user to provide necessary input.

2. Enhances Validation:

-Reduces unnecessary backend requests, optimizing system performance.

3. Error Prevention:

-Eliminates the risk of sending empty data to the backend.

4. Professional Workflow:

-Aligns the application behavior with expected user interaction patterns.

5. Efficiency:

-Saves user time by clearly communicating the issue upfront.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.