Last Comment Bug 660211 - There is no way to save a custom message list column layout (as standard for new folders) nor apply columns to virtual folders or newsgroups
: There is no way to save a custom message list column layout (as standard for ...
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Folder and Message Lists (show other bugs)
: 3.1
: All All
: -- normal with 2 votes (vote)
: Thunderbird 22.0
Assigned To: :aceman
:
:
Mentors:
http://www.thunderbird-mail.de/forum/...
: 576528 834571 854847 (view as bug list)
Depends on:
Blocks: 505035 834571
  Show dependency treegraph
 
Reported: 2011-05-27 05:19 PDT by David.P
Modified: 2013-10-25 11:23 PDT (History)
15 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch (2.57 KB, patch)
2013-03-29 10:45 PDT, :aceman
bugmail: review+
Details | Diff | Splinter Review

Description David.P 2011-05-27 05:19:37 PDT
User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20100101 Firefox/5.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10

A custom column layout can be created and applied to most folders, but not to virtual folders (aka search folders).

Therefore, for every (old or new) search folder, one's preferred column layout has to be re-created manually.

Reproducible: Always

Steps to Reproduce:
1. Create a custom column layout
2. Apply your custom column layout to "all folders and subfolders" of a mail account (that also has virtual folders) 
3. Virtual folders (search folders) of this account will still be in default layout

Actual Results:  
Virtual folders (search folders) of any account are always created in default layout, and remain such unless manually changed one by one.

Expected Results:  
Virtual folders (search folders) should inherit a custom layout that is applied to "all folders and subfolders" of the respective mail account
Comment 1 David.P 2011-05-27 05:27:19 PDT
Missing feature:  
It should be possible to create and save a custom column layout that in turn is applied automatically to every new folder, including virtual folders (search folders).
Comment 2 [:Aureliano Buendía] 2011-06-05 03:24:20 PDT
*** Bug 576528 has been marked as a duplicate of this bug. ***
Comment 3 J C 2011-06-07 07:33:40 PDT
Please note that the original bug report (https://bugzilla.mozilla.org/show_bug.cgi?id=505035) had 74 votes, so this is something a significant number of people want.
Comment 4 :aceman 2013-02-20 12:15:16 PST
When implementing bug 505035, asuth set this to only work on folders into which messages can be filed by the user (So POP3, IMAP4, RSS, Local Folders).

I'd like to ask if that was intentional? Maybe, because Virtual folders could have a different layout to normal folders. E.g. at least by default they add the Location column.

Technically the columns settings can be copied to virtual folders and also newsgroups if we expose the accounts/folders in the menu.

So the question is how to implement this:
1. allow to apply columns unconditionally to any folder selected and its children, regardless of type. So e.g. copy columns from POP3 folder to Virtual folder or newsgroup.
2. allow to apply columns only to folders of the same type (type being in [normal, virtual, newsgroup] or based on the server type) skipping folders in the selection that do not match. So when copying from POP3 folder to another POP3 account and choosing all folders, Virtual folders there will be skipped.
Comment 5 Andrew Sutherland [:asuth] 2013-02-20 12:43:27 PST
(In reply to :aceman from comment #4)
> When implementing bug 505035, asuth set this to only work on folders into
> which messages can be filed by the user (So POP3, IMAP4, RSS, Local Folders).

I don't see anything in my patch on bug 505035 that limited the type of folders we apply things to.

Now, for deciding whether to inherit columns or not from the Inbox when you enter a folder, we definitely do blacklist certain cases.  This is determined by to doNotInherit flag which has its rationale in a comment:
https://mxr.mozilla.org/comm-central/source/mail/base/content/folderDisplay.js#478

If applying the config to virtual folders isn't working, I think it's a bug or some emergent property of virtual folders.  Make DBViewWrapper._prepareToLoadView is being called at the wrong time, or not firing?
Comment 6 :aceman 2013-02-20 13:02:07 PST
(In reply to Andrew Sutherland (:asuth) from comment #5)
> I don't see anything in my patch on bug 505035 that limited the type of
> folders we apply things to.
It is the mode="filing" on the folder picker. Virtual and news folders can't be filed to. And then in MailUtils.js::setStringPropertyOnFolderAndDescendents() you also exclude !folder.canFileMessages.

> If applying the config to virtual folders isn't working, I think it's a bug
> or some emergent property of virtual folders.  Make
> DBViewWrapper._prepareToLoadView is being called at the wrong time, or not
> firing?

I was talking about the applying from threadPaneColumnPicker.xml and said that applying columns to virtual and news folders DOES work for me.

So the question is which folders to expose in the threadPaneColumnPicker folder picker (apply columns to...) and if to skip some when applying columns.
Comment 7 Andrew Sutherland [:asuth] 2013-02-20 13:22:54 PST
(In reply to :aceman from comment #6)
> (In reply to Andrew Sutherland (:asuth) from comment #5)
> > I don't see anything in my patch on bug 505035 that limited the type of
> > folders we apply things to.
> It is the mode="filing" on the folder picker. Virtual and news folders can't
> be filed to. And then in
> MailUtils.js::setStringPropertyOnFolderAndDescendents() you also exclude
> !folder.canFileMessages.

Ah, I should have found the mercurial link instead of looking at the diff; they're not the same!  (There were a lot of messages in that bug... :)

I think my intent in using canFileMessages was to skip over \NoSelect IMAP folders.  Virtual folders and news folders being excluded were an unintentional side effect.  Specifically, my comment was "// skip folders that can't hold messages, no point setting things there." which makes me think I was treating canFileMessages as an indicator of whether there could be messages in a folder or not, rather than what it actually means.

I 100% agree that we want those settings to be able to apply to virtual folders and news folders.  Ideally we would use whatever our proxy for \NoSelect is, but otherwise it seems fine to put useless properties on those rather than short-change virtual folders/news folders.  I think we can have NNTP fake-server accounts now, so all of this should be testable?
Comment 8 :aceman 2013-03-28 04:59:20 PDT
*** Bug 854847 has been marked as a duplicate of this bug. ***
Comment 9 :aceman 2013-03-29 10:45:55 PDT
Created attachment 731215 [details] [diff] [review]
patch
Comment 10 Andrew Sutherland [:asuth] 2013-03-29 10:56:42 PDT
Comment on attachment 731215 [details] [diff] [review]
patch

r=asuth by inspection
Comment 11 :aceman 2013-03-29 11:02:27 PDT
Thanks.
Comment 12 :aceman 2013-03-29 11:03:36 PDT
*** Bug 834571 has been marked as a duplicate of this bug. ***
Comment 13 Ryan VanderMeulen [:RyanVM] 2013-03-29 11:52:52 PDT
https://hg.mozilla.org/comm-central/rev/006a18264170
Comment 14 Mitra Ardron 2013-10-25 11:23:51 PDT
Which bits of this bug are fixed? There are several cases described above, the one I'm particularly concerned about - that Search Folders (as created when you click "Open email as list" don't remember your preferred column layout and have to be edited each time (e.g. to add Location, or switch From to use Correspondant (from the SHowInOut extension) both of which are often relevant when you are searching). 

Since this bug is marked as Fixed, and its not 100% clear its the same issue, I believe I'm supposed to file a new bug - which I've done Bug #931118

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