Closed Bug 314124 Opened 19 years ago Closed 18 years ago

Folder Pane Popup over folders with unseen messages

Categories

(Thunderbird :: Mail Window Front End, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird2.0

People

(Reporter: mscott, Assigned: Bienvenu)

References

Details

Attachments

(6 files, 3 obsolete files)

When you hover over a folder which has unseen messages in it, it would be nice if we had a tooltip that showed you the subject, sender and maybe the first line of text for each of the messages.

This allows you to peek at what's in a folder without opening the folder and losing your place in the 3-pane.
Status: NEW → ASSIGNED
Target Milestone: --- → Thunderbird2.0
Attached patch work in progress (obsolete) — Splinter Review
functional work in progress. Rough to do list includes:

1) cropping doesn't work right now. Need to figure out how to crop the subject if it gets too long
2) am currently re-using the subject as the "msg body line"
3) consider dynamically adding the hdr rows to the popup instead of having a fixed number.
4) folders already have a tooltip when their name gets cropped in the folder pane and this popup. We need to supress that tooltip when we are showing the msg summary popup.
Attached patch backend work in progress (obsolete) — Splinter Review
This adds a new method to nsIMsgFolder, fetchMsgPreviewText, which causes the "preview" property of the passed message headers to get populated with our best guess as to the first 255 chars of the message body.

This is a very rough draft, and the code is going to get re-arranged when I figure out how to implement it for IMAP (much of this will probably go into nsMsgDBFolder). But it actually works for local folder plain text, html, and multi-part alternative messages right now.

An other big todo is how to deal with encoded message bodies, like quoted printable, and non-latin1 encodings, which will involve paying attention to the charset and content-transfer-encoding, I think.
Attachment #201072 - Attachment is obsolete: true
Use handlers for popupshowing and popuphiding instead of custom methods in the XBL widget. Make the popup dynamically generate the msg lines. Currently we'll create up to 8 messages inside the popup but that can be changed easily.

Remaining big issue is to make the subject crop.
Attachment #201718 - Flags: superreview?(mscott) → superreview+
I hope you will allow this feature to be disabled; a hidden pref would be sufficient.  I don't like wordy tooltips.
i've modified my front end patch to leverage David's new API for inserting the preview text.
This gets us far enough along to land this on the trunk so we can start playing around with it.

I had to force cropping to happen on the subject and the preview text by insiting on an arbitrarily chosen max width for the tooltip. This value works good for me but based on font size and other variables, may not work so well for you. But it's a starting point.

I also had to tweak the parsing code you added last night. NS_ReadLine removes the new line delimiter so some words were getting merged together if the only thing separating them was the line delimiter. I decided to convert line endings to spaces.

This means that the following text:

Hello there,
test

will look like the following in the tooltip
Hello there, test...
Attachment #201220 - Attachment is obsolete: true
Attachment #202323 - Flags: superreview?(bienvenu)
Attachment #202322 - Flags: superreview?(mscott) → superreview+
Comment on attachment 202323 [details] [diff] [review]
updated front end patch

can you fix this?

 }
\ No newline at end of file
+
Attachment #202323 - Flags: superreview?(bienvenu) → superreview+
David, I just checked in the front end changes so we can start experimenting with this now. 
This adds support for fetching the body preview from the imap server. It also gets rid of some unused and dup code, makes it so the folder tips don't leave a bunch of db's open, and included a patch for an imap race condition that's part of an other bug...
Attachment #202838 - Flags: superreview?(mscott)
Comment on attachment 202838 [details] [diff] [review]
add support for imap

Should:

pref("mail.showPreviewText", false);

be an imap only pref since it only effects imap?

i.e. mail.imap.showPreviewText
Attachment #202838 - Flags: superreview?(mscott) → superreview+
That preference shouldn't *only* affect IMAP.
Mike is right, my intent was to extend use of that pref to allow the user to turn off showing preview text all over. 
most recent patch checked in, pref defaulted to off for now.
*** Bug 313028 has been marked as a duplicate of this bug. ***
version 1.6a1 (20051201) using IMAP

Great feature, but....

The tooltip doesn't always appear - due to using IMAP perhaps (server too slow?) - but when it does, _all_ Unread messages get marked as Read.
The tool chip is not displayed with the folder of non-ascii(japanese). 

Mac OS X 10.3.9
1.8branch NB build version 1.5 (20060205)
I've landed all this work in progress on the 1.8.1 branch. It should be turned off by default, like it is on the trunk.
Thunderbird ID:2006020704 (mozilla1.8)

