Created attachment 375761 [details] [diff] [review] patch adding smart favorites folders Smart folders is almost there for me. One thing that would help the use case of "there are a few non-special folders that I want to keep track of, but I don't want to wade through the list" is if we can promote the Favorite folders to be a special smart folder. The patch attached seems to work for me. The only subtlety is changing the smart folder logic to look for multiple special folders, not just the first one. I don't think that should have any negative consequences for non-Favorite folders, but...
Note: the Favorites list isn't dynamic -- if you right-click on a folder,and make it favorite, it won't show up in this list until the folder pane is refreshed. I need to dig in to see if favoriting sends any notifications.
Created attachment 375766 [details] [diff] [review] Patch that updates the list dynamically revised patch.
Very nice. So I have a patch that gets rid of the top level smart folders account - I'm not sure if this patch conflicts with that or not, but I suspect it does, if only because now the smart folders are at the top level, and I guess favorites would be as well? What happens if a favorite is a special folder?
The patch likely conflicts, but i'm happy to rework this one after that one lands. (where is it again?). re: what happens if a favorite is a special folder, I could go either way. I'd likely include it in the list, as that way the user has control.
bug 490691 has the patch for getting rid of the top level smart folders.
Comment on attachment 375766 [details] [diff] [review] Patch that updates the list dynamically bug 490691 has landed, surely bit-rotting this one - canceling review request
Created attachment 378923 [details] [diff] [review] De-bitrotted patch
I tried this patch - unfortunately, I had made my imap inbox a favorite folder, and all my other folders are under the inbox, so all my imap folders showed up under favorites. For people with this setup, people are not going to want to make the Inbox a favorite folder. (It's not clear to me that we want sub-folders of favorite folders to be favorite folders, actually). So I quickly made my imap inbox *not* a favorite folder, and all the folders went away from under the Favorites folder, but they were still included in the search scope of the Favorites smart folder. In other words, you're rebuilding the folder pane view, but not rebuilding the scope of the favorites smart folder. The way I fix up the other smart folders when folders are added or removed is in nsMsgAccountManager, in the itemAdded/Removed notifications, because I have to do that for saved searches in general. For favorites, we could either do something similar but awkward in nsMsgAccountManager.cpp, or you could make rebuild have to regenerate the scope of the favorites folder, either by deleting the favorites folder (which would have the unpleasant side effect of losing things like sort order and cached search results), or clearing the scope and making rebuild smart enough to know that an empty scope should trigger a recalculation of the scope.
Comment on attachment 378923 [details] [diff] [review] De-bitrotted patch minusing based on search scope issues, and asking for a reconsideration of auto-including sub-folders.
Oh, and if a user has no favorite folders, we don't add a favorites smart folder, do we?
(In reply to comment #10) > Oh, and if a user has no favorite folders, we don't add a favorites smart > folder, do we? yes, we can leave it empty if there are none.
(In reply to comment #11) > (In reply to comment #10) > > Oh, and if a user has no favorite folders, we don't add a favorites smart > > folder, do we? > > yes, we can leave it empty if there are none. Just to continue on this more (for future work) it would be great to use our message view area (which would be empty when empty) for suggestions of favorite folder to add.
Not blocking, but wanted.
I'm not really working on these, so I'm freeing them up for a community member to take. (Filter on [ossifrage] to delete all the notifications.)