Open Bug 1103261 Opened 10 years ago Updated 2 years ago

Feature request: Unique CSS classes for folders in the folder pane

Categories

(Thunderbird :: Folder and Message Lists, enhancement)

31 Branch
enhancement

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: zanthea, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0
Build ID: 20141106120505

Steps to reproduce:

Would it be possible to provide an additional CSS class to all folders in the folder pane, e.g. by the name of the folders, to enable users/addons to individually style their appearance?

Problem: Our company needs to customize TB's stylesheet in order to highlight folders containing unread messages - more eye-catchingly than the default styling. Our list of accounts and folders is rather long and structured, and thus we often miss out on new mails that were filtered into their destination folders or subfolders, especially when the are collapsed.

However, since all list items in the folder pane use the same CSS class (treechildren:-moz-tree-cell[-text]) and since of course the number of folders may vary, it is nearly impossible to use child- or nth-of-type-selectors to control specific folders.
Severity: normal → enhancement
You could use View->Folders->Unread to not miss the unread messages.

The proposed enhancement can be done (we already use various classes to show different account icons, e.g. according to account type or whether the connection is ssl, or folder icons (e.g. trash)). I think also folders with unread messages already have their own class (actually tree property).

Do you have any more precise description of how it should work? What class names should be generated?
OS: Windows 7 → All
Hardware: x86_64 → All
Thank for your feedback. 

I know there's something like "hasUnreadMessages". My problem is that this property (if that's what it's called) applies to all parent folders alike, without differenciating between the levels. 
Thus if a folder in tree-level 6 contains an unread mail, then all 5 parental folders get the same property, i.e. highlighting folders with unread messages with a loud yellow background leads to 6 brightly shining folders.

Surely I have my own system and others might work differently. That's why I thought that in order to offer all users the best possible customization options, every folder could get a unique class:

Incoming box     (class="incoming_box")
.. Customers     (class="customers")
.. .. Smith Inc  (class="smith_inc")
.. .. Henderson  (class="henderson")
.. Private       (class="private")
.. .. Angela     (class="angela")
.. .. Mike       (class="mike")
See http://mxr.mozilla.org/comm-central/source/mailnews/base/util/folderUtils.jsm#55 for what properties we assign to the folders. You can distinguish "hasUnreadMessages-true" from "subfoldersHaveUnreadMessages-true". Also in base TB if a new message comes in, only its target folder is highlighed (in bold), not all the folder's parents. So I do not understand what the problem is with this base functionality.
And how will those unique folder properties help you? How will you know which folder to mark?
Folder classes equalling the folder name would help for a variety of things, like individually coloring specific folders, highlighting only certain target folders upon incoming messages, greying inactive or less important folders etc. 
How will I know which folder to mark? Well, knowing that my folder called "Orders" is rather important, and knowing that it has an identically named style class would enable me to explicitly highlight that folder.

I'll take a look at the link you provided, yet those properties don't offer the same possibilities as unique folder classes ...
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.