Closed
Bug 366016
Opened 18 years ago
Closed 18 years ago
Reduce quoted text in our message preview string to "..."
Categories
(Thunderbird :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird2.0
People
(Reporter: mscott, Assigned: mscott)
References
Details
(Keywords: fixed1.8.1.2)
Attachments
(2 files, 3 obsolete files)
21.08 KB,
patch
|
mscott
:
superreview+
mscott
:
approval-thunderbird2+
|
Details | Diff | Splinter Review |
712 bytes,
patch
|
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
In the animated alert and in the folder pane info popup, we show a little bit of the preview text for the new mail. We currently include the quoted text so the preview text looks like:
Scott wrote: > Would you like to meet for dinner? Sure that sounds great
Most of the time the quoted text takes up most of the space and you don't actually see the text the sender actually typed. This kind of defeats the helpfulness of the new preview text.
We should instead compress quotes (of any level) to "..." so the above example looks like:
Scott wrote: ... Sure that sounds great!
Now at a glance I can see that Scott agreed to meet for dinner. I also want to strip out the quoted citation too. so you'll ultimately see:
... Sure that sounds great! I'll be there at 8pm, looking forward to it!
The rules would look like:
1) Replace consecutive lines of quoted plain text replies (of any level, >, >>, >>>, etc.) with a single "...".
2) Currently the preview text generation code in nsMsgDBFolder::GetMsgTextFromStream is also used by spotlight integration. Spotlight is going to want the quoted text, so make these new changes to nsMsgDBFolder::GetMsgTextFromStream an option based on a bool argument.
Assignee | ||
Comment 1•18 years ago
|
||
This works really well and works on both html and plain text by acting on the msg body after we've converted html to plain text and after the decoding work has happened.
Still to do:
1) make it an option for spotlight
2) try to strip out the citation line
Updated•18 years ago
|
OS: Windows XP → All
Hardware: PC → All
Assignee | ||
Comment 2•18 years ago
|
||
David, I know this behavior needs to be bypassed for spotlight search. What folder API will desktop search be using? GetMsgTextFromStream or GetMsgPreviewTextFromStream?
Status: NEW → ASSIGNED
Assignee | ||
Comment 3•18 years ago
|
||
This patch incorporates David's changes in Bug 346873 for decoding base64 and quoted printable.
In order to get quoted printable decoding to work for some of my test cases, I had to modify the IMAP peak command we issue when fetching the preview text to also fetch the Content-Transfer-Encoding header.
We might be able to move some of the helper routines I added:
convertMsgSnippetToPlainText
compressQuotesInMsgSnippet
decodeMsgSnippet
to nsMsgUtils in case we want to share them elsewhere.
This patch will be complete once I add a boolean for bypassing the quote compression code. I just don't know which API will need it.
Attachment #250558 -
Attachment is obsolete: true
Comment 4•18 years ago
|
||
I don't have the code in front of me, but it uses the idl method in nsIMsgFolder.idl, because the desktop search code is currently written in js...
Assignee | ||
Comment 5•18 years ago
|
||
* getMsgTextFromStream now takes a boolean for optionally compressing quotes to "..."
* aMaxOutputLen is no longer used and has been removed from getMsgTextFromStream.
see comment #3 for more details, particularly the change to the peak command we issue when fetching the preview text.
Attachment #250799 -
Attachment is obsolete: true
Attachment #250811 -
Flags: superreview?(bienvenu)
Updated•18 years ago
|
Attachment #250811 -
Flags: superreview?(bienvenu) → superreview+
Assignee | ||
Comment 6•18 years ago
|
||
I added back aMaxOutputLen as an argument to getMsgTextFromStream. The preview text string gets truncated to aMaxOutputLen after we are done decoding / converting / compressing the string.
Carrying forward David's sr.
Attachment #250811 -
Attachment is obsolete: true
Attachment #250888 -
Flags: superreview+
Assignee | ||
Updated•18 years ago
|
Attachment #250888 -
Flags: approval-thunderbird2?
Assignee | ||
Comment 7•18 years ago
|
||
this has been checked into the trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 8•18 years ago
|
||
Comment on attachment 250888 [details] [diff] [review]
updated fix
this seems to be working ok on the trunk today.
Attachment #250888 -
Flags: approval-thunderbird2? → approval-thunderbird2+
Assignee | ||
Updated•18 years ago
|
Keywords: fixed1.8.1.2
Assignee | ||
Comment 9•18 years ago
|
||
this is causing a crash on the branch today with html mail due to a bad merge.
Assignee | ||
Comment 10•18 years ago
|
||
the line to initialize the sink got dropped during the merge.
Attachment #251088 -
Flags: superreview?(bienvenu)
Updated•18 years ago
|
Attachment #251088 -
Flags: superreview?(bienvenu) → superreview+
You need to log in
before you can comment on or make changes to this bug.
Description
•