This feature is enabled by default, and no way to disable
(even mail.showPreviewText is set to false).
(In reply to comment #20)
> Thunderbird ID:2006020704 (mozilla1.8)

... and running on WindowsXP SP2.  Installed via
installer (not a zipball).

${Thunderbird_Installed_topdir}\defaults\pref\mailnews.js doesn't
have "mail.showPreviewText" line that is mentioned in the patch.
I'll try to figure out why it would be disabled on the trunk but not the branch by default. I must have missed a checkin...
Assignee: mscott → bienvenu
Status: ASSIGNED → NEW
Thunderbird ID:2006020806 (mozilla1.8 branch, WindowsXP)

The "mail.showPreviewText" value is shown in about:config editor; maybe
the nightly buildbox doesn't update source files until then.  Seems ok.

However, even if this value is set to false (this is the default value),
"unseen messages" tooltip appears.

As mentioned in Comment #18, it seems that if message body starts with
non us-ascii characters, those characters are shown as bare us-ascii
characters.  Note that this occurs only in message body; Subject: line
is ok (and I don't know about From: line since I have never received
email that contains non-ascii characters in From: line).
> Note that this occurs only in message body; Subject: line
> is ok (and I don't know about From: line since I have never received
> email that contains non-ascii characters in From: line).

I've tested with newly created message, and confirmed that non-ascii chars
in From: line shows correctly.  Only message body that shown in a wrong
font or something.
Scott, remember the weird intermittent problem you were seeing where a new message would come into an imap folder, but when you opened the folder, the message was already marked read, and the folder got confused about whether it had unread messages or not? This should fix that.
Attachment #211421 - Flags: superreview?(mscott)
Attachment #211421 - Flags: superreview?(mscott)
Attachment #211421 - Flags: superreview+
Attachment #211421 - Flags: branch-1.8.1+
There is a similar bug where the article count of a newsgroup will be decremented
when the group-name tooltip pops up.  (This happens when hovering the mouse over
the name of a newsgroup which is too long to display.)  This has nothing to do
with IMAP, of course, so your patch unfortunately didn't fix it.
(In reply to comment #26)
> There is a similar bug where the article count of a newsgroup will be
> decremented when the group-name tooltip pops up.  (This happens when 
> hovering the mouse over the name of a newsgroup which is too long to
> display.)

Someone recently opened a bug about this problem with newsgroups, which I saw 
(and I think I confirmed) but I can't locate.  The problem isn't only for newsgroups that have a shortened-name tooltip -- hovering over *any* newsgroup with unread, undownloaded messages causes the groupname to change its unread count; if none of the unread messages have been downloaded, the groupname loses its boldness and count.
last fix checked into trunk and branch, and yes, it has nothing to do with news.
Thunderbird ID:2006021904 (WindowsXP Pro, mozilla1.8 branch)

It seems that "disableing the feature" works as expected (thankyou!)
but maybe-unwanted side effect is observed; if mouse pointer comes over the
unread folder in "All folder" pane, a red-star icon that denotes there's
something new message, is disappeared after several seconds.
(In reply to comment #29)
> Thunderbird ID:2006021904 (WindowsXP Pro, mozilla1.8 branch)
> 
> It seems that "disableing the feature" works as expected

I'm not seeing this.  Whether for IMAP or POP (xref comment 12), whether for 
the folder popup or the notification box (bug 312940), I can't turn off the popup's preview text using |mail.showPreviewText|.  TB 3a1-0316, Win2K.

So, I've turned off alerts, but the folder popups can't be defeated at all.
Any plans to rectify this situation?
Severity: normal → enhancement
OS: Windows XP → All
Hardware: PC → All
(In reply to comment #27)
> (In reply to comment #26)
> > There is a similar bug where the article count of a newsgroup will be
> > decremented when the group-name tooltip pops up.  (This happens when 
> > hovering the mouse over the name of a newsgroup which is too long to
> > display.)
> 
> Someone recently opened a bug about this problem with newsgroups, which I saw 
> (and I think I confirmed) but I can't locate.  The problem isn't only for
> newsgroups that have a shortened-name tooltip -- hovering over *any* newsgroup
> with unread, undownloaded messages causes the groupname to change its unread
> count; if none of the unread messages have been downloaded, the groupname loses
> its boldness and count.

That would be my bug 318792.

There is also Bug 298737, which is much older. I says there is a long delay before the message count disappears. But in my case the bold and count disappear immediately (or close) upon mouseover.
um, i think the mass checkin you did which claimed to relate to this bug for the 1.8 branch fixed a crash encountered by users of the 1.8.0 branch:

http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/mailnews/imap/src/nsImapProtocol.cpp&mark=797,803&rev=1.612.25#803

Incident ID: 16932309
marking fixed - we should file new bugs for any outstanding issues.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Well, bug 318792 (comment 31) is still outstanding.

Bug 329569 appears to be slightly related (? -- there's a mention there of the 'showPreviewText' pref).  David checked in a patch there, but the bug is still open.

And I've just opened bug 350791.
Depends on: 329569, 350791
Depends on: 318792
Depends on: 350975
You need to log in before you can comment on or make changes to this bug.