Closed Bug 76461 Opened 24 years ago Closed 22 years ago

Want rewrap for HTML reply to plain text message

Categories

(MailNews Core :: Composition, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla1.3alpha

People

(Reporter: neil, Assigned: cmanske)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

When replying in HTML to a plain text message there is still the possibility that the quoted message won't wrap correctly. The resolution for HTML messages is to convert the selected preformat text to body text and remove embedded line breaks. Other breaks such as paragraphs or quotations would need to be preserved. This could be hooked up to the existing "Rewrap" menuitem.
Status: NEW → ASSIGNED
Target Milestone: --- → Future
Keywords: mailtrack
Whiteboard: editorbase
Is Rewrap actually there in html mail compose? If mail folk want to hook it up for html compose, implementing it on the editor side shouldn't be any problem -- it might "just work" already, or it might take a little tweaking, but I'm sure it wouldn't be too difficult.
Akk, a menuitem exists but appears to have no effect.
In that case, how about I snarf this bug and implement it? One question: Rewrapping quoted text in an html window could be handled two ways: 1. Turn the quoted text into an html quote, with no newlines, and let it wrap to window width just like a regular html quote would. We would have to ensure that it wrapped correctly on send-as-plaintext; I'm not sure if this would work automagically or if it would require more work. 2. Turn the quoted text into a well-behaved plaintext quote, wrapped at our current wrap column setting, and it will remain that way on send. I'm guessing that most rewrap fans would prefer #2 in any case (turn it into a well-formed plaintext quoted block), plus it's probably easier with #2 to be sure that what is sent is what you saw in the compose window, so that's what I'll do unless I hear otherwise.
Assignee: ducarroz → akkana
Status: ASSIGNED → NEW
Target Milestone: Future → mozilla1.3beta
Status: NEW → ASSIGNED
editorbase-. reassigning to cmanske
Assignee: akkana → cmanske
Status: ASSIGNED → NEW
Whiteboard: editorbase → editorbase-
Reassigning back to akkana -- we mistook this for another rewrap bug.
Assignee: cmanske → akkana
*** Bug 86998 has been marked as a duplicate of this bug. ***
Note that this bug is the opposite of bug 86998, which requests removing rewrap from HTML composer 'cause it doesn't work! So let's remember to remove or disble that menuitem if we don't get rewrap to work in HTML composer.
Actually, it turns out rewrap already works in an html editor. The only reason it does nothing in mail compose is that mail compose is explicitly disabling it in the html case. I'll attach a patch that fixes that. Marking this 1.3alpha, but it's a trivial 1-line change and could be added to 1.2 if anyone thinks there's demand for it. One thing: it changes what was an html-style quote (<blockquote type=cite etc>) to a plaintext-style quote (<span style="white-space: pre;">, then &gt; at the beginning of each line). It is a real quote (it's blue and will send correctly) and that's probably the correct behavior, but it's slightly surprising the first time to see the blue bar change to "> " characters.
Status: NEW → ASSIGNED
OS: Windows 95 → All
Hardware: PC → All
Target Milestone: mozilla1.3beta → mozilla1.3alpha
Comment on attachment 104059 [details] [diff] [review] Patch: don't disable rewrap in html mail compose R=ducarroz
Attachment #104059 - Flags: review+
This tests very well with my editorShell-less build.
The output from rewrap looks quite odd, as though it's supposed to turn the message into plain text, but without actually selecting a monospace font. If that could be fixed then HTML rewrap would make a lovely plain text preview.
The fix looks fine, but see neil's comment: http://bugzilla.mozilla.org/show_bug.cgi?id=76461#c12 Based on neil's comments and ducarroz's reservations, I'd say wait until 1.3 alpha. The reason to hesitate for 1.2 final, is that say there's a re-wrap problem and for some wacky reason, if I have certain html (say something special to reply, like cite blocks, signatures, or whatever) re-wrap causes some sort of dataloss. Let's wait until 1.3 alpha, so you can address neil's comment. And better to ship 1.2 final without opening this hole (so late in the game) and work it out during 1.3 alpha. As soon as the tree opens for 1.3 alpha, you could check in your patch, and then spin up neil's issue in a new bug, while allow people to test for other issues. so sr=sspitzer on your patch, but for 1.3 alpha.
Fix is in. It should be showing up in a fixed width font anyway, I would think. nsHTMLDataTransfer, when it creates plaintext quoted blocks, adds a style of "white-space: pre;" in order to prevent wrapping. Does mail have a non fixed width style on white-space: pre? That's a separate issue from this bug, but it probably should be filed as a bug.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment on attachment 104059 [details] [diff] [review] Patch: don't disable rewrap in html mail compose Unfortunately this appears to have conflicted with cmanske's editorshell removal work - he tried to move cmd_rewrap to the edit menu section but this one got copied instead :-(
Neil: I don't know what you mean by "this one got copied instead"
I see what you mean!
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #104059 - Attachment is obsolete: true
Comment on attachment 106231 [details] [diff] [review] Remove duplicate "cmd_rewrap" r=akkana
Attachment #106231 - Flags: review+
Comment on attachment 106231 [details] [diff] [review] Remove duplicate "cmd_rewrap" Would you mind removing the copy in the "Tools Menu" section instead?
The patch shows the duplicate command deleted from the Options menu.
Assignee: akkana → cmanske
Status: REOPENED → NEW
Attachment #106231 - Flags: superreview?(sspitzer)
Status: NEW → ASSIGNED
Whiteboard: editorbase- → editorbase-[FIX IN HAND]need sr=
Comment on attachment 106231 [details] [diff] [review] Remove duplicate "cmd_rewrap" Sorry, I was guessing that Edit came directly before Format :-)
Comment on attachment 106231 [details] [diff] [review] Remove duplicate "cmd_rewrap" sr=sspitzer
Attachment #106231 - Flags: superreview?(sspitzer) → superreview+
Whiteboard: editorbase-[FIX IN HAND]need sr= → editorbase-[FIX IN HAND]
checked into 1.3a trunk
Status: ASSIGNED → RESOLVED
Closed: 22 years ago22 years ago
Resolution: --- → FIXED
Whiteboard: editorbase-[FIX IN HAND]
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: