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 321928 - Pre-defined date ranges
Pre-defined date ranges
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: Browsing
CVS
Other All
: Normal enhancement
: ---
Assigned To: Bengt Thuree
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2005-11-20 14:41 UTC by Bengt Thuree
Modified: 2007-07-24 03:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (8.63 KB, patch)
2005-11-20 14:44 UTC, Bengt Thuree
none Details | Review
Screenshot of this patch (26.17 KB, image/jpeg)
2005-11-20 14:45 UTC, Bengt Thuree
  Details
Patch against CVS (10.69 KB, patch)
2005-11-21 10:31 UTC, Bengt Thuree
none Details | Review
Patch against cvs (10.00 KB, patch)
2005-12-10 12:02 UTC, Bengt Thuree
none Details | Review
Screenshot (25.21 KB, image/jpeg)
2005-12-24 00:09 UTC, Bengt Thuree
  Details
Patch (14.18 KB, patch)
2005-12-24 00:30 UTC, Bengt Thuree
none Details | Review
Patch with Default last 7 days (13.94 KB, patch)
2006-05-20 03:38 UTC, Bengt Thuree
reviewed Details | Review
Main UI: date range indicator (99.82 KB, image/jpeg)
2006-05-23 12:42 UTC, Stephane Delcroix
  Details
Patch with default last 7 days (15.31 KB, patch)
2006-08-01 04:12 UTC, Bengt Thuree
none Details | Review
updated version (13.37 KB, patch)
2006-08-01 15:01 UTC, Stephane Delcroix
none Details | Review
Updated patch (14.19 KB, patch)
2006-09-22 11:07 UTC, Bengt Thuree
needs-work Details | Review
Updated patch (13.19 KB, patch)
2007-07-20 13:29 UTC, Bengt Thuree
committed Details | Review

Description Bengt Thuree 2005-11-20 14:41:59 UTC
Would be nice to have a set of pre-defined date ranges like below:

* Today
* Yesterday
* Last 7 days
* Last 30 days
* Last 90 days
* Last 360 days
* Current month
* Previous month
* Current year
* Previous year
* Current week 
* Previous week
* Customized range
Comment 1 Bengt Thuree 2005-11-20 14:44:06 UTC
Created attachment 54972 [details] [review]
Patch

Created a small patch for this.
It adds a combo box to the DateRange dialog
/Bengt
Comment 2 Bengt Thuree 2005-11-20 14:45:15 UTC
Created attachment 54973 [details]
Screenshot of this patch

A small screenshot of the combobox in action
Comment 3 Bengt Thuree 2005-11-21 10:31:53 UTC
Created attachment 55016 [details] [review]
Patch against CVS

Fixed some bugs...
Comment 4 Bengt Thuree 2005-12-10 12:02:18 UTC
Created attachment 55838 [details] [review]
Patch against cvs

Added option for All Dates.
Comment 5 Bengt Thuree 2005-12-24 00:09:55 UTC
Created attachment 56343 [details]
Screenshot

Current and Previous YEAR is replaced with "2005" and "2004"
Current and Previous MONTH is replaced with "December" and "November", or if the year is different, "January, 2005", "December, 2004"
Comment 6 Bengt Thuree 2005-12-24 00:30:23 UTC
Created attachment 56345 [details] [review]
Patch

Patch against 0.1.5
This patch incorporates presents Current and Previous Year/Month as in the last Screenshot
Comment 7 Bengt Thuree 2006-02-06 10:26:25 UTC
What remains to be done to get this one into CVS?
I have looked a bit on having a drop down box on the main gui, but not sure where to put it to be honest.
Any comments?
Comment 8 Bengt Thuree 2006-05-15 15:17:12 UTC
Ok, I repeat the above question.

What remains to be done to get this one into CVS?
I have looked a bit on having a drop down box on the main gui, but not sure
where to put it to be honest.
Any comments?
Comment 9 Stephane Delcroix 2006-05-19 19:42:13 UTC
Patch review: 56345

Patch cleanly against current CVS.
It could be useful, clearly.

I only see one minor issue... there are no default in the dropdown list. It's a bit confusing at first use. And it's not very user friendly.
A good default could be "custom" or "last week".

Speaking of usability, I guess that 'last year' is better than 'last 360 days', and 'Previous Week (mon-sun)' could be replaced by 'Previous week (8-14 May)'...

my 2 cents, for what it's worth
Comment 10 Bengt Thuree 2006-05-20 01:43:14 UTC
Last 360 days is :
Today is May 20 2006, which means last 360 days is May 21 2005 - May 20 2006 or something like that (todays date - 360 days)

I for one is always a bit uncertain of dates... unless I have a calender infront of me. Therefore the Mon - Sun bit.

I can try to put in a default as Last 30 days ? (a bit more than 7 days, but not to much more)

Thanks for the comments.

There is one more thing missing with this patch.
There should be an indication on the main gui which daterange we are using.
Perhaps even a dropdown field. I would like to get some hints and tips on where to put it, or perhaps someone else would like to do it?
Comment 11 Bengt Thuree 2006-05-20 03:38:33 UTC
Created attachment 65873 [details] [review]
Patch with Default last 7 days

This patch is the same as previous one. 
But it defaults to Last 7 days, and OK button is enabled.

Remains (but could be a new bug perhaps) to put an indication (pulldown) on Main GUI
Comment 12 Stephane Delcroix 2006-05-23 12:42:43 UTC
Created attachment 66053 [details]
Main UI: date range indicator

Check the attached screenshot first.

There is already a date range indicator on the Main UI, but nobody uses it.
You can select a daterange by moving the left and right 'borders' of the timeline.

BTW, when you choose 'Clear Date Range', the timeline is not updated. When you select a date range with the 'Find' menu, the timeline is not updated.

I'll create another bug for this.
Comment 13 Stephane Delcroix 2006-05-23 15:01:40 UTC
Give a look at this one #342694
Comment 14 Bengt Thuree 2006-08-01 04:12:56 UTC
Created attachment 70012 [details] [review]
Patch with default last 7 days

Uploaded a version of this patch that applies cleanly to CVS.
I am not certain if there was more work to be done on this patch or not.

Would appreciate some feedback on it:)
Comment 15 Stephane Delcroix 2006-08-01 08:46:21 UTC
> Would appreciate some feedback on it:)
 
Patch review: patch #70012 for bug #321928

pros:
*) apply and compile
*) nice default (7 days)

minor issues:
*) needs more vertical spacing (between Select Period and Start Date)
*) needs horizontal spacing between 'Select Period' and dropdown list
*) Start Date and Select Period needs to be unified (bold ?)
*) the left of 'Select Period' and 'Start Date' needs to be aligned
*) when you change the selection in the dropdown, the DateTime widgets have to be updated
*) don't disable the DateTime widgets, but when they're manually changed, change the dropdown to 'Custom'

bug:
*) this version re-introduce bug #344314
Comment 16 Stephane Delcroix 2006-08-01 08:57:39 UTC
patch review: continued...

in the code, use an enum or an array to store ranges. Create the dropdown from the array (or enum) and make the switch on the same array (or enum). so, you'll sure that everything is consistent.
Comment 17 Stephane Delcroix 2006-08-01 15:01:24 UTC
Created attachment 70031 [details] [review]
updated version

Eat your own dogfood...

I submitted a lot of remarks on Bengt's patch, so I took my part of the job fixing it ;)
Bengt updated the UI, I updated the code. Nice team work, again ;)

All the issues submitted in comment #15 and comment #16 are now solved.

There's still a minor issue, but it will not be a showstopper, since the bug is in Gnome.DateEdit widget:
when you do:
date_edit.Time = new System.DateTime(2005,1,1);
the widget will show 2004/12/31. this problem only happens on Jan 1st.
Comment 18 Bengt Thuree 2006-09-22 11:07:33 UTC
Created attachment 73202 [details] [review]
Updated patch 

Just updated changelog to add Stephane's name.
Comment 19 Larry Ewing 2006-10-05 02:19:19 UTC
I'd much rather do this with something like a logrithmic time slider than a combo box.
Comment 20 Bengt Thuree 2006-10-05 03:31:10 UTC
Would this work for previous day, week, month or year?

Comment 21 Stephane Delcroix 2006-10-17 09:49:30 UTC
Larry (comment #19), do you mean changing the time adaptor to be logarithmic or a slider in the DateRange dialog ?

I'm not sure that a slider will be more accurate than a combo with predefined rules...

Comment 22 Bengt Thuree 2007-06-03 05:17:18 UTC
Any possibility to get this into SVN?
Logaritimisk scale can come later or ?
Comment 23 Bengt Thuree 2007-07-20 13:29:57 UTC
Created attachment 92042 [details] [review]
Updated patch

I updated the patch so if applies cleanly, but had to manually fix the glade file, as well as the diff (beacuse of a few 100 glade diffs).
Comment 24 Stephane Delcroix 2007-07-21 07:12:49 UTC
applied in r3232
Comment 25 Kevin Duffus 2007-07-22 23:54:38 UTC
would it be possible to enhance the main-ui side pane to include the pre-defined date ranges rather than just having tags listed? for example, the side pane list could look like this (similar to the rhythmbox side pane):

-----------------
|Taken Dates    |
|----------------
| * Today       |
| * Yesterday   |
| * Last Month  |
| * Last Year   |
| * ...         |
| * Custom      |
|----------------
|Photo Tags     |
|---------------|
|  * Favourites |
|  * Hidden     |
| \/ People     |
|    * Family   |
|    * Friends  |
|  * Places     |
|  * ...        |
-----------------

where the "Custom" selection would launch the current date selection dialog.
Comment 26 Bengt Thuree 2007-07-24 03:24:06 UTC
Kevin I will create a new Enhancement Bug (459804) for this suggestion, since this bug is closed.