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 680989 - Conversations - time stamps are noisy, misaligned with message
Conversations - time stamps are noisy, misaligned with message
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
3.5.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-01 14:53 UTC by Allan Day
Modified: 2012-12-03 14:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change format of timestamps of conversations bubbles. Now we only show the hour if the message is on today, and the word yesterday if it was on yesterday. Also don't show the seconds in the timestamps. Now the timestamp is align to the middle of the conve (4.12 KB, patch)
2012-09-30 14:09 UTC, Carlos Soriano
rejected Details | Review
Change the timestamp code to call the function of translation to allow the translation of the timestamp. Also, erase the line that align the timestamp in the notification to middle, since the default value is MIDDLE and that's the align we want. (3.69 KB, patch)
2012-09-30 20:26 UTC, Carlos Soriano
needs-work Details | Review
Change string formats of the timestamps from conversation bubles, since before the timestamps contain unnecessary information. Also change the timestamp align to the middle for design reasons. (3.87 KB, patch)
2012-10-02 22:05 UTC, Carlos Soriano
needs-work Details | Review
messageTray: Change timestamp string formats (3.65 KB, patch)
2012-10-05 09:47 UTC, Carlos Soriano
committed Details | Review
MessageTray: change timestamp wrong text "on Yesterday" to "yesterday" (1.37 KB, patch)
2012-10-26 17:04 UTC, Carlos Soriano
accepted-commit_now Details | Review
patch working (196.39 KB, image/png)
2012-10-26 17:37 UTC, Carlos Soriano
  Details
messageTray: Clean-up timestamps for design reasons and correct some English issues in the timestamp string. (2.73 KB, patch)
2012-11-15 18:38 UTC, Carlos Soriano
committed Details | Review
patch working (99.60 KB, image/png)
2012-11-15 18:41 UTC, Carlos Soriano
  Details

Description Allan Day 2012-08-01 14:53:51 UTC
I can currently seeing the following string in a conversation bubble: "Sent at 14:26:29 on Wednesday".

The string contains unecassary information. The message was sent today, so I don't need to see the day. I also don't need to know which second I received it at. "Sent at" is also noise.

In short, it should read "14:26" [1]. It should also be vertically aligned with the most recent message.

[1] If the message was received on a different day, you can add it to the string. It would be great if it could read "Yesterday" if the message was received, well, yesterday.
Comment 1 Carlos Soriano 2012-09-30 14:09:56 UTC
Created attachment 225427 [details] [review]
Change format of timestamps of conversations bubbles. Now we only show the hour if the message is on today, and the word yesterday if it was on yesterday. Also don't show the seconds in the timestamps. Now the timestamp is align to the middle of the conve
Comment 2 Carlos Soriano 2012-09-30 14:12:29 UTC
I only test it with today, because I don't know how test it for messages from one year before. But I look carefully and the code seems correct.
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-09-30 16:34:27 UTC
Review of attachment 225427 [details] [review]:

In no way will this ever translate.
Comment 4 Carlos Soriano 2012-09-30 20:26:34 UTC
Created attachment 225441 [details] [review]
Change the timestamp code to call the function of translation to allow the translation of the timestamp. Also, erase the line that align the timestamp in the notification to middle, since the default value is MIDDLE and that's the align we want.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-09-30 23:27:15 UTC
Review of attachment 225441 [details] [review]:

Please squash with the previous patch.

Also, please limit commit message lines to 79 characters. We follow the format described in http://lists.cairographics.org/archives/cairo/2008-September/015092.html
Comment 6 Carlos Soriano 2012-10-02 22:05:06 UTC
Created attachment 225636 [details] [review]
Change string formats of the timestamps from conversation bubles, since before the timestamps contain unnecessary information. Also change the timestamp align to the middle for design reasons.
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-10-02 22:26:33 UTC
Review of attachment 225636 [details] [review]:

Your commit message is too long. Try something like:

    messageTray: Change timestamp string formats

    The timestamps before contained unnecessary information.
    Additionally, align the timestamps to be in the middle of the
    bubble for design reasons.

::: js/ui/components/telepathyClient.js
@@ +938,3 @@
         var daysAgo = (now.getTime() - date.getTime()) / (24 * 60 * 60 * 1000);
 
+        let timestamp;

Why the change?

@@ +942,3 @@
+        // Show only the hour if date is on today
+        if(daysAgo < 1){
+            timestamp = "<b>%H:%M</b>";

I'm not sure if we need to translate this. Probably not.

@@ +968,3 @@
         }
 
+        return now.toLocaleFormat(timestamp);

"now" is incorrect. This needs to be "date".
Comment 8 Carlos Soriano 2012-10-05 09:43:58 UTC
(In reply to comment #7)
> Review of attachment 225636 [details] [review]:
> 
> Your commit message is too long. Try something like:
> 
>     messageTray: Change timestamp string formats
> 
>     The timestamps before contained unnecessary information.
>     Additionally, align the timestamps to be in the middle of the
>     bubble for design reasons.
> 
Ok

> ::: js/ui/components/telepathyClient.js
> @@ +938,3 @@
>          var daysAgo = (now.getTime() - date.getTime()) / (24 * 60 * 60 *
> 1000);
> 
> +        let timestamp;
> 
> Why the change?
> 
For me was more clear, but no big reason, so I revert the changes

> @@ +942,3 @@
> +        // Show only the hour if date is on today
> +        if(daysAgo < 1){
> +            timestamp = "<b>%H:%M</b>";
> 
> I'm not sure if we need to translate this. Probably not.
> 
I didn't change it. If you want to change, please tell me.
> @@ +968,3 @@
>          }
> 
> +        return now.toLocaleFormat(timestamp);
> 
> "now" is incorrect. This needs to be "date".

Sorry for the silly error.
Comment 9 Carlos Soriano 2012-10-05 09:47:15 UTC
Created attachment 225867 [details] [review]
messageTray: Change timestamp string formats

The timestamps before contained unnecessary information.
Additionally, align the timestamps to be in the middle of the
bubble for design reasons.
Comment 10 Jasper St. Pierre (not reading bugmail) 2012-10-05 15:39:01 UTC
Review of attachment 225867 [details] [review]:

Looks good, but you're going to have to wait until String Freeze goes away for this one to work.
Comment 11 Jasper St. Pierre (not reading bugmail) 2012-10-11 15:27:28 UTC
(In reply to comment #10)
> Review of attachment 225867 [details] [review]:
> 
> Looks good, but you're going to have to wait until String Freeze goes away for
> this one to work.

Do we want this one in 3.6.1? Florian, do you want to file a freeze break request?
Comment 12 Allan Day 2012-10-11 15:34:47 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > Review of attachment 225867 [details] [review] [details]:
> > 
> > Looks good, but you're going to have to wait until String Freeze goes away for
> > this one to work.
> 
> Do we want this one in 3.6.1? Florian, do you want to file a freeze break
> request?

Do you have a screenshot of the patch in action? I don't have a working JHBuild right now, unfortunately.
Comment 13 Jasper St. Pierre (not reading bugmail) 2012-10-16 19:21:46 UTC
This can be landed now.
Comment 14 Carlos Soriano 2012-10-16 19:58:04 UTC
AS far as I know I have to push to upstream now...can I do this?
Comment 15 Jasper St. Pierre (not reading bugmail) 2012-10-16 20:19:19 UTC
Do you have commit rights?
Comment 16 Carlos Soriano 2012-10-16 20:22:16 UTC
I don't think so. It's my first patch to be commited.
Comment 17 Florian Müllner 2012-10-16 20:36:42 UTC
Comment on attachment 225867 [details] [review]
messageTray: Change timestamp string formats

Attachment 225867 [details] pushed as 3de0ebf - messageTray: Change timestamp string formats

Here we go then - are the other patches obsolete and the bug can be closed? Or is there anything else left?
Comment 18 Carlos Soriano 2012-10-16 20:41:21 UTC
Florian, the other patches were my own errors, so are obsolete.
Close bug as fixed
Comment 19 Jasper St. Pierre (not reading bugmail) 2012-10-16 20:42:38 UTC
Yeah, the other patches are previous attempts. There's nothing left here.
Comment 20 Florian Müllner 2012-10-16 20:44:24 UTC
OK, closing then - thanks for the patch!
Comment 21 Allan Day 2012-10-22 12:08:49 UTC
Is it possible to have a screenshot of the fix in action?
Comment 22 Simon McVittie 2012-10-26 12:51:22 UTC
I happened to notice this commit while browsing through Shell git. The "yesterday" strings say:

+            format = _("<b>%H:%M</b> on Yesterday");

which seems strange to me as a native en_GB speaker: I would expect it to say "<b>%H:%M</b> yesterday". I'm not aware of this being different in en_US?
Comment 23 Carlos Soriano 2012-10-26 17:04:03 UTC
Created attachment 227377 [details] [review]
MessageTray: change timestamp wrong text "on Yesterday" to "yesterday"
Comment 24 Carlos Soriano 2012-10-26 17:19:21 UTC
Simon,

Yeah, it's my English fault.

Sorry for that and thanks to take notice.

I assume that you're English is correct for the last patch.
Comment 25 Carlos Soriano 2012-10-26 17:37:38 UTC
Created attachment 227379 [details]
patch working

Aday,

That's what do you want?
Comment 26 Jasper St. Pierre (not reading bugmail) 2012-10-26 18:20:13 UTC
Review of attachment 227377 [details] [review]:

Makes sense.
Comment 27 Carlos Soriano 2012-11-15 17:02:13 UTC
Aday, can you tell me the good format?
I saw that in this bug report https://bugzilla.gnome.org/show_bug.cgi?id=687809 you told a different format. Can you specify the correct format?
AS far I understood:

1 day:
Yesterday, 14:30 PM (mayus at yesterday, coma, hour, space, PM/AM)

[2, 7] days:
Monday, 14:30 PM

1 year:
May 25 on Monday, 14:30 PM

>1 year:
2012, May 25 on Monday, 14:30 PM

Or backwards?

14:30 PM on Monday, May 25, 2012
Comment 28 Allan Day 2012-11-15 17:15:39 UTC
(In reply to comment #27)
> Aday, can you tell me the good format?
> I saw that in this bug report https://bugzilla.gnome.org/show_bug.cgi?id=687809
> you told a different format. Can you specify the correct format?
> AS far I understood:
> 
> 1 day:
> Yesterday, 14:30 PM (mayus at yesterday, coma, hour, space, PM/AM)
> 
> [2, 7] days:
> Monday, 14:30 PM
> 
> 1 year:
> May 25 on Monday, 14:30 PM
> 
> >1 year:
> 2012, May 25 on Monday, 14:30 PM
> 
> Or backwards?
> 
> 14:30 PM on Monday, May 25, 2012

In general I would put the time after the date (would be good to follow the localisation/format settings for that), and I wouldn't bother with "on" - it's extra text and might be tricky for translations.

I would also only include the day of the week if the message was sent in the current week. So:

1 day:
Yesterday, 14:30 PM

Some time this week:
Monday, 14:30 PM

Further back than this week:
May 25, 14:30 PM

A year or more:
May 25 2012, 14:30 PM

There are other places where these nice time stamps have been implemented, so you might want to check there too. Nautilus springs to mind...
Comment 29 Carlos Soriano 2012-11-15 18:38:14 UTC
Created attachment 229074 [details] [review]
messageTray: Clean-up timestamps for design reasons and correct some English issues in the timestamp string.
Comment 30 Carlos Soriano 2012-11-15 18:41:21 UTC
Created attachment 229075 [details]
patch working
Comment 31 Carlos Soriano 2012-11-15 18:46:09 UTC
Aday,
I follow your indications, nautilus do it in a different manner, using the entire date, and I think your manner is more logical and compact.

Jasper,
The previous patches not commited are obsoletes with this new patch. If the code is correct and no problems, please commit the new patch.
Comment 32 Allan Day 2012-11-16 13:35:49 UTC
(In reply to comment #30)
> Created an attachment (id=229075) [details]
> patch working

Looks good to me. The time stamp should be right aligned though...
Comment 33 Carlos Soriano 2012-11-16 13:48:21 UTC
Allan,

Yes, but we are following this in the other bug report https://bugzilla.gnome.org/show_bug.cgi?id=687809

If do you want, I can fix the align in this patch.
Comment 34 Allan Day 2012-11-16 14:16:43 UTC
(In reply to comment #33)
> Yes, but we are following this in the other bug report
> https://bugzilla.gnome.org/show_bug.cgi?id=687809

Ah sorry, my mistake. Then yes, I like this. :)
Comment 35 Allan Day 2012-11-28 16:49:57 UTC
Reopening this. Let's try and land the patch in comment 29.
Comment 36 Giovanni Campagna 2012-12-02 22:14:00 UTC
Pushed according to comment 31.
Carlos, time to get a git account? :)
Comment 37 Carlos Soriano 2012-12-03 10:05:55 UTC
Giovanni,
Yeah, that would be cool
Comment 38 Allan Day 2012-12-03 10:20:51 UTC
(In reply to comment #36)
> Carlos, time to get a git account? :)

+1 :)
Comment 39 Florian Müllner 2012-12-03 10:38:24 UTC
(In reply to comment #37)
> Yeah, that would be cool

Then ask for it[0] :-)


[0] https://live.gnome.org/NewAccounts/
Comment 40 Carlos Soriano 2012-12-03 14:15:06 UTC
I will do it, thanks Florian for the link.
Thanks Giovanni and Allan for the recommendation.