Closed Bug 40699 Opened 24 years ago Closed 24 years ago

Platform-consistent look and feel for alerts

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

VERIFIED DUPLICATE of bug 40700

People

(Reporter: hsivonen, Unassigned)

Details

This is a stage 3 bug for the purpose of the stage scheme of bug 39375. Stages 1 and 2 
of this bug are accomplished by using current dialog functionality with stage 1 and 2 
implementations of individual widgets. This bug, however, does not depend on stage 3 
implementations of particular widgets. This bug covers only alerts--not dialogs in general.

Currently, alert boxes (aka. message boxes) don't follow platform conventions. This could 
be fixed by using native alerts. Alert boxes have limited content options and, therefore, it 
should be possible to create a cross-platform alert API for creating native alerts.

XP code would call the XP alert API which would, in turn, call the platform alert API.

Benefits:
* Native alerts would follow the system conventions for alerts making it easier for users to 
recognize alerts as such.
* Native alerts could most likely be displayed more quickly than alerts rendered with the 
browser layout engine.
* Native alerts would be recognized as alerts by the window manager. It is useful when 
an alert is created while Mozilla is in the background or with the new alert model of Mac 
OS X. 
* Utilities that add functionality to alerts would recognize alerts as such.

Properties of an alert box that would need to be supported:
Title (not displayed on all platforms)
Level (severity of the alert)
Primary text
Secondary text (optional)
Checkbox with text (optional)
Default button
Secondary button (optional)
Third button (optional)
Has help (optional)

Title
A string that is used as the title of the alert box on platforms where alerts have titles. The 
dialog should be understandable without the title, because alert boxes don't have titles 
on all platforms.

Level
Indicates the severity of the alert. There are three possible level: Note/Information, 
Caution/Warning and Stop/Critical (Mac OS/Windows). On Mac OS and Windows the 
level of the alert is indicated using an icon supplied by the OS. On platforms where alerts 
don't have this property, the property is ignored.

Primary text
The essential text of the alert.

Secondary text
Additional narrative that provides more information. On some platforms the secondary 
text is displayed using another font.

Checkbox with text
A checkbox with a label. Used for indicating whether the alert should be displayed next 
time or whether the decision should be remembered.

Default button
The button activated by pressing Enter or Return.

Secondary button
Another button. Usually used to cancel an action. If the function is similar to "Cancel" or 
"No", the shortcut is command-. on Mac OS and esc on Windows.

Third button
A button with a destructive function or a button providing more information. Placed apart 
from the default and secondary buttons. (Typically used for "Don't Save" or "More Info...") 
When used for "Don't Save", the shortcut is command-d.

Has help
Indicates that help documentation is available for the alert. On Mac OS the help button is 
an OS-supplied icon placed to the left of third button (if present). On Windows the help 
buttons is a button labeled "?" in the title bar of the alert.


Additional notes:
On Windows alert boxes can include a close button in the title bar. In alerts with multiple 
buttons it should be equivalent to the button meaning "Cancel".

On Mac OS the alert boxes should be of the movable type.


Layout guidelines applicable on Mac OS:
http://developer.apple.com/techpubs/mac/HIGOS8Guide/thig-48.html
Mistakenly submitted two times

*** This bug has been marked as a duplicate of 40700 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
verif
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.