Closed Bug 411497 Opened 17 years ago Closed 17 years ago

Task mode should offer some sort of filtering


(Calendar :: Lightning Only, defect)

Not set


(Not tracked)



(Reporter: michael.buettner, Assigned: michael.buettner)



(2 files, 1 obsolete file)

Currently the task mode unconditionally displays all tasks. There should be a way to restrict the time frame in order to cut down the list. It would be nice to ask for all tasks scheduled for today, the upcoming week, all completed tasks, etc. See [1] for the detailed proposal.

Flags: wanted-calendar0.8?
Flags: wanted-calendar0.8? → blocking-calendar0.8+
Attached patch patch v1 (obsolete) — — Splinter Review
This patch install the required filter functionality for the task mode.

I took the liberty to swap the order of the elements in the task pane, as it made more sense to let the calendar list grow as large as it wants. This would push the filter to the bottom of the pane, which just looked weired. That's why I moved the calendar list below the filter option.

Furthermore, this patch removes the tree column headers from the calendar list. The necessary css-magic is a bit ugly, but I didn't find any better solution. I didn't take any measures to not make this apply to Sunbird as well. It looks just fine in Sunbird, so I just decide to go ahead and conditionally remove the headers.

I reused the expand/collapse control from the new agenda element. As I didn't want to create another binding for the already existing functionality, I extended the existing one to automatically do the expand/collapse stuff.
Attachment #296538 - Flags: ui-review?(christian.jansen)
Attachment #296538 - Flags: review?(Berend.Cornelius)
I've applied the patch on Mac and it works really good. The only improvements I'd like to see before the patch lands are a slight optimization of the list margins. For Mac I suggest to increase the left indent by 14px (maybe 12px). See attachment. Please also change the Heading underline from solid to "1px dotted #c0c0c0;" ui+ with the changes mentioned above.
Attached image optimized alignment —
The patch works fine. I noticed some minor issues:
You have to change the your action of the checkbox.
>+                if ( {
>+                    target.setAttribute("collapsed", "true");
>+                } else {
>+                    target.removeAttribute("collapsed");
>+                }
You exchanged the actions at the checkbox here. Please swap.

>+    if (filterHeader.getAttribute("checked") == "true") {
>+        filter.setAttribute("collapsed", "true");
>+    } else {
>+        filter.removeAttribute("collapsed");
>+    }
Maybe you rather want to use the function "setBooleanAttribute(aXulElement, aAttribute, aValue)" here and for other XUL elements that display boolean parameters.

I don't think your "CheckboxStateChange" handler really belongs to agenda-checkbox. For example the agenda-listbox will not be able to use this handler for several reasons. Why do you guess that clicking the agenda-checkbox should remove the next sibling at any case?

When I implemented the agenda-checkbox I did not expect we would be using this binding in other places too. So, now as we do we should probably find another place for its style rules. On the other hand I don't find it any other css file for it and I don't know if we really want to create an own file for it...

Last but not least:
If I were you I would be more careful about public comments about technical architectures. I spent some time to get the agenda-listbox working as it does and I definitely don't believe your proposed approach would have made it easier for me to get that done.
Attachment #296538 - Flags: review?(Berend.Cornelius) → review+
Comment on attachment 296538 [details] [diff] [review]
patch v1

ui+ based on comment #2.
Attachment #296538 - Flags: ui-review?(christian.jansen) → ui-review+
Attached patch patch v2 — — Splinter Review
Patch with review comments addressed.
Attachment #296538 - Attachment is obsolete: true
Attachment #297551 - Flags: ui-review+
Attachment #297551 - Flags: review+
patch checked in on trunk and MOZILLA_1_8_BRANCH

Closed: 17 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.8
Version: Trunk → unspecified
Checked in latest nightly build 20080118 -> issue is fixed and verified.
Marking VERIFIED per comment#8.
Flags: in-litmus+
I would like reopen this bug.
IMHO, the task mode tries to answer the question : "What I have still to do ?", and what is the priority ?"
the filter doesn't offer "Show/ Not completed tasks" which is according to me the most important filter.
I will suggest to remove "Not Started Tasks" by "Not completed Tasks"
and put it in first Rank, 
Personally I barely use the due date for a task, so "Today" or "Next Seven Days" are not for me the most important filters, and also because I've got the answer in the today pane.
Maxime, please file a new bug report with your suggestions which are appreciated.
bug 412962 created
You need to log in before you can comment on or make changes to this bug.