Closed Bug 77221 Opened 24 years ago Closed 22 years ago

Options menu for Format doesn't work like stated in spec

Categories

(MailNews Core :: Composition, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: esther, Assigned: vparthas)

References

(Regression)

Details

(Keywords: fixedOEM, regression)

Attachments

(1 file, 3 obsolete files)

Using build 2001-04-23 on win, mac and linux the Options menu for Format does not work like spec states. In spec it states "For example, I normally have it set to ask me, but I know for this particular message that the person can only read plain text, so I change to format to plain text right here. Note: If the drop down is changed to "Plain Text only" the Ender Toolbar is disabled." When I have a compose window opened in HTML and select the Options|Format|Plain Text the formatting toolbar is enabled, according to the spec it should be disabled for this msg. 1. Launch App 2. Launch Mail, select an account that composing is HTML by default. Notice the formatting toolbar is enabled. 3. Select Options|Format|Plain Text Result: the Formatting toolbar is enabled. Expected: the Formatting toolbar should be disabled
reassign to varada
Assignee: ducarroz → varada
Still behaves this way in 2001121300
Latest update, this is still broken 5-17-2002 branch. Can give the user the wrong information as to how the message is being sent. If a user selects the Plain text option, then start adding to a message that is to be Forwarded that has HTML in the message, they really don't have a good indication that selecting the Plain text option did anything. A disabled HTML attribute bar would be the indicator they are in plain text mode. Note: also happens in Reply and Compose, but Forward is the case where a user may have HTML attributes already in a message that they want to forward to a Plain text user.
Attached patch hide/show related menu and toolbar (obsolete) (deleted) — Splinter Review
who can give this patch a review, sr,...? maybe it's related to 148322/57563/29829.
Comment on attachment 85741 [details] [diff] [review] hide/show related menu and toolbar You forgot to show/hide the view show/hide formatting toolbar menuitem id="menu_showFormatToolbar" see line 1382.
Attachment #85741 - Flags: needs-work+
Style nit: as you don't need the attribute to persist don't use element.setAttribute("hidden", "true"); when you can use element.hidden = true; and don't ever ever use element.setAttribute("hidden", "false"); don't even use element.removeAttribute("hidden"); best is to use element.hidden = false;
Comment on attachment 85741 [details] [diff] [review] hide/show related menu and toolbar Something else occurs to me: if the toolbar was manually hidden then changing the format could show the toolbar.
You're also duplicating code, which is ugly. You could use toolbar.hidden = (format_menubar.hidden = insert_menubar.hidden = show_menuitem.hidden = gSendFormat == nsIMsgCompSendFormat.PlainText) || (show_menuitem.getAttribute("checked") == "false");
Attached patch make the code clean (obsolete) (deleted) — Splinter Review
1. show or hide the [view]->[format toolbar] at the same time 2. clean the code Neil is a guru of javascript. :) Fight for javascript!
Attachment #85741 - Attachment is obsolete: true
> Neil is a guru of javascript. :) With some help from jag... Incidentally he doesn't like my chained assignment so you might find you are asked to set a temp var in the switch and use separate assignments.
Comment on attachment 89750 [details] [diff] [review] make the code clean How about change + toolbar.hidden = (format_menubar.hidden = insert_menubar.hidden = + show_menuitem.hidden = gSendFormat == nsIMsgCompSendFormat.PlainText) || + (show_menuitem.getAttribute("checked") == "false"); to var hiddenMenuToolbar = (gSendFormat == nsIMsgCompSendFormat.PlainText); toolbar.hidden = hiddenMenuToolbar || (show_menuitem.getAttribute("checked") == "false"); format_menubar.hidden = hiddenMenuToolbar; insert_menubar.hidden = hiddenMenuToolbar; show_menuitem.hidden = hiddenMenuToolbar; and keep the switch part as original?
Henry, that's what I said, but in plain English :-) although I would prefer a shorter variable name e.g. hideMenus
Attached patch combine henry's and neil's suggestion (obsolete) (deleted) — Splinter Review
Is this patch ok?
Attachment #89750 - Attachment is obsolete: true
Attached patch clean the format (deleted) — Splinter Review
Attachment #92845 - Attachment is obsolete: true
Comment on attachment 92852 [details] [diff] [review] clean the format Good for me. Thx. r=henry
Attachment #92852 - Flags: review+
Neil, would you please double check? :-)
Comment on attachment 92852 [details] [diff] [review] clean the format Looks good to me.
Ducarroz is the module owner for this - he needs to review it before I can sr it.
I will let Varada do the review and TEST the patch...
Comment on attachment 92852 [details] [diff] [review] clean the format Tested the patch, it looks good to me; r=varada
Comment on attachment 92852 [details] [diff] [review] clean the format sr=bienvenu
Attachment #92852 - Flags: superreview+
in trunk
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Whiteboard: branchOEM
Whiteboard: branchOEM → branchOEM+
Verified build 2002082204.
Status: RESOLVED → VERIFIED
In OEM branch.
Whiteboard: branchOEM+ → branchOEM+, fixedOEM
Keywords: fixedOEM
Whiteboard: branchOEM+, fixedOEM
Testing the trunk build 20020917 on winxp and linux, the formatting toolbar disappears when user select the menu format option for plain text while in an HTML Compose window. So this is verified, however a new bug popped up for Windows only. Each New Compose window after this one is missing the Formatting toolbar too. The Compose window is actually an HTML compose window because the menu item for changing the Format is avaiable. I will log a new bug and reference this bug as the possible cause. This behavior is regression from branch. Also, this fixed is listed as checked into OEM branch, I don't see it in the 20020915 branch. What OEM branch was it checked into?
New bug for hidden tool bar not coming back after closing the current compose window is 169255.
ether, what tag did you use to verify the code in "OEM" branch? I can find the code in "NETSCAPE_7_0_OEM_BRANCH".
Product: MailNews → Core
Product: Core → MailNews Core
Regressed by: 137884
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: