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 755946 - Provide e better way to highlight current day in the general view
Provide e better way to highlight current day in the general view
Status: RESOLVED FIXED
Product: gnome-calendar
Classification: Applications
Component: User Interface
3.21.x
Other Linux
: Normal enhancement
: 3.26
Assigned To: GNOME Calendar maintainers
GNOME Calendar maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-01 15:19 UTC by Martin Cigorraga
Modified: 2017-04-17 18:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
better way to highlight current day in month view (20.57 KB, image/png)
2016-08-09 15:00 UTC, nj4710
  Details
In the commit we provide a better way to highlight the current date. (1.99 KB, patch)
2016-08-09 18:57 UTC, nj4710
needs-work Details | Review
month-view: highlight the whole cell of current day (1.02 KB, patch)
2016-08-10 11:11 UTC, nj4710
none Details | Review
month-view: highlight the whole cell of current day (2.26 KB, patch)
2016-08-11 13:35 UTC, nj4710
none Details | Review
month-view: highlight the whole cell of current day (2.21 KB, patch)
2016-08-12 13:12 UTC, nj4710
committed Details | Review

Description Martin Cigorraga 2015-10-01 15:19:06 UTC
Hi,

It would be great to have an option to shadow or color the current day to make it easier to find it with a glance. Although it is currently highlighted via the number of the day sometimes it gets difficult to find it when there are a lot of appointments shown.

Thanks.
Comment 1 Michael Catanzaro 2016-07-26 18:16:23 UTC
It should not be an option, it just needs to be highlighted better, at least by default when the calendar is opened. Currently my first thought when opening the calendar is "what day is today?"
Comment 2 Michael Catanzaro 2016-07-26 18:17:31 UTC
It could use the same color blue that's currently used for date selections, for example. Or something similar to that.
Comment 3 nj4710 2016-08-06 16:08:32 UTC
Hi,
How exactly it should be highlighted? or We could also add an option for the user to choose the color for highlighting. I would like to work on this bug. Can anyone tell me what exactly the enhancement should be?
Comment 4 Michael Catanzaro 2016-08-06 17:32:25 UTC
Hi! Glad you're interested in this bug....

(In reply to Michael Catanzaro from comment #2)
> It could use the same color blue that's currently used for date selections,
> for example.

I'd start with implementing this. If Georges wants a different color scheme, that should be easy to change once you've got it working with some color.

(In reply to nj4710 from comment #3)
> We could also add an option for the
> user to choose the color for highlighting.

It should not be configurable (we only want preferences for important things to keep the UI simple).
Comment 5 nj4710 2016-08-07 16:11:54 UTC
Hi,
Do you want a color change like this https://cloud.githubusercontent.com/assets/13117482/17463563/f950195e-5ce5-11e6-910c-8a945c842f84.jpeg ?
or the whole cell of current date should be highlighted? I have implemented this in both year and month views.I am unable to understand the requirement. Can you please help me because I am new to opensource contribution.
Comment 6 Michael Catanzaro 2016-08-07 18:16:05 UTC
(In reply to nj4710 from comment #5)
> or the whole cell of current date should be highlighted?

^ This, the whole cell should be highlighted to draw the user's attention to it right away!
Comment 7 nj4710 2016-08-09 15:00:39 UTC
Created attachment 332999 [details]
better way to highlight current day in month view

Hi,
Can you please tell me if this looks fine or not? I have implemented this in month view. If there are any changes to be made please let me know.
Comment 8 Georges Basile Stavracas Neto 2016-08-09 15:31:03 UTC
A little bit more subtle, maybe. How about an opacity of 0.4?

Also, it'd be better if you attach your patch so I can test here. If you're in doubt, don't worry - there's a special place for you: https://wiki.gnome.org/Newcomers/CodeContributionWorkflow.

Thanks for your time!
Comment 9 nj4710 2016-08-09 18:57:05 UTC
Created attachment 333029 [details] [review]
In the commit we provide a better way to highlight the current date.
Comment 10 Georges Basile Stavracas Neto 2016-08-09 19:40:36 UTC
Review of attachment 333029 [details] [review]:

Good work! Please, correct code as commented below, and I'll gladly accept your patch.

The commit message needs improvements. GNOME Calendar uses a pattern, you can check [1]

Still in the commit message, the body is empty. The Newcomers page has some guidelines on how they should be written [2].

[1] https://git.gnome.org/browse/gnome-calendar/log/?h=wip/gbsneto/timezone-marks
[2] https://wiki.gnome.org/Newcomers/CodeContributionWorkflow#Commit_guidelines

::: data/theme/gtk-styles.css
@@ +31,2 @@
 calendar-view.current {
+    background-color: alpha(@theme_selected_bg_color,0.45);

Put a space after the comma.
Comment 11 nj4710 2016-08-10 11:11:04 UTC
Created attachment 333060 [details] [review]
month-view: highlight the whole cell of current day

In this commit, we changed the background area of current day.

Presently, the current day is highlighted by the number. This makes difficult for the user to identify it when there are lot of events.

To fix this, we changed the color of background and made background area equal to the cell's area.
Comment 12 Georges Basile Stavracas Neto 2016-08-10 16:39:05 UTC
Review of attachment 333060 [details] [review]:

Seems like this patch is applied ~after~ the previous one. You should merge this patche and the former into a single patch (use git rebase to do that).

Otherwise, the commit message is very good now.
Comment 13 nj4710 2016-08-11 13:35:24 UTC
Created attachment 333115 [details] [review]
month-view: highlight the whole cell of current day

In this commit, we changed the background area of current day.

Presently, the current day is highlighted by the number. This makes difficult for the user to identify it when there are lot of events.

To fix this, we changed the color of background and made background area equal to the cell's area.
Comment 14 Georges Basile Stavracas Neto 2016-08-11 17:37:42 UTC
Review of attachment 333115 [details] [review]:

Some more fixes are needed.

::: data/theme/gtk-styles.css
@@ +31,3 @@
 calendar-view.current {
+    background-color: alpha(@theme_selected_bg_color, 0.45);
+    border-radius: 0px;

Remove the 'border-radius' line

::: src/gcal-month-view.c
@@ +1764,3 @@
           gtk_render_background (context, cr,
+                                 cell_width * (column - priv->k),
+                                 cell_height * (row + 1 + first_row_gap) - start_grid_y / 2 - padding.bottom,

This 'y' calculation doesn't work here. I changed to:

cell_height * (row + first_row_gap) + start_grid_y

and it worked.
Comment 15 nj4710 2016-08-12 13:12:14 UTC
Created attachment 333180 [details] [review]
month-view: highlight the whole cell of current day

In this commit, we changed the background area of current day.

Presently, the current day is highlighted by the number. This makes difficult for the user to identify it when there are lot of events.

To fix this, we changed the color of background and made background area equal to the cell's area.
Comment 16 nj4710 2016-08-16 14:32:40 UTC
Can someone please tell me the status of this bug?
Comment 17 Georges Basile Stavracas Neto 2016-08-17 06:21:04 UTC
Thanks for working on this bug. The patch looks great, and it's been published on master with a minor adjustment on the alpha value.

Congratulations for your first patch! And sorry for the delay on the response.

Attachment 333180 [details] pushed as 27ca660 - month-view: highlight the whole cell of current day