Add input validation and clearly communicate the length requirement for the reason field
Replace the length slider and switch to a date picker to improve UX
Add red asterisks to upload-submission-modal as a quick fix to indicate mandatory fields
Notes
Date picker range logic:
Start date is tomorrow of target date if not overdue, or tomorrow of current day if overdue.
End date is always the due date (due_date on the backend, the hard deadline).
The component calculates the number of weeks and rounds it up before sending the request to maintain compatibility with the current backend logic. The extension granularity refactor (weeks -> days) will be rebased on top of this.
Screenshots
Reason not provided:
Reason not long enough:
The current target date (displayed as due date on the frontend) is 14 May, available range starts at 15 May:
The due date (hard deadline) is 18 May, so the extension can only be selected up to that day:
Overdue task, target date is 2 Apr, starting date in the date picker is the next day after today (1 May), since it doesn't make sense to request extensions to a past date:
List of changes
upload-submission-modal
as a quick fix to indicate mandatory fieldsNotes
Date picker range logic:
due_date
on the backend, the hard deadline).Screenshots
Reason not provided:
Reason not long enough:
The current target date (displayed as due date on the frontend) is 14 May, available range starts at 15 May:
The due date (hard deadline) is 18 May, so the extension can only be selected up to that day:
Overdue task, target date is 2 Apr, starting date in the date picker is the next day after today (1 May), since it doesn't make sense to request extensions to a past date: