Enhancement: Validate form to prevent users from selecting invalid sprint dates or not selecting a template.
#231 opened on May 4, 2022
Repository metrics
- Stars
- (35 stars)
- PR merge metrics
- (PR metrics pending)
Description
Description
Currently the Sprint Creation feature allows sprints to be created for any date, including dates in the past. Let's add some form validation/date restriction so that sprints can't be created too far in the past or too far in the future. The earliest sprint date and latest sprint date ranges should be set as consts so that we can easily change them during development to manually test various scenarios. (For example, if I wanted to test a pagination feature, I could temporarily set the start and end of the range to infinity to allow myself to create oodles of sprints in my test account.)
Suggested Enhancements
- Users should not be able to create sprints that start in the past. The dates should not be able to be selected.
- Users should not be able to create sprints that start more than 90 days in the future. The dates should not be able to be selected.
- The create button should not be enabled/clickable until a user has selected a valid date AND selected a sprint template. If they select a template but have not yet selected a date, display a prompt below the create button asking the user to select a date in order to create the sprint. If they select a date but have not yet selected a template, display a prompt below the create button asking the user to select a date in order to create the sprint.
- Optional: if the user creates a sprint with no competitors, display a modal letting them know that they have not selected any competitors, and give them the option of going forward (creating the sprint) or going back (returning to the form.)
- Optional: add a tooltip to the dates that can't be selected, indicating why they cannot be selected OR add a note on the page explaining the range of available dates.
- Optional: complete initial conversion of file to TypeScript