feat: make due date optional in task creation#246
Conversation
|
Thank you for opening this PR! Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools. Please take a moment to:
This helps make the review process smoother and gives us a clearer understanding of your thought process. Once you've added your self-review, we'll continue from our side. Thank you! |
|
Thank you for opening this PR! Before a maintainer takes a look, it would be really helpful if you could walk through your changes using GitHub's review tools. Please take a moment to:
This helps make the review process smoother and gives us a clearer understanding of your thought process. Once you've added your self-review, we'll continue from our side. Thank you! |
|
@its-me-abhishek I initially considered using a checkbox for enabling the due date, but later decided that using a switch would be better for user exp. |
|
A checkbox or button seems to be unnecessary for this. We can just make the field optional on backend and remove the error toast from frontend, and it would be good to go. |
|
closing this pr based on the feedback...will create a new pr with the required changes |

Description
This PR introduces a new "Due Date" toggle switch in the Add Task dialog, replacing the previously required date field.
When the switch is turned off, tasks can be created without a due date.
When turned on, the date picker becomes visible, allowing users to select a due date.
Changes:
Added Radix Switch component for controlling the visibility of the Due Date input.
Updated task creation logic to treat due date as optional.
Updated UI layout to align switch and date picker.
Adjusted backend AddTaskToTaskwarrior to support empty due values.
Added unit tests for switch behavior and task submission.
Fixes: Make Due Date field optional #241
also fixes bug screen goes blank when user click on Add task button #250 --> this happend due to the select item was empty ....replaced it with '_ create_'
Checklist
npx prettier --write .(for formatting)gofmt -w .(for Go backend)npm test(for JS/TS testing)Additional Notes