Closed Bug 1534112 Opened 6 years ago Closed 6 years ago

No color bars showing in calendar categories

Categories

(Calendar :: Preferences, defect)

Lightning 6.2.2.1
Desktop
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: acdp, Assigned: darktrojan)

References

Details

(Keywords: regression)

Attachments

(12 files, 3 obsolete files)

83.63 KB, image/png
Details
65.52 KB, image/png
Details
4.10 KB, text/plain
Details
91.00 KB, image/png
Details
64.95 KB, image/png
Details
59.18 KB, image/png
Details
50.50 KB, image/png
Details
7.89 KB, text/calendar
Details
66.24 KB, image/png
Details
4.24 KB, patch
Fallen
: review+
Details | Diff | Splinter Review
10.31 KB, patch
Fallen
: review+
Details | Diff | Splinter Review
10.31 KB, patch
darktrojan
: review+
Details | Diff | Splinter Review

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

open up preferences: calendar: views

Colour bars for each catagory not showing, only when a catagory is selected
and no marker to show which catagory is being selected

Actual results:

Colour bars for each catagory not showing, only when a catagory is selected
and no marker to show which catagory is being selected

Expected results:

I would expect to see all current colours that each catagory has related to it in the "Catagories" option

(also, there are four options General, Alarms, Catagories, Views - no indication on the menu bar as to which one is selected (I know - do appreicate that really this should be evident :-) )

Attached image categories.png β€”

Did you mean open Preferences > Calendar > Categories?

I see the color bars in my preferences using Thunderbird 66.0b3 with Lightning 6.8.

Each tab selection is also highlighted.

Component: Untriaged → Preferences
Flags: needinfo?(acdp)
OS: Unspecified → macOS
Product: Thunderbird → Calendar
Hardware: Unspecified → x86_64
Version: 66 → Lightning 6.8
Flags: needinfo?(acdp)

Do you get any messages in the error console while reproducing this?

Does this reproduce with all addons but Lightning disabled and TB restarted?

Comment on attachment 9049814 [details] Screenshot 2019-03-10 at 15.32.45.png The colours of this prefs doesn't look normal. Have you some special theme settings (TB or system)?

yes that's what i mean Walt... you see them? I dont and here is a snapshot (I hope)

Richard - not as far as I know, did check as that crossed my mind

