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

Color Relative due date based on remaining Time #299

Open
BioBox opened this issue Sep 3, 2022 · 2 comments · May be fixed by #300
Open

Color Relative due date based on remaining Time #299

BioBox opened this issue Sep 3, 2022 · 2 comments · May be fixed by #300

Comments

@BioBox
Copy link
Contributor

BioBox commented Sep 3, 2022

I want the relative due date (%D) to be

  • Colored red when I have less than 24 hours.
  • Colored yellow when I have less than 72 hours.
  • Colored green when I have more than that.

Or something like that. At the very least I want it to be highlighted in some way so that I can easily distinguish it from the text of the todo item in question.

Unlike most people I actually look through the code to see how my desired feature would be implemented, and it's not quite trivial. All the coloring is put into the last filter for a reason, and I'm not sure if having it in the parser will mess up a step inbetween. However it seems like parsing is the second-to-last filter used anyways, so I don't forsee there being much of a problem.

Anyways, I'm not 100% sure, so I wanted to bring it up here to see your thoughts on the matter. BTW thanks for making the best todo application!

@davesteele
Copy link
Contributor

I'm not the original author, and haven't reviewed this code for this change, so I don't have anything technical to add right now.

If you'd like to work on this, I promise to at least review any PRs promptly.

@BioBox
Copy link
Contributor Author

BioBox commented Sep 7, 2022

Looking through the code a bit more, the parser will call functions that create and return a new string that won't have the coloring info, so using regular expressions to match humized dates is the best option. I'll whip up a pull request in a few weeks.

@BioBox BioBox linked a pull request Sep 10, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants