After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 563748 - show today's, and overdue tasks in 'a different colour
show today's, and overdue tasks in 'a different colour
Status: RESOLVED FIXED
Product: Tasque
Classification: Other
Component: General
0.1.7
Other All
: Normal enhancement
: ---
Assigned To: tasque-maint
tasque-maint
Depends on:
Blocks:
 
 
Reported: 2008-12-08 18:58 UTC by arvind
Modified: 2009-09-19 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
show todays task in blue (411 bytes, patch)
2008-12-25 12:24 UTC, christoph.burgdorf
needs-work Details | Review
use custom color for todays tasks (1.33 KB, patch)
2008-12-26 15:08 UTC, christoph.burgdorf
none Details | Review
color for today tasks can now be set via prefs gui (4.71 KB, patch)
2008-12-27 20:32 UTC, christoph.burgdorf
none Details | Review
color for today tasks can now be set via prefs gui (4.43 KB, patch)
2008-12-28 12:30 UTC, christoph.burgdorf
none Details | Review
color for today tasks can now be set via prefs gui (4.94 KB, patch)
2008-12-28 22:51 UTC, christoph.burgdorf
needs-work Details | Review
color for today and overdue tasks can now be set via prefs gui (6.40 KB, patch)
2008-12-29 23:02 UTC, christoph.burgdorf
none Details | Review
color for today and overdue tasks can now be set via prefs gui (6.56 KB, patch)
2009-01-01 15:30 UTC, christoph.burgdorf
none Details | Review
Customise colours for today and overdue tasks (5.29 KB, patch)
2009-09-19 12:08 UTC, Steve George
none Details | Review

Description arvind 2008-12-08 18:58:02 UTC
currently, all tasks are rendered in the same text & group colour. i suggest rendering today's tasks and overdue tasks in different colours, to draw attention to them

Other information:
Comment 1 christoph.burgdorf 2008-12-25 12:24:14 UTC
Created attachment 125301 [details] [review]
show todays task in blue

This patch makes todays task will be displayed in blue
Comment 2 Sandy Armstrong 2008-12-25 15:12:51 UTC
Thanks for the patch Christoph; it is a good start.  Unfortunately we can't just hardcode colors in Tasque; if somebody used a theme with a blue background color this would render their tasks invisible.  ;-)

So we need to either derive a color from the theme, or if that doesn't work, add some stuff to the prefs to let the user modify these colors (maybe we could do both).
Comment 3 christoph.burgdorf 2008-12-25 22:01:12 UTC
yes, I already thought about adding it to the prefs. Unfortunately I haven't worked much with GTK so far, that's why its kinda challenging for me. But I find the project very interesting and the early stage maybe lowers the barrier to get in.
Comment 4 christoph.burgdorf 2008-12-26 15:08:38 UTC
Created attachment 125346 [details] [review]
use custom color for todays tasks

I now have put it into the prefs. It works so far that it creates a default value for the configuration XML file and uses this instead of the any hardcoded value. The color can be a HTML color code. I havent integrated it into the GUI so far. I guess I should use an color chooser widget for that. Should I place it on the general tab or should I create a new tab for it?
Comment 5 christoph.burgdorf 2008-12-27 20:32:11 UTC
Created attachment 125399 [details] [review]
color for today tasks can now be set via prefs gui

The color can now be set from the preferences dialog. The patch still has some edges. For example, I couldn't figure out how to include System.Drawings for rgb to hexadecimal conversion (got compiler warnings). Thats why my conversion looks a bit odd. I also couldn't figure out how to use the Catalog for translations...infact I couldn't find a class Catalog at all :-S
Comment 6 Sandy Armstrong 2008-12-27 20:44:12 UTC
Check out Utilities.ColorGetHex, added in r150:

http://svn.gnome.org/viewvc/tasque?view=revision&revision=150

Catalog is in Mono.Unix.

Will review your patch soon...
Comment 7 christoph.burgdorf 2008-12-28 12:30:24 UTC
Created attachment 125427 [details] [review]
color for today tasks can now be set via prefs gui 

I reworked the patch again. I think it's now ready for a review. I now use Utilities.ColorGetHex() and changed all the hardcoded labels so that they make use of the Catalog. One strange thing, sometimes the hexadecimal code differes a bit from the one that was choosen at the Dialog. I guess that must be a bug in Utilities.ColorGetHex() because it worked with the previous method.

I would like to make the overdue tasks also customizable (would like to have todays tasks blue and overdue tasks red) but I think it might be better to wait for your review on this patch.
Comment 8 christoph.burgdorf 2008-12-28 22:51:41 UTC
Created attachment 125451 [details] [review]
color for today tasks can now be set via prefs gui

Sorry, for the spam. Hopefully this will be the last draft. I know added a label for the textbox and set the ColorSelectionDialog to the current color when opened.
Comment 9 Sandy Armstrong 2008-12-29 18:22:00 UTC
Cool patch Christoph!  Some comments:

* There are whitespace issues, at least in OnbtnChangeTodaysTaskColorClicked.  Make sure to use tabs instead of spaces.  Also, capitalize the "b" there.
* Instead of "Todays Color" I would just put "Today".  The color stuff is implied by the heading of "Color Management".
* "Color Choose" should be "Choose Color", or maybe "Choose 'Today' Color"?  Either way, don't forget to wrap in Catalog.GetString.
* I would prefer to see the default color as "#0000FF" instead of "blue" (or whatever the hex value is).  Actually, it might be nice to have the default derive from the GTK+ theme?
* Please rename the preference TodaysTasksDefaultColor to TodayTaskTextColor; it is more accurate.
* Looking at the prefs, what do you think about making "Today" a button, instead of having a separate button?  That might be kind of slick.  Or maybe have a button filled with the selected color?  Need to look at other apps to see what they do...

Can you also add support for Overdue tasks?  Thanks!
Comment 10 christoph.burgdorf 2008-12-29 23:02:55 UTC
Created attachment 125493 [details] [review]
color for today and overdue tasks can now be set via prefs gui 

Hi Sandy,

thanks for the guidance, I really appreciate it. 

I over worked the patch following your suggestions. I figured out how to use the ColorButton. That makes the patch much smaller and fits better into the whole GNOME style. For example the gnome-panel configuration dialog uses that, too.

Im not sure if we could inherit the colors from the theme. For me, personally blue and red makes the most sense but I don't think we would be able to inherit these colors from my theme (at least I don't think so). I think it might be better to find good default colors. Or maybe keep the themes default text color and let the user change the colors on their own. But unfortunately that might hide this option for users who don't look around much. 

Up to the moment, the patch has two bugs. The future tasks are also shown in the overdue color and the alignment in the prefs gui is messed up. Will look at that tomorrow.
Comment 11 arvind 2008-12-30 00:07:03 UTC
might i suggest an alternative approach? 

what we want to accomplish is:

1. draw attention to tasks that need to be done today
2. draw attention to tasks that should already have been done

or

3. draw attention *away* from tasks that are to be completed in the future
4. draw attention *to* tasks that should already have been done

instead of picking default colours for the text, how about a combination of three approaches:

1. today's and upcoming tasks are in the default text colour for the theme
2. overdue tasks are in a. red (default?), or b. the 'select' or 'highlight' theme colours if the theme background is red
3. today's and overdue tasks have a highlighted background, derived from the theme; future tasks have the theme default background

i don't know what gnome human interface guidelines say about this, but if transparency can be used, yet another approach could be 

1. today's and upcoming tasks are in the default theme text colour
2. overdue tasks are in red (or the theme 'select'/'highlight' colour)
3. future tasks are partially transparent

this stops us from relying on the text colour to do everything. further, if constant transparency is an issue, we can remove transparency on mouse-over. 

these approaches become especially interesting if tasks are also grouped into 'overdue', 'today', 'this week' and 'later' groups - which then allows to set group-level colour properties... (RTM already has these groupings on their gmail widget, is that somethiing that can be pulled from the API?)
Comment 12 christoph.burgdorf 2009-01-01 15:30:44 UTC
Created attachment 125596 [details] [review]
color for today and overdue tasks can now be set via prefs gui 

I will play around with it to see how a highlighted background look. I especially like the idea of having future tasks partially transparent to draw the attention away from those. However it won't work if someone uses white as text color (e.g for dark themes).

Well, but at first I would like to finish my previous approach though. I fixed the alignment issues so that the preference dialog looks just fine now. But I still haven't figured out why the future tasks are also handled like the overdue tasks,

somehow:

task.DueDate.Date < DateTime.Today

seems to be also true for future task. Is that because some future tasks might have no due date at all (which means DueDate will be 01.01.0001)?

But how could I workaround it?

Btw, Happy New Year everyone ;-)

Christoph
Comment 13 arvind 2009-01-01 18:09:19 UTC
> having future tasks partially transparent to draw
> the attention away from those. However it won't work if someone uses white as
> text color (e.g for dark themes).

er... transparency simply decreases distinguishability from the colour below - it will work whatever the colours are to begin with, no?


> somehow:
>
> task.DueDate.Date < DateTime.Today
>
> seems to be also true for future task. Is that because some future tasks might
> have no due date at all (which means DueDate will be 01.01.0001)?

i believe RTM supports tasks without a due date (they turn up in the group 'any time'). so if these tasks have some special value, that's probably why they might fall under the condition you talk about...
Comment 14 christoph.burgdorf 2009-01-01 18:23:34 UTC
> er... transparency simply decreases distinguishability from the colour below -
> it will work whatever the colours are to begin with, no?


Ah, yes. Sure, you are right. I forgot that if you have white text, you will have it on a dark layer and surely you will see the effect of the transparency then. My fault... 
Comment 15 Steve George 2009-09-19 12:08:36 UTC
Created attachment 143492 [details] [review]
Customise colours for today and overdue tasks

This is Christoph Burgdorf patch with one line changed.  It:
  1. highlights overdue tasks (Red)
  2. highlights todays tasks (Blue)
  3. Does not highlight tasks where no date is set
     Tasks that have "no date" set on them default to epoch. 
     So this patch makes ensures we don't highlight "no date" tasks as overdue.

Tested with the latest git, on Ubuntu 9.04.  With the following backends:

Local file: Overdue, Today, No date - all work
RememberTheMilk: Overdue, Today, No date - all work
EDS: Overdue, Today, No date - all work
Comment 16 Sandy Armstrong 2009-09-19 13:49:37 UTC
Steve, will look into this in a minute, but for the future make sure to check out these instructions for (among other things) creating patches with git:

http://live.gnome.org/Git/Developers

If you commit locally and use `git format-patch`, then I can apply the patch and push with a very simple command, without having to write author info or a commit message.  If you prefer not to commit locally, `git diff` is still preferred to using straight `diff`.

Thanks for all your help!
Comment 17 Sandy Armstrong 2009-09-19 14:05:01 UTC
Outstanding issues:

* Future tasks are colored red
* If you show completed tasks, those are also colored red...a light grey might work better there

Looking at fixing these.

Of course, this whole feature ignores theming issue, which can be addressed in another bug or this one.
Comment 18 Sandy Armstrong 2009-09-19 14:51:10 UTC
Okay, fixed and pushed with a few changes from me.

But I realize the main reason *all* Future tasks were being colored Red: there is a bug (I need to file) that causes all tasks in the Future category to take on the same foreground color at certain times.