Skip to content

feat: make due date optional in task creation#246

Closed
Vasist10 wants to merge 2 commits into
CCExtractor:mainfrom
Vasist10:main
Closed

feat: make due date optional in task creation#246
Vasist10 wants to merge 2 commits into
CCExtractor:mainfrom
Vasist10:main

Conversation

@Vasist10
Copy link
Copy Markdown
Contributor

@Vasist10 Vasist10 commented Dec 6, 2025

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

  • Ran npx prettier --write . (for formatting)
  • Ran gofmt -w . (for Go backend)
  • Ran npm test (for JS/TS testing)
  • Added unit tests, if applicable
  • Verified all tests pass
  • Updated documentation, if needed

Additional Notes

Screenshot 2025-12-06 001021 Screenshot 2025-12-06 001032

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 6, 2025

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:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

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!

@Vasist10 Vasist10 marked this pull request as draft December 6, 2025 06:16
@Vasist10 Vasist10 marked this pull request as ready for review December 6, 2025 06:30
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 6, 2025

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:

  • Check the "Files changed" tab
  • Leave comments on any lines for functions, comments, etc. that are important, non-obvious, or may need attention
  • Clarify decisions you made or areas you might be unsure about and/or any future updates being considered.
  • Finally, submit all the comments!

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!

@Vasist10
Copy link
Copy Markdown
Contributor Author

Vasist10 commented Dec 7, 2025

@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.
Screenshot 2025-12-05 231645

@its-me-abhishek
Copy link
Copy Markdown
Collaborator

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.

@Vasist10
Copy link
Copy Markdown
Contributor Author

Vasist10 commented Dec 8, 2025

closing this pr based on the feedback...will create a new pr with the required changes

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.

bug screen goes blank when user click on Add task button Make Due Date field optional

2 participants