Closed Bug 76248 Opened 24 years ago Closed 20 years ago

Security dialogs need a XUL makeover

Categories

(Core Graveyard :: Security: UI, defect, P3)

1.0 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sfraser_bugs, Unassigned)

References

Details

Attachments

(3 files)

The new XUL dialogs that PSM 2 brings up are cool n' all, but need to conform to 
the standards that the rest of our XUL dialogs use, so that they respect the 
convensions of platform button order, handle default keys, and lots of other 
goodness. For a start, they should use that platform dialog overlays.
Cc some XUL folks.
In what way is this dialog badly laid out?  In what ways can it be improved? 
I'm all for improving the UI experience, but I need more than opinions to go on.

Also, please set the component to PSM so it can get on our radar.




->PSM.

Issues with this dialog specifically:
1. It does not conform to platform-specific button order, so, on Mac, the buttons 
are in the wrong order. They should be:

          [Help]                [Cancel] [OK]

We have XUL overlays that provide this functionality (though you may have to work 
with the XUL guys to get 'help' button support).

2. The dialog should probably have a warning icon.

Others (see the post by MPT on the UI newsgroup) have posted much more detailed 
critiques of the security dialogs than I have time to create here.
Component: Security: General → Client Library
Product: Browser → PSM
Version: other → 2.0
Also they're not even classed as dialogs (for skinning) :-(
*** Bug 77553 has been marked as a duplicate of this bug. ***
QAContact->junruh (CRYPTO-related)
QA Contact: ckritzer → junruh
Depends on: 52778
Target => PSM 2.0 so it gets fixed soon.
Target Milestone: --- → 2.0
Adding dependencies on specific bugs about dialog problems.
Blocks: 75595, 75596, 78615
->p2
Priority: -- → P2
*** Bug 81192 has been marked as a duplicate of this bug. ***
-> p3
Priority: P2 → P3
Check my diff for newserver.xul - New Server Certificate looks much better. At
least I can click on OK button.
Mass reassigning target to 2.1
Target Milestone: 2.0 → 2.1
Keywords: nsenterprise
Changing platform
Hardware: All → Macintosh
um, psm shouldn't be using an ok button outside of a buttonset.
Keywords: approval, patch, review
OS: Mac System 8.5 → All
Hardware: Macintosh → All
p2
Xul layout.
Priority: P3 → P2
I wish Dmitry's patch would get in as a "temporary fix". I patched my
mozilla-win-2001071903 manually (edited the file from pippki.jar) and it gets
the job done, i.e. shows the OK, Cancel and Help buttons. Why it's important ?
Because this dialog is shown whenever a new site with ssl (https) is contacted. 

At the moment the "workaround" for this is to choose the correct option from the
dialog and press enter (activates the hidden OK-button)
On related issues, the CA import (the .der -files) is not working (well I guess
it's not supposed to, yet), and the xul for it has the same problems as this bug.
Uhh, sorry, forget that request for temporary fix, I apparently didn't read the
bugs carefully enough. :(

So a bit of summary:

This bug was "fixed" in bug 75596 by resizing the dialog. However, the fix only
works with certain font-sizes in mozilla dialogs (see "Comments From Boris
Zbarsky 2001-05-06 07:11" in this bug)

So, what actually needs to be done (as far as I understand) is to make the
dialog dynamically resizing by using the overlay mentioned in bug 52778

FIX: (with some strange code)

OK, now there has been very interesting behavior in the XUL/DOM/JS while trying
to get this annoyment behave correctly.

The weirdest thing was that one has to do "var foo = window.innerHeight;" to
have the dialog window reload its height measurement. Why that is needed is
beyond my understanding...

Anyway. Here's short fix to correctly resize the dialog window in "newserver".
Insert the code below to the newserver.js -file to the _end_ of function onLoad().

 /**
   * This code resizes the dialog-window properly.
   * (window won't resize otherwise when content is added 
   * dynamically with setText (see pippki.js))
   **/
  var xulWindow = document.getElementById("ssl_warning");

  var foo = window.innerHeight; // THIS IS NEEDED, 
  // does not resize otherwise... don't ask why.

  window.sizeToContent();
  xulWindow.setAttribute("height",window.innerHeight + 30);
  /* end of resize code */
Oh and the above fix was tested and correctly fixes the problem (at least) on 
Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2+) Gecko/20010723
and
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2+) Gecko/20010712, build 2001071210

Should that fix be applied, it needs to be propagated to the other security
dialogs in pippki.jar. There's 2-3 other dialogs at least.

The buttons in newserver.xul/.js are still lacking the okCancelHelpButtons
-layout. This probably applies to other dialogs as well.
adding rangansen to cc list
 
Keywords: approval
Mass assigning QA to ckritzer.
QA Contact: junruh → ckritzer
Whee !

Thanks to excellent work of Håkan Waara (hwaara@chello.se) on the UI of this
"Unknown CA" -dialog (see bug 91466), it seems that the dialog works well with
different font-sizes now :) (and without any weird hacks). The relevant changes
that IMHO should be adapted to other psm/security dialogs are at 
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=newserver.xul&root=/cvsroot&subdir=mozilla/security/manager/pki/resources/content&command=DIFF_FRAMESET&rev1=1.12&rev2=1.13

This concerns (at least) bugs 78615, 89420 and 92213.

In some cases the dialog might have a bit too much empty space, which is related
to bug 91137 (i believe). The best thing is though that now this dialog is never
too small :)
To experiment with different fontsizes, use the userChrome.css to set custom sizes.

This should make the "weird patch", I mentioned previously, unnecessary.
Uhh...

Actually there is very simple solution to this resize-problem (although fixing
bug 91137 would be the perfect solution). Thanks to the Håkan's version of the
newserver.xul, I realized that the problem is following:

In .xul, if the <window> -object takes height or width as a attribute, then the
corresponding height and width is set absolutely. This results to bad UI with
certain font sizes. So the solution is to use style -attribute and set the width
and height with style="width: 123em; height: 456em". These values are defined
relatively and thus the height and width are measured according to the different
fontsizes.

So, avoid height and width everywhere and use style="width: xxem..." instead.

PS. please give the other security dialogs the similar UI-polish as Håkan gave to 
newserver.xul in bug 91466....
do keep in mind that translated versions may have more text than non translated 
versions. :-(
The applied patch is out of date.  The newserver.xul dialog was completely
re-written so the patch is now obsolete.

This seems to be a tracker bug without any specific complaint.  Please open bugs
with complaints/patches for specific dialogs.

Bumping down the priority of this bug.
Priority: P2 → P3
Move to future. Won't have time to fix these for 2.1
Target Milestone: 2.1 → Future
QA Contact: ckritzer → bsharma
Keywords: nsenterprise+
QA Contact: bsharma → junruh
*** Bug 94905 has been marked as a duplicate of this bug. ***
Mass reassign Javi's old PSM bugs to nobody
Assignee: javi → nobody
QA Contact: junruh → nobody
Target Milestone: Future → ---
All of the issues mentioned in the bug report are fixed now that bug 251991 is
checked in. The dialogs use the <dialog> tag now, so the button order and
keyboard behaviour should comply to platform standards.

The dialog sizing issues were resolved (partly by me) over time, too.

Please file separate bugs about the "lots of other goodness" part (comment 0)
and remaining dialog-specific defects.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: PSM → Core
Version: psm2.0 → 1.0 Branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: