Closed Bug 475852 Opened 15 years ago Closed 15 years ago

GMail IMAP specific archive action

Categories

(Thunderbird :: Mail Window Front End, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b3

People

(Reporter: clarkbw, Assigned: Bienvenu)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [b3ux][m5][needs review standard8])

Attachments

(1 file)

coming out of bug 451995 comment 18

with the archive feature landed from bug 451995 we need to have a different command issued when the messages selected exist in a GMail IMAP account.

Archive in the GMail IMAP is actually a delete operation as the message continues to reside in the [GMail]/All Mail folder.  The delete command in the Inbox will act exactly as the Archive method in GMail.  The delete command in a sub-folder will remove the label from the message, the message still being available from All Mail.  

We should probably be handling the other actions like trash and spam differently as well.  Trash being a move to the [GMail]/Trash folder (localized - see bug 458770).  Spam being a move to the [GMail]/Spam folder.  I'll try to find other bugs for these.

http://mail.google.com/support/bin/answer.py?answer=77657&ctx=sibling
Flags: blocking-thunderbird3+
(In reply to comment #0)
> Archive in the GMail IMAP is actually a delete operation as the message
> continues to reside in the [GMail]/All Mail folder.

Why "message continues to reside in the [GMail]/All Mail folder" can be an evidence of "Archive in the GMail IMAP is actually a delete operation"?

> The delete command in the Inbox will act exactly as the Archive method in GMail.

What do you mean?
Why "delete command"(I guess you want to say "flag \Deleted") can be said "Archive method of Gmail"? 

In Gmail, all mail is labeled "All Mail"(presented as "[Gmail]/All Mail" to Gmail IMAP client) initially, and other label such as "Inbox"(presented as "Inbox" to Gmail IMAP client) is added.
Plase note that "[Gmail]/All Mail", "[Gmail]/Trash", and "[Gmail]/Spam" are very special folders in Gmail IMAP(very special label of Gmail). These folders act as if usual IMAP folder for Gmail IMAP client, e.g. "undo delete"(flag -\Deleted) works. And "copy/move mail among these folders"(COPY or COPY followed by flag \Deleted) has special meaning in Gmail IMAP and Gmail.
> Why "message continues to reside in the [GMail]/All Mail folder" can be an
> evidence of "Archive in the GMail IMAP is actually a delete operation"?

GMail doesn't really follow the IMAP spec.  A message that exists in the Inbox also exists in the [GMail]/All Mail folder, however with a different uid; making it look like a different message to Thunderbird.

> What do you mean?
> Why "delete command"(I guess you want to say "flag \Deleted") can be said
> "Archive method of Gmail"? 

Yes, for messages in the GMail Inbox setting the flag deleted works as "Archive".  This is only for message in the Inbox.

I'm confused about what else you're saying here. The link provided gives the GMail IMAP specifics as identified by them.
(In reply to comment #3)
> GMail doesn't really follow the IMAP spec.  A message that exists in the Inbox
> also exists in the [GMail]/All Mail folder, however with a different uid;
> making it look like a different message to Thunderbird.

Why "different uid:" in different "IMAP mail folder" can be violation of protocol called IMAP? From IMAP view, mail in different mail folder is different mail, and it SHOULD have unique ID(UID) in one IMAP mail folder.
Gmail's particularity/uniqueness is simply:
 (a) Single instance of mail, and multiple Gmail Label for the single instance.
 (b) Each "Gmail Label of Gmail Web interface" is presented to IMAP client
     as an IMAP mait folder.
Because of Gmail's particularity of (a) and (b), some funny phenomena for normal IMAP users can occur with Gmail IMAP.
  For example, Bug 450368 (See Dependency Tree for meta Bug 402793)
And, someone sometimes say it's violation of IMAP...  

However, why such particularity of Gmail & existence of "[Gmail]/All Mail" can have relation to current Tb's "Archive Feature"?
Current "Archive" does do following only, doesn't it?
 - Create folder hierarchy of Archives, Archives/yyyy, Archives/yyyy/yyyy-mm
 - Archive button moves mail to an Archives/yyyy/yyyy-mm folder.
 - When IMAP, "move mail" == "UID COPY Archives/yyyy/yyyy-mm" + "flag \Deleted"
Following is never "Archives folder" unique phenomenon, isn't it?
 - When Gmail IMAP, IMAP folder named "Archives/yyyy/yyyy-mm" corresponds to
   Gmail Label of "Archives/yyyy/yyyy-mm" at Gmail Web Interface. 
 - When Gmail IMAP, and when usual Gmail Label(Gmail IMAP folder),
   "flag \Deleted" is equivalent to "flag \Deleted + Expunge",
   if a new feature of Gmail Lab(to disable the Expunge) is not enabled.

> > What do you mean?
> > Why "delete command"(I guess you want to say "flag \Deleted") can be said
> > "Archive method of Gmail"? 
> Yes, for messages in the GMail Inbox setting the flag deleted works as Archive".
> This is only for message in the Inbox.

What do you mean by "flag deleted works as Archive" & "This is only for message in the Inbox"?
Next?
 - If a mail is held in Inbox folder of Gmail IMAP(i.e. Gmail Lable of "Inbox"
   is added to single mail instance), Gmail Label of "All Mail" is added to
   the single mail instance when "flag \Deleted" is issued to mail in Gmail
   IMAP mail folder of "Inbox" (i.e. For Gmail IMAP client, a mail in Inbox
   folder which is flaged \Deleted is moved to "[Gmail]/All Mail" folder).
 - Above occurs only on a mail in Gmail IMAP's "Inbox" folder.
> "flag deleted works as Archive" and "This is only for message in the Inbox"

Are you talking about "Archive" button/feature of Gmail's Web Interface, which is absolutely independent from "Thunderbird's Archive feature/button" and independent from "Gmail IMAP use via Thunderbird" itself?
If you are talking about "Archive" button/feature of Gmail's Web Interface, please check current behavior of Gmail.

Explanation of "Archive" by Google seems to be obsolete, or misleading.
> http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=6576
> Archiving moves messages out of your inbox and into All Mail
I can see next behaviour only.
  - When mail arrives at Gmail(or newly uploaded to Gmail via Gmail IMAP),
    both Gmail Label of "Inbox"(or uploaded folder name) & "All Mail"
    is added to single instance of the mail.
  - "Archive" button of Gmail Web Interface simply removes the Gmail Label
    at where the mail is displayed. (e.g. When "Inbox" is viewed, Gmail Lablel
    of "Inbox" is removed).
  - "Archive" button is available at "All Mails" too.
    I don't know behaviour of "Archive" button for "All Mail".
i.e. Gmail Label of "All Mail" is added since initial.
Difference between explanation of Gmail Help and observed behavior is possibly a result of internal spec change after release of Gmail/Gmail IMAP.
When using the IMAP interface moving a message to the [Gmail]/All Mail folder is equivalent to using the "Archive" button in the Gmail web interface. This can be though of as an alternate method to archive as deleting using the IMAP interface, which will also remove a message from the inbox or another folder (therefore remove a label in the web interface) but retain the message in the All Mail folder. Only by moving a message to the [Gmail]/trash folder will it be permanently deleted from all Gmail folders including the [Gmail]/All Mail folder.

Therefore, I would argue that you don't need special behaviour for Thunderbird's Archive and Delete buttons for Gmail. You simply need to set the Archive button to send the message to the [Gmail]/All Mail folder, and the Delete button to send the message to the [Gmail]/Trash folder.

However, there is problem in that the Archive button in Thunderbird doesn't simply send the message to the specified folder, but also creates a mandatory subfolder structure in which it saves the message: rootfolder/yyyy/yy-mm. In the case of Gmail, this will create subfolders in the [Gmail]/All Mail folder and when you use TB's archive button, the message will be moved to one of the subfolders. However, this will actually be a duplicated message since the message will also still be present in the [Gmail]/All Mail folder.

So what is really needed is simply more configurability of the Archive function. The use of the date-based subfolder structure should not be mandatory but rather an option. For a Gmail account, the option would simply need to be unchecked, so that all Archived mail goes to the specified folder directly (in this case [Gmail]/All Mail).

Once this is done, then the Archive and Delete/Trash buttons in Thunderbird will behave exactly in the same way as in the Gmail web interface.

Now it would also be nice if the full interface including tags instead of folders and conversation threads including sent messages could be replicated but that would be for another discussion, I guess.
(In reply to comment #7)
> When using the IMAP interface moving a message to the [Gmail]/All Mail folder
> is equivalent to using the "Archive" button in the Gmail web interface.

It's not equivallent, even though similar.
 - Gmail Web Interface : "Archive" button is "per mail thread of Gmail" feature
 - Gmail IMAP : "Move to '[Gmail]/All Mail'" is "per mail of Gmail IMAP" feature
There is no way to know UID at the IMAP folder(==Gmail Label) of all mails in the "mail thread of Gmail" to which the chosen mail belongs.
(In reply to comment #8)
> (In reply to comment #7)
> > When using the IMAP interface moving a message to the [Gmail]/All Mail folder
> > is equivalent to using the "Archive" button in the Gmail web interface.
> 
> It's not equivallent, even though similar.
>  - Gmail Web Interface : "Archive" button is "per mail thread of Gmail" feature
>  - Gmail IMAP : "Move to '[Gmail]/All Mail'" is "per mail of Gmail IMAP"
> feature
> There is no way to know UID at the IMAP folder(==Gmail Label) of all mails in
> the "mail thread of Gmail" to which the chosen mail belongs.

I agree it's not completely equivalent since it works on a message rather than conversation level. However, within the limitations of Thunderbird's IMAP view of Gmail it's close. My point is simply that it's not necessarily important to worry about delete/archive/trash differences between Gmail and standard IMAP servers, since single messages can be archived simply by moving them to the [Gmail]/All Mail folder and deleted by moving them to the [Gmail]/Trash folder. Also, Junk mail can be moved to the [Gmail]/Spam folder. So all these options are already present in the Account settings UI and could be set up this way by default when creating a new Gmail Imap account and this would bring the TB UI closer to what the Gmail web UI is like. The only problem at the moment is that the Archive feature always files archived messages in a subfolder structure rather than the specified Archive folder. I strongly urge modifying this behaviour to have an option to NOT use the subfolder structure so that for Gmail (or personal preference) all archived messages can go to a single folder as specified in the settings.

Also, as far as determining conversation threads, if I'm not mistaken (and of course I could be) aren't message UID's duplicated across folders when they are duplicates of the same message as considered by Gmail (which really just keeps one copy with multiple labels)? As such, isn't it technically possible to determine which duplicated messages are the same and use the folder structure as a way to indicate Gmail tags? Also, since all messages are duplicated in the [Gmail]/All Mail folder, couldn't the complete conversation thread be determined by looking at the threads within the all Mail folder? So if you did want the Archive button to behave like Gmail's, when you press the archive button, TB would find the matching message in the all mail folder, then make a list of all the other messages in that thread, then remove the matching messages from the folder in which Archive button was pressed (which would essentially remove that label from all messages in the conversation)?
> The only problem at the moment is that the Archive feature always files archived
> messages in a subfolder structure rather than the specified Archive folder.
> I strongly urge modifying this behaviour to have an option to NOT use
> the subfolder structure so that for Gmail (or personal preference)
> all archived messages can go to a single folder as specified in the settings.

It's simply a general enhancement request of "capability to choose archive folder" instead of "Gmail IMAP specific archive feature like Gmail's archive button", isn't it.

Questions.

Although initial Gmail's "Archive button" seems to be "move conversation thread to 'All Mail' folder from other Gmail folder such as Inbox", current Gmail's design/spec/implementation looks to be different.
  Any "conversation thread at Gmail" is saved in "All Mail",
  and Gmail Lablel such as "Inbox" is added to the "conversation thread".
  Then current Gmail's "Archive button" can be said "button which removes the
  added Gmail's Label form the conversation thread".
So I consider that Gmail's "Archive button" and Tb's "archive feature" are completely different feature which has same name.
What do you think? 

(Quick test result)
 - A Gmail conversation thread has 3 mails(say mail-1 to mail-3)
   The conversation thread has three Gmail Labels(say label-1 to label-3)
 - Gmail IMAP view:
   - "label-1" folder : mail-1, mail-2, mail-3
   - "label-2" folder : mail-1, mail-2, mail-3
   - "label-3" folder : mail-1, mail-2, mail-3
 - Delete mail via Gmail IMAP. (equivalent to "move to 'All Mail'")
   - "label-1" folder : mail-1                 (mail-2, mail-3 are deleted)
   - "label-2" folder :         mail-2         (mail-1, mail-3 are deleted)  
   - "label-3" folder :                 mail-3 (mail-1, mail-2 are deleted)
   Note: This status is same even after restart of Tb, rebuild index.
 - Gmail's view of Gmail's Label after delete via Gmail IMAP:
   - label-1 : 3 mails (mail-1, mail-2, mail-3)
   - label-2 : 3 mails (mail-1, mail-2, mail-3)
   - label-3 : 3 mails (mail-1, mail-2, mail-3)
Above difference is a result of difference between "per conversation thread(Gmail)" and "per mail(Gmail IMAP)".

If Tb's "archive" will be changed to "move to 'All Mail' when Gmail IMAP", I think user's confusion will become severer than current.
What do you think?
Can we have an option to disable the automatic creation of sub-folders in the archive folder? This is an issue for Gmail where the "correct" behaviour for Archive would be to move the message to the [Gmail]/All Mail folder. However, the present behaviour will create sub-folders in [Gmail]/All Mail instead, moving the message there, which effectively creates a new label and duplicates the message rather than  archiving it. An option to simply move all Archived mail to the specified folder would fix this. This could set to be on by default for Gmail IMAP account creation, but off by default for all other account types if size of folder is an issue.
Whoops, please ignore my last comment. I thought I was commenting in another bug not realizing it brought me back here. I don't know how to delete it.
> It's simply a general enhancement request of "capability to choose archive
> folder" instead of "Gmail IMAP specific archive feature like Gmail's archive
> button", isn't it.

See below. But I think basically it would be preferable regardless to simply have more configurability over the Archive feature in TB3. In particular I want the ability to disable the auto-creation of subfolders and store all archived messages in a single, specified folder. Additional options could also be added though, such as specification of how often to create automated subfolders if you wish to us that feature. Maybe you want 1 a year or 1 every 3 months. From what I understand skimming through the original bug, this behaviour was added due to issues with very large folders on some IMAP servers. So in terms of configuration options, it might be useful to have both date-based and size-based autocreation of subfolders. Eg. start a new archive folder when current folder exceeds 500 MB. But for servers like Gmail where folder size isn't an issue, one should be able to simply disable the autocreation of sub-folders.

Also note the original description in this thread appears to be requesting for the Archive button to behave differently specifically for Gmail accounts, where it would essentially act as a delete/expunge button rather than a Move to Archive Folder button (it's canonical behaviour). Thus the original poster does seem to be okay, as am I, with the idea of archiving individual messages rather than whole discussions. I'm simply pointing out that the Archive mechanism does NOT need to behave differently for Gmail than from any other mail server (if we're talking about a per-message behaviour) since moving a message to the [Gmail]/All Mail folder will have the equivalent effect as delete/expunge as far as Gmail is concerned.

Now the issue of message vs. conversation and how TB behaves relative to Gmail Web is another issue and maybe should even be the subject of a new bug form(?):

> Questions.
> 
> Although initial Gmail's "Archive button" seems to be "move conversation thread
> to 'All Mail' folder from other Gmail folder such as Inbox", current Gmail's
> design/spec/implementation looks to be different.
>   Any "conversation thread at Gmail" is saved in "All Mail",
>   and Gmail Lablel such as "Inbox" is added to the "conversation thread".
>   Then current Gmail's "Archive button" can be said "button which removes the
>   added Gmail's Label form the conversation thread".
> So I consider that Gmail's "Archive button" and Tb's "archive feature" are
> completely different feature which has same name.
> What do you think? 
> 
> (Quick test result)
>  - A Gmail conversation thread has 3 mails(say mail-1 to mail-3)
>    The conversation thread has three Gmail Labels(say label-1 to label-3)
>  - Gmail IMAP view:
>    - "label-1" folder : mail-1, mail-2, mail-3
>    - "label-2" folder : mail-1, mail-2, mail-3
>    - "label-3" folder : mail-1, mail-2, mail-3
>  - Delete mail via Gmail IMAP. (equivalent to "move to 'All Mail'")
>    - "label-1" folder : mail-1                 (mail-2, mail-3 are deleted)
>    - "label-2" folder :         mail-2         (mail-1, mail-3 are deleted)  
>    - "label-3" folder :                 mail-3 (mail-1, mail-2 are deleted)
>    Note: This status is same even after restart of Tb, rebuild index.
>  - Gmail's view of Gmail's Label after delete via Gmail IMAP:
>    - label-1 : 3 mails (mail-1, mail-2, mail-3)
>    - label-2 : 3 mails (mail-1, mail-2, mail-3)
>    - label-3 : 3 mails (mail-1, mail-2, mail-3)
> Above difference is a result of difference between "per conversation
> thread(Gmail)" and "per mail(Gmail IMAP)".
> 
> If Tb's "archive" will be changed to "move to 'All Mail' when Gmail IMAP", I
> think user's confusion will become severer than current.
> What do you think?

I see what you're saying and I agree that this could be the cause of some confusion for some users. In truth, while I think I've understood this I've never fully appreciated it mostly because I tend not to use Gmail's Web interface nearly as much as I use Thunderbird to access Gmail through IMAP. I have a number of different accounts I like to consolidate in one place which TB makes easy to do, while Gmail's ability to consolidate or even open multiple Gmail based accounts simultaneously is severely limited. As such I tend to use Gmail's Web interface only when I don't have TB available or sometimes I find it convenient for searching and maintenance. However, because I'm more accustomed to using TB and there is a fundamental difference in the way messages are handles, especially in the lack of the full Gmail discussion based model, I simply come to expect that the behaviour of the web interface and the TB interface differ. As such I do tend to use the Gmail philosophy of archiving rather than deleting, but I tend to think of archiving on a per-message basis anyway. Up until now I've simply used to the Delete button to archive a message in TB and moved a message to [Gmail]/Trash when I want to delete it. I have to remind myself when on the Web interface that "Delete" means something else... This is why I like the new Archive button as it allows me to setup Archive to do what Delete used to do, then setup Delete to actually move a message to the Trash folder, which at least makes the meaning of Delete and Archive in the Web interface more-or-less the same as in TB, avoiding the possibility of making a huge mistake.

I don't have a sense as to how confusing the message vs conversation aspect will be to other users. Maybe others can pipe in. Also note that "Archive" is actually only used as a term in Gmail's web interface when in the Inbox. If you are in a "folder", which in Gmail's interface is really just a search for messages with a particular label, then the "Archive" button is changed to "Remove label ...". 

Now the question I have is how well does TB's thread feature match up with Gmail's discussion feature? So, in other words, if I use the threaded view in TB and go to the [Gmail]/All Mail folder and pick a thread, will it contain the exact same messages as appear in the same discussion in Gmail's Web interface?

If so, this could possibly solve the issue of Archiving messages vs. discussions. Because if the TB threads do match the Gmail discussions, it should be possible for TB to automatically perform an Archive operation on all messages in the same thread as the currently selected message. 

Now note that the full thread will only be visible in the [Gmail]/All Mail folder since that is the only folder that will contain copies containing any label as well as the sent messages. In any other folder, the thread will contain only the messages that have the Gmail label equivalent to that folder. However, since the Archive function while viewing a particular label in Gmail is the equivalent of simply removing the label from all messages in that discussion, then moving the entire thread in a label folder to the Archive folder should have the same effect. In fact, one could do this manually by using the threaded view, then rather than clicking on the Archive button, clicking on the thread button in the message list. This will select the entire thread, then you can use the 'A' shortcut or the menu to Archive the entire thread, effectively removing the label from that thread, without otherwise affecting other labels or actually deleting the thread from the server.

So therefore one could have the Archive button simply archive not only the selected message, but all other message in the same folder that belong to the same thread.

What do you think?

I do think this should be a configurable option as some people may prefer to tread Gmail as a more conventional IMAP server and operate on a per-message basis. So there could be an option in the Archive folder setup to archive individual messages or threads. Or probably better would be to have 2 separate buttons, one to archive only the selected message, the other to Archive the thread. 

On a more general note, if we really want to create less confusion between the web interface and TB's interface, it would be nice if Gmail could be treated as a special case as opposed to a generic IMAP server, so that TB would fully emulate the behaviour of the web interface. I believe this is doable by using the message ID which is unique to each message but not duplicates of messages in different folders. Thus the All Mail folder would be treated as the master database, and only headers of the other folders would have to be maintained as a way to determine which messages have which labels. Then things could be presented in a Gmailish way, with labels per conversation, all conversation messages shown in each thread, Archive/Delete/Spam buttons behaving appropriately, etc. However, that's not exactly a trivial undertaking and maybe is best left as an extension. Although given the prevalence of Gmail, it may make some sense to have this functionality in the core application.
(For issues around "Delete" & Gmail IMAP)
Magritte, please read Bug 400931 Comment #20 for some ideas to improve (Bug 400931 is request of "Account Wizard for Gmail IMAP").
See also Dependency tree for meta Bug 402793, with "Show Resolved".
I looked at the other threads and there are some good ideas there. But nothing that really address what was discussed here re: archiving complete threads or the more general suggestion to do a full-on Gmail interface emulation that would include translation between IMAP folders and TB tags and a complete thread view including all thread messages regardless of which folder is selected.

A really good implementation of Gmail in TB could really increase its usage. I believe syncing of Calendar and Contacts should already be possible using CalDAV and SyncML and if there were an option to make Contact and Calendar functionality mirror Google's exactly we'd have a really functional online/offline Google client. Maybe Google can help out or provide an API to simplify this, although given their own emphasis on Gears I'm not sure how cooperative they would be.
Assigning to Bryan, as I think this needs a UI decision before it can move forward.
Assignee: nobody → clarkbw
Whiteboard: [b3ux]
taking, we need to get this right
Status: NEW → ASSIGNED
Whiteboard: [b3ux] → [b3ux][m3]
I think following is sufficient.
(1) User selectable archive folder (already implemented)
(2) Option for flat archive folder (Bug 486827)
If "[Gmail]/All Mail" is selected by (1), and flat option is used by (2), "archive of Tb" will move any mail to "[Gmail]/All Mail".
Note: As I wrote, Gmail like "Archive of all mails in conversation thread" is impossible unless enhancement by Gmail/Gmail IMAP will be implemented.
The goal here is to make the Thunderbird interface to GMail match pieces of the GMail user experience such that users who switch back and fort between the two interfaces do not feel like Thunderbird has done something wrong.

GMail (via the web interface) doesn't allow you to Archive mail that is not in the Inbox.  The Archive action is only available to a conversation where at least one message is tagged to show in the inbox.  I'm not sure how we're going to handle this, we have a couple options; though we need to consider the technical concerns as well.  i.e. Do we know when we're looking at a message in a folder that it also exists in the Inbox?

We could only display the Archive button in the Inbox and hide it in sub-folders.  Or we could always display the button and try to archive the message if we can.  Because the Archive won't actually succeed in a GMail label / Thunderbird folder I'm not sure we should make it available at all.  In a regular IMAP system you could archive from a sub folder and all the messages would be moved to the Archives folder and this is the experience I believe our users want.  The GMail equivalent just doesn't exist.

We don't want to create our folder structure inside GMail as the end up being labels with sub-labels, especially with our current year/month scheme.  So we will likely need some kind of option for a single/flat folder archive system as bug 486827 suggests.

However Thunderbird needs to auto-detect GMail, during account setup or possibly upgrading, and ensure that the archive system matches what users will expect from GMail.  We do not want a system of options that allow our users to achieve harmony with the GMail experience unless we auto-detect those options.  For instance the correct Archive folder should be automatically chosen from GMail IMAP without user intervention.

As for archiving of Conversations vs. Messages I believe we are going to allow both.  Thunderbird, probably isn't, but should be using the threaded view by default, such that people can see a whole thread and either archive every message or the complete thread.  This isn't as nice as the GMail interface but I don't think we can make the assumption that a person archiving a single message via Thunderbird wants us to search for other messages in the thread and automatically archive those as well.  Archiving a single message in a thread that isn't archived can lead to some user confusion but I don't think we want to go down the path of trying to solve that problem.
I disagree that Gmail only allows Archiving from the inbox. It only calls it "Archive" in the inbox, but Archiving is also allowed when you select/search for any label. In this case Gmail renames the "Archive" button to "Remove xxxxx label" or something to that effect. However, the effect is the same, which is to remove it from that "folder" (where in Gmail a folder is just a search on a label) but preserve it in the "All Mail" folder. Note also, that if a message is tagged with multiple labels (which may or may not include "inbox") archiving from one label "folder" will not remove it from the others. So a message that's still in the inbox but also labeled "important", if you click on the "important" label link on the left, then highlight the message and click on the "remove important label" button, the message will still be in the Inbox. 

As such, this behaviour is equivalent to moving a message from ANY IMAP folder to the ]Gmail]\All Mail IMAP folder. If a message contains multiple labels, it will be duplicated in multiple IMAP folders/subfolders and moving the message from any one folder to the [Gmail]\All Mail folder will not remove it from the other folders. This is essentially consistent with how Gmail works and will, in fact, be interpreted by Gmail as having simply removed a label from that message. 

As such, so long as there is an option (or automatically in the case of Gmail accounts) to use a flat folder for Archiving, which can be set to [Gmail]\All Mail, then the Archive button should behave reasonably consistently with its Gmail counterpart. The only issue at the moment is the forced use of date-based subfolders, which creates unnecessary labels and duplicate e-mails within the Gmail/IMAP system since by its design, any mail in the archived subfolder will also exist in the main archive folder. 

The only thing you might change is to have the text on the Archive button change within a Gmail account in a way similar to the Gmail web interface. i.e. "Archive" while in the inbox, but "remove xxxxx label" while in folder xxxxx or "remove from xxxxx to Archive" or something to that effect. However, the length of such text may not really work within the interface. It's probably best to just leave it as "Archive" and assume the user can figure it out. You could add additional text in a tooltip which will pop-up when the cursor moves over the Archive tool.

The other issue about archiving individual messages versus conversations: I agree it should at least be an option to Archive individual messages. There could be 2 buttons: Archive, and Archive Thread. Many people don't really like Gmail's conversation view and have requested Google add an option to disable it. So for those who use Gmail primarily as n IMAP server, they may prefer to deal with individual messages. But for those who really like the conversation view, archiving threads may make more sense and seems doable based on Thunderbirds own threading model. This model essentially differs from Gmails in that it does not include sent mail, or mail from other folders that are involved in the thread. Gmail consolidates mail regardless of location/label, which is why it uses the concept of labels and archiving at a conversation level rather than an individual message level.

However, archiving a thread within a folder may be a reasonable compromise. Potentially better is to implement a true Gmail-like interface where threads are aggregated from all folders, or folders are done away with altogether and simply used as a way to determine which labels are currently applied. Presumably this is a much more significant endeavour and unless its undertaken I think simply having an Archive and Archive Thread button present in all folders, which sends all archived mail directly tot he [Gmail]\All Mail is probably the simplest but most consistent way to deal with this using the current interface.

Maybe we need to be petitioning Google to improve their IMAP implementation or add an additional API to simplify creating a Gmail-like interface in 3rd party clients.
How about Gmail/Gimap enhancement like next for unique-id of { (conversation seq number) + (mail seq number in a conversation) } in a Gmail account?
  (a) "X-Gmail-Conversation: conversation=ccc,mail=mmm" header
      - Download only(fetch time only)
      - Ignore when mail upload(when append by IMAP client)
        (auto-sync should care for this?)
  (b) Special IMAP flag(keyword) such as "\GMAIL-CONVERSATION-ccc-mmm"
      for each mail. (Tb should inhibit creation of tag named "GMAIL-...")
  (c) X-GMAIL-CONVERSATION extension (X-LIST like extension of IMAP) : 
      - uid nnn GET_CONVID => CONVERSATION=ccc,MAIL=mmm
      - CONVID ccc LIST_MAILS
        => Gmail-Labal-1(=Gmail IMAP folder)/uid-1, ..., Gmail-Labal-N/uid-P
      - CONVID ccc MOVE_TO "folder_name",
        without "select" command for specific IMAP folder (status command like)
        (folder_name : one of [Gmail]/All Mail, [Gmail]/Trash, [Gmail]/Spam)
  
Becauese of Gmail's great duplicate mail check algorithm, I think it's also very useful for DUP'ed mail check by IMAP client. (Currently, duplicated upload mail is silently deleted&expunged by Gmail/Gimap after append by Tb).

I pefer (a), because I can see it by View/Message Source only, and because any add-on can see it easily.
Depends on: 486827
(In reply to comment #20)
> I disagree that Gmail only allows Archiving from the inbox. It only calls it

Ah right, good point.  I think we can keep the archive button with the same text in the sub folders then.  The message will be moved out of the folder when Archive is selected so the effect is inline with user expectations.

I marked the flat folder option as blocking.  I'll also be creating a bug for detecting GMail from IMAP so we know when to make this switch.

Moving over to bienvenu, throw this back if you feel it's still undefined.
Assignee: clarkbw → bienvenu
No longer depends on: 486827
Whiteboard: [b3ux][m3] → [b3ux][m4]
pushing this out to m5 as m4 is tomorrow at midnight
Whiteboard: [b3ux][m4] → [b3ux][m5]
adding blocked by the flat folder option.
Depends on: 486827
I think this is going to be straightforward after bug 476260 lands.
Priority: -- → P2
Depends on: 476260
Attached patch proposed fixSplinter Review
with the patch for bug 476260 applied, this patch makes it so we do flat granularity archiving for gmail imap, so archives are a move to the all mail folder. In my limited tests, gmail does the right thing - if the message already was in all mail, you only get a single copy in all mail, and the message is removed from the tag folder. In theory, we could simply remove the tag for non inbox folders, but this is more straightforward.
Attachment #375838 - Flags: review?(bugzilla)
This didn't work for me - I tried in Inbox and All Mail, and both times it created a multi-level archives folder.
if you look in the config editor, do we have is_gmail set for your gmail server?
Whiteboard: [b3ux][m5] → [b3ux][m5][needs review standard8]
Attachment #375838 - Flags: review?(bugzilla) → review+
Comment on attachment 375838 [details] [diff] [review]
proposed fix

Looks good. r=Standard8.

Not sure if we want to do anything about the fact the user can go into account settings and change their archive folder settings for gmail - I guess its probably not an issue?
fix checked in.

Part of me thinks we should hid the folder picker UI for gmail (trash, and sent/archive/), except that the user could pick a local folder. cc'ing Bryan for his thoughts.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Do we have a way to wrap them with a warning dialog somehow?  This is a situation where I think a dialog "speed bump" is the right thing to do.  I'd worry about not allowing people to change the default folder but it would be good to prompt them.

e.g. "These are the auto-detected settings for GMail, only change if you know what you're doing" ( Yikes! Cancel ) ( I live on the edge )
Depends on: 640342
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: