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 324534 - Use friendly date/time in treeviews
Use friendly date/time in treeviews
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: User Interface
HEAD
Other Linux
: Normal enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
: 371062 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-12-19 19:22 UTC by William Jon McCann
Modified: 2007-01-02 16:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (3.08 KB, patch)
2005-12-19 19:32 UTC, William Jon McCann
none Details | Review
updated patch (4.72 KB, patch)
2005-12-19 21:45 UTC, William Jon McCann
needs-work Details | Review
updated patch (4.17 KB, patch)
2006-03-11 06:31 UTC, James "Doc" Livingston
none Details | Review
patch (3.96 KB, patch)
2006-12-11 17:58 UTC, William Jon McCann
committed Details | Review

Description William Jon McCann 2005-12-19 19:22:53 UTC
Might be nice to use "friendly" time in the treeviews.  They are already used in some of the properties dialogs.
Comment 1 William Jon McCann 2005-12-19 19:32:48 UTC
Created attachment 56174 [details] [review]
patch

OK to commit?
Comment 2 Bastien Nocera 2005-12-19 19:41:50 UTC
Wouldn't that take much more space than it does currently? If so, wouldn't it be better to use that space to show artist and track name, rather than the time?
Comment 3 William Jon McCann 2005-12-19 20:05:47 UTC
Depends on the language, I suppose.  In English, the longest friendly time is "Yesterday 10:00 PM".  The current format is "2005-12-18 10:00".  So, I think the difference in horizontal space is negligible.  This is the same format that Evolution uses in the mail list view.

In fact, you can choose to save even more space with this format because the most important information is closer to the beginning of the string.  For example, consider the following dates:

2005-12-19 15:00
2005-12-18 10:00
2005-12-17 05:00

Now consider the date strings clipped after 5 characters.  In ISO-like form they will all appear as "2005-".  In friendly form (in English at least) they will appear as:

"Today"
"Yeste"
"Sun 0"

The information is much more compact.

However, the real win is that it is formatted for humans.  See the second to last line of:
http://mail.gnome.org/archives/rhythmbox-devel/2005-December/msg00101.html
Comment 4 Bastien Nocera 2005-12-19 20:09:05 UTC
Oh, that's for the date, not for the time, right? The summary of the bug didn't really make that clear.
Comment 5 William Jon McCann 2005-12-19 20:17:27 UTC
Ha.  Right, "date/time".  :)

This affects, Last Played, Date Added, and Podcast Date.  I think that's all.
Comment 6 Charles Schmidt 2005-12-19 21:07:10 UTC
Personally, I don't like it.  Scanning a list of Friendly + non-Friendly dates is difficult.  Even after sorting, its frustrating to have two formats in the same list, especially for something numeric like dates.  So I vote no, unless theres a gconf key to set it somewhere.
Comment 7 Jonathan Matthew 2005-12-19 21:28:34 UTC
rb_entry_view_get_time_date_column_sample() would need to be updated to return sample data for each of the friendly date/time formats, so that the column widths could be measured correctly.  Otherwise, the patch looks good to me.

Comment 8 William Jon McCann 2005-12-19 21:45:44 UTC
Created attachment 56176 [details] [review]
updated patch

Nice catch.  Updated.  It isn't as easy to precisely determine the width of this kind of date but this should be a reasonable estimate or upper limit.

Please keep in mind that this patch only changes to using "friendly" dates.  Precisely what a friendly date is can be further tuned.
Comment 9 Alex Lancaster 2006-01-21 13:03:38 UTC
Works for me.  It would be nice, however, to optionally have a gconf switch between this and the old ISO date behaviour as mentioned in comment #6.
Comment 10 Alex Lancaster 2006-02-14 12:10:09 UTC
(In reply to comment #8)
> Created an attachment (id=56176) [edit]
> updated patch

Any chance this patch could be updated and committed?  It doesn't apply cleanly against CVS anymore.

Friendly dates would be nice.
 




Comment 11 Alex Lancaster 2006-03-08 10:01:28 UTC
Ping?
Comment 12 James "Doc" Livingston 2006-03-11 06:31:42 UTC
Created attachment 61073 [details] [review]
updated patch

Updated to cvs.

This looks fine to me, aside from the fact that scanning such a list can be harder (as previously mentioned).
Comment 13 Alex Lancaster 2006-03-13 08:46:57 UTC
Patch works fine for me.  Would a gconf setting be appropriate for switching the behaviour (I would make "friendly" the default, but expert users might like ISO format).
Comment 14 Alex Lancaster 2006-03-13 12:43:48 UTC
Conflicts with CVS HEAD now because of the commit of patch at bug #332992:

$ patch -p0 < patches/active/rb-friendly-time-3.diff
patching file ChangeLog
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file ChangeLog.rej
patching file rhythmdb/rhythmdb.c
Hunk #2 FAILED at 2656.
Hunk #3 FAILED at 2665.
Hunk #4 FAILED at 2679.
3 out of 4 hunks FAILED -- saving rejects to file rhythmdb/rhythmdb.c.rej
patching file sources/rb-podcast-source.c
Hunk #1 succeeded at 1624 (offset 54 lines).
patching file widgets/rb-entry-view.c
Comment 15 Alex Lancaster 2006-08-24 02:00:37 UTC
Any love for this patch?  Seems like nobody was interested in getting in friendly times...

Marking patch as obsolete, since it is way out of date w.r.t. CVS.
Comment 16 Jonathan Matthew 2006-11-05 20:30:58 UTC
*** Bug 371062 has been marked as a duplicate of this bug. ***
Comment 17 William Jon McCann 2006-12-11 17:58:08 UTC
Created attachment 78144 [details] [review]
patch

Resync with CVS.
Comment 18 William Jon McCann 2006-12-11 18:31:51 UTC
Regarding difficult to scan... obviously I don't agree.

The fact is that we (people) just don't use numeric dates internally.  For every date you see in a numeric format you have to convert this into some other form.  In some cases this is the day of week or month (relation to milestones), sometimes it is the amount of time since then or from now (delta), sometimes it is a combination of these or something else.  And to make matters worse this will almost always require actually looking up the current date.

Think about how you would react if someone said to you:
"What did you think about the meeting on 2006-12-10?"

Well you'd first have to determine or remind yourself that today is 2006-12-11, make sure that you heard all the numbers correctly, make sure you are in agreement about the order of month and day, and then punch the person in the face for not saying "yesterday" and making you store all this stuff on your mental stack.

Also, what we do with this format is basically only display the relevant information.  This reduces noise.  Think about how people talk about dates.  You say for example:

 - We went to the movies yesterday at 4:30
 - We ate sushi on Friday at 7
 - We went to a concert Nov. 11
 - I went to the dentist Nov. 2005

The year is always assumed to be the present unless specified.  The required precision is inversely proportional to time elapsed (in most cases).

So given that this format requires less processing and is easier to parse I think that it is much simpler to scan.
Comment 19 Alex Lancaster 2006-12-12 05:04:00 UTC
Patch works for me.  Regarding comment #18 perhaps a gconf key to get the old ISO-style date behaviour as I suggested in comment #9 would keep people like those in comment #6 happy.
Comment 20 Alex Lancaster 2006-12-12 05:06:33 UTC
As for bug #359740 getting wider feedback on the mailing list would probably be a good idea.
Comment 21 James "Doc" Livingston 2006-12-12 05:19:35 UTC
I think having it committed, so people can try it out would be a good way to get comments on it. Marking as commit-after-release.
Comment 22 William Jon McCann 2006-12-19 15:37:38 UTC
2006-12-19  William Jon McCann  <mccann@jhu.edu>

	* lib/rb-cut-and-paste-code.c:
	Remove trailing whitespace.

	* rhythmdb/rhythmdb.c:
	* sources/rb-podcast-source.c:
	(rb_podcast_source_post_date_cell_data_func):
	* widgets/rb-entry-view.c:
	(rb_entry_view_get_time_date_column_sample):
	Use a friendlier time/date format.  Fixes #324534
Comment 23 Jonathan Matthew 2006-12-20 01:20:43 UTC
It'll probably take me a while to get used to this.  The main thing that sticks out for me is when there's a "Jan 16 08:58 PM" immediately above a "Thu 11:03 PM" - I keep trying to read the month abbreviation as a weekday or vice versa and it just jars me a bit, and the formatting of the day/time fields doesn't help me figure it out.
Comment 24 Jonathan Matthew 2007-01-01 13:09:50 UTC
A couple more nits:

- In the first week of the year, all last played times more than a week ago are in  '<month> <day> <year>' form, which doesn't quite seem right to me.  Since last played times can only be in the past, "Dec 20 11:35 pm" doesn't seem ambiguous until about the end of November.

- At the least, the 'today' and 'yesterday' times should be updated at midnight.
Comment 25 William Jon McCann 2007-01-02 16:49:49 UTC
Seem like good points to me.  From what I remember we just copied what evolution used.  But those seem like good improvements.