Skip to content

Allow for setting due dates on tasks - #69

Open
JordanAdams wants to merge 13 commits into
klaudiosinani:masterfrom
JordanAdams:due-dates
Open

Allow for setting due dates on tasks#69
JordanAdams wants to merge 13 commits into
klaudiosinani:masterfrom
JordanAdams:due-dates

Conversation

@JordanAdams

@JordanAdams JordanAdams commented Aug 8, 2018

Copy link
Copy Markdown

Implements #67

Description

Adds a new due: tag to task creation allowing users to specify a due date for the task.

Other Features/Ideas

  • $tb --due @1 6d for updating the due date.
  • $tb -f overdue|today|tomorrow for finding tasks based on due date.
  • Apply medium priority styling to tasks due this week and and high priority styling for tomorrow.
  • Add special date/time definitions for "tomorrow" and "next-week"

Screenshots

Due Date Assignment

image

Colour-Coding

image

@ashinzekene

Copy link
Copy Markdown
Contributor

Cool! What happens when a task is overdue?

@JordanAdams

Copy link
Copy Markdown
Author

@ashinzekene Currently there's no logic to handle due dates in the past. However I would imagine the right option here is that we show something like (Due: 2 days ago) or (Due: yesterday). I'll put a fix in the add "ago" for dates in the past :)

@colingm

colingm commented Aug 10, 2018

Copy link
Copy Markdown

I feel like a due date has some idea of a priority, would it make sense to color things with a due date or to color things that are past due?

@JordanAdams

Copy link
Copy Markdown
Author

@colingm Totally! I mentioned this above in the PR body :)

Apply medium priority styling to tasks due this week and and high priority styling for tomorrow.

The high priority styling should probably extend to overdue tasks too 👍

@colingm

colingm commented Aug 10, 2018

Copy link
Copy Markdown

@JordanAdams haha whoops awesome. Yeah overdue would be good. Nice work!

@rjoydip-zz

Copy link
Copy Markdown

Nice work 👍

@kalexmills

Copy link
Copy Markdown

May need integrating with #52, which adds an --after flag based on issue creation time. Would be nice to have similar filters based on due date also?

@JordanAdams

Copy link
Copy Markdown
Author

@kalexmills The discussion around moment vs date-fns in there is interesting. I'll migrate this PR to date-fns off the back of that. The only thing we lose in doing so is .fromNow which provides the nice "in 3 days" formatting. However I've been looking at format.js as a possible alternative :)

I'll also add having a --due to the list :)

@rjoydip-zz

Copy link
Copy Markdown

@JordanAdams Are you talking about https://github.com/yahoo/intl-relativeformat

@JordanAdams

Copy link
Copy Markdown
Author

@rjoydip That's the one :)

Comment thread lib/taskbook.js
return data;
}

_filterOverdue(data) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think we could do this date computation natively then why needs an external module.?

Comment thread lib/taskbook.js
return data;
}

_filterToday(data) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

For me it's a case of the clarity gained. Under the hood, date-fns is doing very simple date manipulations using the native Date type. I'm not sure why we'd ditch a well tested library in favour of just doing the same implementation within Taskbook?

Comment thread lib/taskbook.js
return data;
}

_filterTomorrow(data) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@pannet1

pannet1 commented Aug 26, 2019

Copy link
Copy Markdown

great addition

is it possible to make a task recurring?

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.

6 participants