(In reply to [:MakeMyDay] from comment #3)

Do you get any messages in the error console while reproducing this? No
And for your 2nd questiomn: If I disable Lightning then I will not see the catagories!

I asked to disable all addons except of Lightning and restart TB. That you cannot see the categories if you disable Lightning is obvious.

Attached file error-console (obsolete) β€”

I can't reproduce this in Thunderbird 66.0b3 on Windows 10, Ubuntu 18.04 or Linux Mint 19.1.

I can reproduce using Daily 67.0a1, Lightning 6.9a1 on Windows 10, but not on Ubuntu 18.04 or Linux Mint 19.1.

Lightning is the only extension in Daily.

Attached file error-console.txt β€”

Let's try this one instead.

Attachment #9049832 - Attachment is obsolete: true

No chrome package registered for chrome://browser/skin/identity-icon.svg

doesn't look like a calendatr issue. Richard, do you have any idea on this?

Flags: needinfo?(richard.marti)

(In reply to [:MakeMyDay] from comment #12)

No chrome package registered for chrome://browser/skin/identity-icon.svg

doesn't look like a calendatr issue. Richard, do you have any idea on this?

This is a toolkit file with a reference to browser: https://searchfox.org/comm-central/source/mozilla/toolkit/themes/shared/in-content/common.inc.css#825

Maybe worth for a bug to move the icon to toolkit.

Flags: needinfo?(richard.marti)

(In reply to [:MakeMyDay] from comment #9)

I asked to disable all addons except of Lightning and restart TB. That you cannot see the categories if you disable Lightning is obvious.

You did.. apologies....

Will do that and feed back

Only ext is the google provider and no themes, dictionary std also disabled - still same issue with display for Cal pref, in fact as per new screenshot, porb is TB not just Lightning

(In reply to [:MakeMyDay] from comment #3)

Do you get any messages in the error console while reproducing this?

No messages... suspect not condiered as an error/fault of any sort

As remarked in an earlier comment, some poss issue with pref or setting, but not using any theme

I noticed this strange behaviour from time when Preferences Option became integrated as a tab rather than a "pop-up" dialogue box

So there are 2 bugs here?

  1. The color bars don't show in Preferences > Calendar > Categories
  2. There is no definition of tab selection in any of Thunderbird's preferences with multiple selections such as Formatting, Tags, Advanced in Preferences > Display and others.

Have you tested a new profile?

https://support.mozilla.org/en-US/kb/using-multiple-profiles

(In reply to WaltS48 [:walts48] from comment #19)

So there are 2 bugs here?

  1. The color bars don't show in Preferences > Calendar > Categories
  2. There is no definition of tab selection in any of Thunderbird's preferences with multiple selections such as Formatting, Tags, Advanced in Preferences > Display and others.

Have you tested a new profile?

https://support.mozilla.org/en-US/kb/using-multiple-profiles

Walt - not sure about two bugs - think both related to same strange issue

I realize that the problem is with Preferences as a layout - not just limited to the Calendar tab.

I will try a new profile.

What I have done (as requested above regard errors) is cleaned the console (yes did a copy first as well) and then closed and reopend Prefs tab and got this:

TypeError: this._prefsBundle is undefined[Learn More] applications.js:189:7
get typeDescription chrome://messenger/content/preferences/applications.js:189
sortByType chrome://messenger/content/preferences/applications.js:1305
comparefn self-hosted:247
InsertionSort self-hosted:6429
MergeSort self-hosted:6489
sort self-hosted:250
_sortVisibleTypes chrome://messenger/content/preferences/applications.js:1315
_delayedPaneLoad chrome://messenger/content/preferences/applications.js:922

​
Very similar to the bigger dump copied, which is in a word doc if of use

Attached image New profile Prefs!.png β€”

Walt

New profile works fine!!!!! Will post screen shot

(In reply to Antony from comment #22)

Walt

New profile works fine!!!!! Will post screen shot

Now why did I not think of that!!!!

so what drives the theme layout in the prefs.js file. I notice that the new profile (obviously) is very thin which helps, so looking for differences

Or is there a separate file that prefs uses for the theme layout

Attached image colours restored.png β€”

Ok found the problem!!!!

user_pref("browser.display.document_color_use", 2);
user_pref("browser.display.foreground_color", "#333333");
user_pref("browser.display.use_document_colors", false);

Take these out and colours restored!

Snapshot to show result

This is on my original profile NOT the new one.

Happy to hear you have your problems sorted.

My prefs in Daily 67.0a1 on Windows 10 are

browser.display.document_color_use;0
browser.display.foreground_color;#000000

and I don't have any colors in Categories.

I mentioned in comment 10 that I do have them in my 67.0a1 on Linux using my production profile.

I see what is missing on Windows!!

In TB on Linux I have calendar.category.color preferences that show as modified strings.

calendar.category.color.anniversary;#333333
calendar.category.color.birthday;#996633

Twenty two of them in total, and they are all missing from my 67.0a1 on Windows 10.

To complicate matters even more. If I launch TB 66.0b3 or TB 67.0a1 with a new profile on Linux, all those preferences are nonexistent like TB 67.0a1 on Windows.

Any idea what's going on here?

Flags: needinfo?(richard.marti)
Flags: needinfo?(makemyday)

Ok found the problem!!!!

user_pref("browser.display.document_color_use", 2);
user_pref("browser.display.foreground_color", "#333333");
user_pref("browser.display.use_document_colors", false);

Take these out and colours restored!

Snapshot to show result

This is on my original profile NOT the new one.(In reply to WaltS48 [:walts48] from comment #26)

Happy to hear you have your problems sorted.

My prefs in Daily 67.0a1 on Windows 10 are

browser.display.document_color_use;0
browser.display.foreground_color;#000000

and I don't have any colors in Categories.

I mentioned in comment 10 that I do have them in my 67.0a1 on Linux using my production profile.

I see what is missing on Windows!!

In TB on Linux I have calendar.category.color preferences that show as modified strings.

calendar.category.color.anniversary;#333333
calendar.category.color.birthday;#996633

Twenty two of them in total, and they are all missing from my 67.0a1 on Windows 10.

To complicate matters even more. If I launch TB 66.0b3 or TB 67.0a1 with a new profile on Linux, all those preferences are nonexistent like TB 67.0a1 on Windows.

Any idea what's going on here?

Walt

You are not going to have any cal cat prefs showing in a new profile until you set one up. (If I understood you correctly). To prove set up a catagory with a colour then look it up in the prefs tab.

In the prefs.js all your cal cat colours will show on the main profile, however, if not showing in the tab in the app, suggest you make a copy of the prefs.js and then edit the live one (with TB clossed first) and "remark out" or delete all the lines refering to browser.display as they are set to "0" strings and see if that shows the colours up when you restart TB in Windows

I should not need to edit anything.

I believe a default set of categories and colors are already coded into the Lightning extension. When Lightning is enabled and the user has access to Options/Preferences > Calendar the colors should appear in the Categories tab along with the category names.

Preferences > Calendar is nonexistent if Lightning is disabled.

I don't recall ever creating a category in any version of Thunderbird.

I don't know. Maybe this is a issue of the new overlay loader. N-i Geoff.

Geoff, please read comment 26.

Flags: needinfo?(richard.marti) → needinfo?(geoff)

(In reply to WaltS48 [:walts48] from comment #28)

I should not need to edit anything.

I only suggested an edit to prove one way or the other

I believe a default set of categories and colors are already coded into the Lightning extension. When Lightning is enabled and the user has access to Options/Preferences > Calendar the colors should appear in the Categories tab along with the category names.

Been such a long time since I edited all mine can't remember - however, reckon there were std catagories and you are right.

Preferences > Calendar is nonexistent if Lightning is disabled. - This is true of course

I don't recall ever creating a category in any version of Thunderbird. - changed all mine!

Looks like bug 1481790 broke this.

Flags: needinfo?(geoff)
Attached patch 1534112-category-startup-1.diff (obsolete) β€” β€” Splinter Review

I think this does the job. I'm having other calendar startup issues at the moment so I'm not sure. My theory is that if calendar.categories.names is set too early, the category colour prefs are never set up in setupDefaultCategories.

Attachment #9050153 - Flags: review?(makemyday)
Assignee: nobody → geoff
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Summary: no colour bars showing in calandar catagories → No colour bars showing in calendar categories
Attached image nocolorbars.png β€”

Just started testing TB 60.6.0 rc (build2) with Lightning 6.2.6 on Linux Mint 19.1 and no color bars for the categories.

Not sure how far this goes back because I also don't see them in the Ubuntu supplied 60.5.1 and Thunderbird supplied 60.5.3 with test profiles.

I do have them in my production profiles because I have been using them for years. Except the Daily on Windows 10 which I did create a new profile for maybe 66.0a1 sometime in its lifetime.

I never use categories.

OS: macOS → All
Hardware: x86_64 → Desktop
Target Milestone: --- → 6.2.6
Version: Lightning 6.8 → Lightning 6.2.5.1

Did a little more detective work and found Thunderbird 60.0 with Lightning 6.2 to be okay.

The first version with no color bars under Categories is TB 60.2.1 with Lightning 6.2.2.1 Built from https://hg.mozilla.org/releases/comm-esr60/rev/8d71faee5dcdd0773b7e0830b8fad96a6bda559b

Version: Lightning 6.2.5.1 → Lightning 6.2.2.1

That more or less confirms my thought in comment 31.

Flags: needinfo?(makemyday)
Comment on attachment 9050153 [details] [diff] [review] 1534112-category-startup-1.diff Review of attachment 9050153 [details] [diff] [review]: ----------------------------------------------------------------- You're just removing loading the locale default preferences for categories at all here - how can this be an appropriate fix? Category names are defined per locale, thus the defaults must be loaded accordingly. If there is a timing issue, we can think about making it loading asynchrously or kick off the loader at a later point in time. Apart from that, category colors (with locale deafult names) are displayed correctly here on Win 10 for ESR60 and TB66b3 (haven't checked trunk since I'm currently building).
Attachment #9050153 - Flags: review?(makemyday) → review-

No I'm not. The code that sets up the colour prefs relies on the absence of the category names pref, or it doesn't run.

Target Milestone: 6.2.6 → ---
Summary: No colour bars showing in calendar categories → No color bars showing in calendar categories
Attached file Home.ics β€”
Blocks: 1236747

(In reply to David Hedlund from comment #38)

Because there are no category colors it looks like the Events you created pick up the color of the Home calendar.

I just downloaded this file, opened Thunderbird 60.6.1 with Lightning 6.2.6.1 with a test profile on Linux Mint 19 Cinnamon.
Imported the file into the default Home calendar and all them were the color of the Home calendar.
Right clicked on Home, selected Properties and changed the color of the Home calendar to Red (255,0,0), clicked Select, then OK.
All the events became red.
Same for any color I created.

See Also: → 1544279

(In reply to WaltS48 [:walts48] from comment #40)

(In reply to David Hedlund from comment #38)

Because there are no category colors it looks like the Events you created pick up the color of the Home calendar.

Yes that was expected. The test file I provided is just used to evaluate the status of this bug.

See Also: → 1544280
Attached image fixed-colors.png β€”

Seeing that this bug is still open and I suspect the patch hasn't been applied yet.

Here is what I recently discovered using TB 60.6.1 with Lightning 6.2.6.1 and a test profile.

Select the first category "Anniversary".
Click Edit. Notice "Use Color" is not enabled.
Enable "Use Color"
Click OK.
The Anniversary category now has a color.
Repeat for all the other categories.

Somewhere enabling the colors by default got changed. Probably Lightning 6.2.2.1 since it is the first version I found with the problem.

The colors are there. Just not enabled by default like they have been in previous versions.

Thanks to David for putting me on that path.

https://bugzilla.mozilla.org/show_bug.cgi?id=1544287#c1

(In reply to WaltS48 [:walts48] from comment #42)

Created attachment 9058179 [details]
fixed-colors.png

Seeing that this bug is still open and I suspect the patch hasn't been applied yet.

Here is what I recently discovered using TB 60.6.1 with Lightning 6.2.6.1 and a test profile.

Select the first category "Anniversary".
Click Edit. Notice "Use Color" is not enabled.
Enable "Use Color"
Click OK.
The Anniversary category now has a color.
Repeat for all the other categories.

Somewhere enabling the colors by default got changed. Probably Lightning 6.2.2.1 since it is the first version I found with the problem.

The colors are there. Just not enabled by default like they have been in previous versions.

Thanks to David for putting me on that path.

https://bugzilla.mozilla.org/show_bug.cgi?id=1544287#c1

Thank you for the demonstration. The fastest way is to simply put these lines in prefs.js that Thunderbird stopped generate:

user_pref("calendar.category.color.anniversary", "#333333");
user_pref("calendar.category.color.birthday", "#996633");
user_pref("calendar.category.color.business", "#FFFFCC");
user_pref("calendar.category.color.calls", "#99FF99");
user_pref("calendar.category.color.clients", "#FF9900");
user_pref("calendar.category.color.competition", "#CC9933");
user_pref("calendar.category.color.customer", "#CCCCCC");
user_pref("calendar.category.color.favorites", "#3366FF");
user_pref("calendar.category.color.follow_up", "#6600CC");
user_pref("calendar.category.color.gifts", "#FF99FF");
user_pref("calendar.category.color.holidays", "#663366");
user_pref("calendar.category.color.ideas", "#003333");
user_pref("calendar.category.color.issues", "#99FFFF");
user_pref("calendar.category.color.meeting", "#FFFF66");
user_pref("calendar.category.color.miscellaneous", "#FFCC00");
user_pref("calendar.category.color.personal", "#003333");
user_pref("calendar.category.color.projects", "#FFCC99");
user_pref("calendar.category.color.public_holiday", "#FFCC66");
user_pref("calendar.category.color.status", "#FFFF33");
user_pref("calendar.category.color.suppliers", "#000099");
user_pref("calendar.category.color.travel", "#663300");
user_pref("calendar.category.color.vacation", "#660000");

Well, for users that aren't technically savvy I think the best way would be for the developers to fix the bug by fixing whatever broke causing "Use Colors" to be disabled by default in Lightning 6.2.2.1. Instead of enabled by default like they are with Lightning 6.2.

I've been using release, beta and nightly builds for years with basically the same profile and have all the color bars in my Lightnings shipped with each.

I think using Preferences > Calendar > Categories, clicking Edit and enabling "Use Colors" would be the way I would provide support to a user. Alos the method I would use.

Geoff any idea why the "Use Colors" was disabled?

Flags: needinfo?(geoff)

Yes. The prefs are missing. I've already posted a solution to this problem, but MakeMyDay disagrees with it.

I can also show you where the breaking change landed in 6.2.2.1.

Flags: needinfo?(geoff)
Assignee: geoff → nobody
Status: ASSIGNED → NEW
Attached patch 1534112-category-startup-2.diff (obsolete) β€” β€” Splinter Review

Same patch as before, because I'm still convinced it's right, but I found an indentation error.

Attachment #9050153 - Attachment is obsolete: true
Attachment #9075302 - Flags: review?(philipp)
Attachment #9075302 - Flags: approval-calendar-beta?(philipp)
Comment on attachment 9075302 [details] [diff] [review] 1534112-category-startup-2.diff Review of attachment 9075302 [details] [diff] [review]: ----------------------------------------------------------------- Discussed this on IRC. We do need to keep setting the category names because they can be localized. It would likely make sense to just put the code to init category names and colors into one place. I'd also appreciate a test to make sure we don't regress either of these issues.
Attachment #9075302 - Flags: review?(philipp)
Attachment #9075302 - Flags: review-
Attachment #9075302 - Flags: approval-calendar-beta?(philipp)

Here's where it happens with my patch, which isn't clear by just looking at the patch:

https://searchfox.org/comm-central/rev/8a599b6d5adad1e9befa138c05d12f9246e5f985/calendar/base/modules/utils/calCategoryUtils.jsm#48

Okay, a different approach. Set all the prefs on the first start.

I put them on the default branch too, before they were on the user branch. I think that makes sense. I also fixed up a different call into cal.category.setupDefaultCategories which was essentially a copy of cal.category.fromPrefs.

Test coming in a separate patch when I've written one.

Assignee: nobody → geoff
Attachment #9075302 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #9075917 - Flags: review?(philipp)
Attachment #9075917 - Flags: approval-calendar-beta?(philipp)

At last, a test. I've put it and testAlarmDefaultValue.js into a folder.

Attachment #9076164 - Flags: review?(philipp)
Attachment #9076164 - Flags: approval-calendar-beta?(philipp)
Attachment #9075917 - Flags: approval-calendar-esr?(philipp)
Attachment #9076164 - Flags: approval-calendar-esr?(philipp)

Regression according to comment #45.

Keywords: regression
Comment on attachment 9075917 [details] [diff] [review] 1534112-category-startup-3.diff Review of attachment 9075917 [details] [diff] [review]: ----------------------------------------------------------------- This looks fine to me, glad there is a test now!
Attachment #9075917 - Flags: review?(philipp)
Attachment #9075917 - Flags: review+
Attachment #9075917 - Flags: approval-calendar-esr?(philipp)
Attachment #9075917 - Flags: approval-calendar-esr+
Attachment #9075917 - Flags: approval-calendar-beta?(philipp)
Attachment #9075917 - Flags: approval-calendar-beta+
Attachment #9076164 - Flags: review?(philipp)
Attachment #9076164 - Flags: review+
Attachment #9076164 - Flags: approval-calendar-esr?(philipp)
Attachment #9076164 - Flags: approval-calendar-esr+
Attachment #9076164 - Flags: approval-calendar-beta?(philipp)
Attachment #9076164 - Flags: approval-calendar-beta+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/dcdb5b8b12f2
Initialise calendar category colours on first startup. r=philipp
https://hg.mozilla.org/comm-central/rev/c6e75d5488e5
Test for category colours in the preferences. r=philipp

Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → 70

Failing your own test? EDIT: ... due to test-rot :-( - I had to do some rebasing on C-C: https://hg.mozilla.org/comm-central/rev/c6e75d5488e5#l3.56
So let's see whether it fails on the beta as well.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

Looks like this needs to be adapted to the reshuffling of the preferences. Hopefully we won't see this issue in the beta.
EDIT: Beta is green, so just a patch that waited to long in the queue while the world changed around it.

Flags: needinfo?(geoff)

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/166ccd934db3
follow-up - Update test for new preferences tab; rs=bustage-fix

Status: REOPENED → RESOLVED
Closed: 6 years ago6 years ago
Resolution: --- → FIXED
Flags: needinfo?(geoff)

(In reply to Jorg K (GMT+2) from comment #54)

TB 69 beta / Cal 7.1:
https://hg.mozilla.org/releases/comm-beta/rev/8f2a29618eed9f467cc11c2aeff48a216a29d736
https://hg.mozilla.org/releases/comm-beta/rev/eef322757b67ee75b7d1cf8834580bf23bcc08e5

Pardon my confusion.

Is TB 69 beta reverting to using old calendar versioning, or is that Cal 7.1 just for Bugzilla purposes?

I though Lightning versions were now matching Thunderbird versions. TB 69.0b1 would have Lightning 69.0b1 and so on.

Yes, we are matching versions. It's just taking a while to change some things over. The 7.0 and 7.1 targets may never be renamed and that's okay, we know what it means.

TB 68 matches Cal 7.0 in BMO, Lightning 68 in the add-on,
TB 69 matches Cal 7.1 in BMO, Lightning 69 in the add-on,
TB 70 matches Cal 70 in BMO. Lightning 70 in the add-on,

Note that the Lightning add-on announces itself with the same version number as TB from 68 onwards.

The test as written doesn't work on ESR, here's a fixed version.

Attachment #9082188 - Flags: review+
Attachment #9082188 - Flags: approval-calendar-esr+

Maybe you want to remove the flag from the other patch then since I see you have been duly empowered.

Comment on attachment 9076164 [details] [diff] [review] 1534112-category-startup-test-1.diff Yes, I have (apparently) got the power.
Attachment #9076164 - Flags: approval-calendar-esr+

Bonus points for submitting an ESR test that passed :-)

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: