Closed Bug 340601 Opened 15 years ago Closed 14 years ago

Show category color indication on event/task boxes in calendar view

Categories

(Calendar :: Lightning Only, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jminta, Assigned: michael.buettner)

References

Details

Attachments

(1 file, 1 obsolete file)

Lightning should have categories too.  We'll eventually need to sort out the whole Sunbird/Lightning preferences story, but until that time, we can at least put default categories into Lightning.
Attached patch add categories (obsolete) — Splinter Review
This patch packages the categories.properties file and then sets the preference if it isn't defined.  If the user has defined it to something else, then the user-set value will be respected.  This allows advanced users/extensions to go ahead and modify the categories until we've actually sorted out the preference issue.
Assignee: nobody → jminta
Status: NEW → ASSIGNED
Attachment #224640 - Flags: first-review?(dmose)
Comment on attachment 224640 [details] [diff] [review]
add categories

>+function loadCategories() {
>+    try {
>+        var pb2 = Components.classes["@mozilla.org/preferences-service;1"]
>+                            .getService(Components.interfaces.nsIPrefBranch2);
>+        pb2.getComplexValue("calendar.categories.names", 
>+                            Components.interfaces.nsISupportsString).data;
>+    } catch(ex) {
>+        // fails if the preference isn't defined
>+        var sbs = Components.classes["@mozilla.org/intl/stringbundle;1"]
>+                            .getService(Components.interfaces.nsIStringBundleService);
>+        var props = sbs.createBundle("chrome://calendar/locale/categories.properties");
>+        var str = Components.classes["@mozilla.org/supports-string;1"]
>+                            .createInstance(Components.interfaces.nsISupportsString);
>+        str.data = props.GetStringFromName("categories");
>+        pb2.setComplexValue("calendar.categories.names",
>+                            Components.interfaces.nsISupportsString, str);
>+   }
>+}

You totally know what I'm going to say about helper functions here.

r=shaver when you employ their glory to the utmost.
Attachment #224640 - Flags: first-review?(dmose) → first-review+
Comment on attachment 224640 [details] [diff] [review]
add categories

categories.properties actually became obsolete when the sunbird pref code landed.  We need another solution here, involving localized pref files.
Attachment #224640 - Attachment is obsolete: true
*** Bug 348974 has been marked as a duplicate of this bug. ***
Assignee: jminta → ssitter
Status: ASSIGNED → NEW
Depends on: 372014
Target Milestone: --- → Lightning 0.5
FIXED by checkin for bug 372014
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
(In reply to comment #5)
> FIXED by checkin for bug 372014

In Lightning you now can create, modify and apply categories to event/tasks.

But it has no effect on the calendar view or the event box border color. This is not yet supported in Lightning.

Reopen or file a new bug?
Reopen - morph is fine.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
This bug is related to the visual enhancements of the event boxes (bug #368982) since the category will no longer be displayed as soon as the patch will land. I already posted a screen-shot for how the categories will be added in a follow-up bug. We can use this one to carry the implementation for this feature. Stefan, please feel free to assign this bug to me if this is ok for you. Otherwise, I'll open a new one as soon as I get to actually writing the patch.
Assignee: ssitter → nobody
Status: REOPENED → NEW
Summary: Add categories to Lightning → Show category color indication on event/task boxes in calendar view
if this is aimed at 0.5 and the current release is 0.3.1, does this mean this feature won't be available for a few months at least? is 0.4 to be released soon and if so why can't this issue be targeted for that release?

this is my pet peeve for the otherwise super useful project. thx.
There will be no 0.4. 0.5 is the next release, currently slated for early April.

This will need to be handled by Michael Büttner as a follow up to or part of bug 368982.  The screenshot he refers to in comment 8 is attachment 253737 [details].
(In reply to comment #10)
> This will need to be handled by Michael Büttner as a follow up to or part of
> bug 368982.  The screenshot he refers to in comment 8 is attachment 253737 [details].
right, i'll take care of this issue. unfortunately, it won't be possible to integrate this as part of bug 368982, which already pretty stuffed. but i'm assigning this one to me since i'm responsible for the patch. i'll do my best to provide the patch as soon as possible, but please don't expect this within the 0.5 timeframe.
Assignee: nobody → michael.buettner
(In reply to comment #11)
> don't expect this within the 0.5 timeframe.

what if i say please?
Flags: blocking-calendar0.5+
Saying please and setting the blocking flag won't help.  In fact, it just creates more work and bugmail for us, which doesn't help our productivity.

Blocking flags should be set to plus or minus only by the product drivers.  You can nominate bugs for blocking (nominate is ?) but only the drivers set + or -.  You can read more about them at http://wiki.mozilla.org/Calendar:For_Everyone:Blocking_Flags

If you were so inclined, you could take the tentative patch in bug 368982, apply that and attempt to work on fixing this yourself, so that it could make 0.5.

That's the best I've got for you at the moment.
Flags: blocking-calendar0.5+ → blocking-calendar0.5-
Not going to make the 0.5 train.
Target Milestone: Lightning 0.5 → ---
This screenshot is just for reference and shows the current category color indication as implemented in Sunbird 0.5pre.
Duplicate of this bug: 386240
(In reply to comment #16)
> *** Bug 386240 has been marked as a duplicate of this bug. ***

Ok, Bug 386240 seems to be the same, but I read this bug before and it's not clear enough...
why isn't this bug a blocker?
at first this bug was a blocker for 0.5. and many people are asking about this feature. 
(In reply to comment #18)
> why isn't this bug a blocker?
I'm promoting this bug to be on the proposed list of 0.7 blocker bugs. But I still doubt that it will take the 0.7 train simply because the list of open blocker bugs is huge. If we find ourselves in a position were magically all other blockers have been resolved and it's still time we maybe come back to this one.
Flags: blocking-calendar0.7?
WORKSFORME using Lightning 0.7pre (2007081705) with Thunderbird 2.0.0.7pre (20070817) on Windows 2000. 

The categories are shown as event box borders as in Sunbird (see attachment 26035 [details] [diff] [review] ). I think this was fixed by Bug 388405 that also changed much of the calendar management stuff.
I can confirm that this bug has been fixed, as ssitter says bug 388405 was most likely the cause.
Status: NEW → RESOLVED
Closed: 15 years ago14 years ago
Depends on: 388405
Flags: blocking-calendar0.7?
Resolution: --- → FIXED
Target Milestone: --- → 0.7
Version: Trunk → unspecified
VERIFIED with Lightning 0.7pre (2007082803) on WinXP.
Status: RESOLVED → VERIFIED
Duplicate of this bug: 395229
Flags: blocking-calendar0.5-
You need to log in before you can comment on or make changes to this bug.