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

Extension modal refactor #837

Merged

Conversation

ublefo
Copy link
Contributor

@ublefo ublefo commented May 1, 2024

List of changes

  • 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:
image

Reason not long enough:
image

The current target date (displayed as due date on the frontend) is 14 May, available range starts at 15 May:
image

The due date (hard deadline) is 18 May, so the extension can only be selected up to that day:
image

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:
image

Copy link
Member

@jakerenzella jakerenzella left a comment

Choose a reason for hiding this comment

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

Will do a test when it's all merged with the day changes

@ublefo ublefo force-pushed the extension-request-refactor branch from 4b6f81e to a89c9bb Compare May 2, 2024 16:16
@jakerenzella jakerenzella merged commit c539d88 into doubtfire-lms:development May 5, 2024
1 check failed
@ublefo ublefo deleted the extension-request-refactor branch May 5, 2024 09:56
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.

None yet

2 participants