Closed Bug 978616 Opened 10 years ago Closed 9 years ago

Non-root subfolders with unread messages don't show up in "Unread Folders" view

Categories

(Thunderbird :: Folder and Message Lists, defect)

30 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 45.0

People

(Reporter: squib, Assigned: aceman)

References

Details

Attachments

(1 file)

In the new hierarchical Unread Folders view, folders with unread messages aren't shown if they aren't a root-level folder. That is, if you have a folder structure like this:

  Account
    Folder
      Subfolder
    Folder 2

And if Subfolder has one unread message, this is what you'll see in Unread Folders mode:

  Account
    Folder

We should fix this.
Blocks: 533775
That is strange, I think we even have a test for that scenario. I'll check it out.
Assignee: nobody → acelists
Actually, this might be because the folder I tried this with was a Draft folder. Do we not show those in Unread mode?
(It's still weird that we show the parent of the Draft folder and not the Draft folder itself, though.)
Yes, Drafts are specifically filtered out. I have not touched that behaviour.

let filterUnread = function filterUnread(aFolder) {
  1264           let currentFolder = gFolderTreeView.getSelectedFolders()[0];
  1265           const outFolderFlagMask = nsMsgFolderFlags.SentMail |
  1266             nsMsgFolderFlags.Drafts | nsMsgFolderFlags.Queue |
  1267             nsMsgFolderFlags.Templates;
  1268           return (!aFolder.isSpecialFolder(outFolderFlagMask, true) &&
  1269                   ((aFolder.getNumUnread(true) > 0) ||
  1270                    (aFolder == currentFolder)))
  1271         }

But then we should hide the parent folder.
I think showing the parent comes from the 'aFolder.getNumUnread(true) > 0' condition. Determining whether all the unread messages below it come from folders that are ruled out (Drafts, Templates, etc.) looks quite tedious (having to check all children of each folder - O(n^2)).
Do we want that?
I think it makes sense to show the parent folders like we do now, but I'd rather we simplify the logic and show outgoing folders with unread messages.

That said, I've never used the unread folders view, so we should probably get some feedback from other people to see what they like.
I'd agree we can include outgoing folders too, even if it's "Unread" in a different way.
As in dropping the whole !folder.isSpecialFolder(nsMsgFolderFlags.SentMail | nsMsgFolderFlags.Drafts | nsMsgFolderFlags.Queue | nsMsgFolderFlags.Templates) ?
Rethinking it, maybe not.
So where can we get some more feedback from users? :)
(In reply to :aceman from comment #10)
> So where can we get some more feedback from users? :)

Are you looking for "opinion" feedback?  perhaps -planning?
Or testing feedback?
Flags: needinfo?(acelists)
(In reply to Wayne Mery (:wsmwk, use Needinfo for questions) from comment #11)
> Are you looking for "opinion" feedback?  perhaps -planning?
> Or testing feedback?

I thought something from users what they actually need in this case. But this state was there since TB31 and I have seen no other bug report than this one.

From developers we could get some info if anybody remembers why special folders are excluded from showing in the Unread view.
Flags: needinfo?(acelists)
"we should probably get some feedback from other people to see what they like"

I use a personally-modified version of the Folder Pane View Switcher addon, which presents the different folder views as a dropdown element above the folder pane. As a consequence, I am a heavy user of different folder views, constantly switching between Unread Folders, Favorite Folders, and All Folders (both regular and compact view, which I did not even know existed until I did the modified addon!).

The Unread folders view is used to present a list of folders where you need to initially look at the items. Any folder that appears there that is not something you need to look at is a distraction. I've wanted a feature that allowed certain folders to be excluded from the Unread folders view. As a workaround, you can create a filter that automatically marks items read that appear in particular folders that you want to accumulate, but don't care to examine each message (such as a routine log listing).

That being said, I have an unread message in Drafts. Looking at it, it is a partially written message that I eventually started over, so this is a junk item. The proper action is to delete it. Since I am not a heavy user of the Drafts folder, most message that appear there are (accidentally) abandoned messages, and I want to notice them in Unread and delete them (or finish them). But I would imagine if I was a heavy user of the Drafts folder, messages that appear there would be messages I intended to finish, and therefore needing attention. So I don't see any reason to exclude the Drafts folder from the list of Unread folders.
OK, so sumamrizing the comments so far, can we decide to show Draft and Outgoing folders if they have unread msgs (but still not the Sent and Templates folders)?
Flags: needinfo?(richard.marti)
Flags: needinfo?(mkmelin+mozilla)
I'm not using the "Unread Folder", but someone using it, probably wants this to see easily which folders/messages he has to read. But the unread files in Draft and Outgoing are his own messages which are not fully processed and have, for me, nothing to do with the received unread messages from other people. The user should know what messages he started to type or what he wrote or are awaiting to send and thus not needs to read again. The unread messages in this two folders are more unprocessed messages than unread messages and are bold for remembering the user, he has still something to do (finishing or sending the messages).

To see this folders are different, try to read all unread messages with the space bar. The Draft and Outgoing unread messages aren't considered to be selected with the space bar.

I think, this two folders should still be the same handled as the Sent and Templates folders.
Flags: needinfo?(richard.marti)
I think we all agree unread in certain folders doesn't necessarily make sense. But, you can have unread in those in the all-folders view too, so it's probably little harm to do away with the special casing altogether for consistency.
Flags: needinfo?(mkmelin+mozilla)
Magnus, you rejected exactly this idea in comment 9 :)
Yes I know, but I don't recall why.
Attached patch patchSplinter Review
Does this work for you?
Attachment #8672315 - Flags: review?(squibblyflabbetydoo)
Status: NEW → ASSIGNED
Comment on attachment 8672315 [details] [diff] [review]
patch

Review of attachment 8672315 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me!
Attachment #8672315 - Flags: review?(squibblyflabbetydoo) → review+
OK, great :)
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/5835312e0bfca1a8f222ca5df4c34f3b1b6b4a20
Bug 978616 - do not exclude special folders from Unread folder view. r=squib
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 45.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: