Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 273962 - [ui] Login Dialog is not pretty
Summary: [ui] Login Dialog is not pretty
Status: VERIFIED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.6 M2   Edit
Assignee: Susan McCourt CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-27 20:41 EDT by Henrik Lindberg CLA
Modified: 2009-09-15 13:01 EDT (History)
5 users (show)

See Also:


Attachments
Screenshot depicting the change. (35.27 KB, image/jpeg)
2009-08-30 07:37 EDT, Remy Suen CLA
no flags Details
UserValidationDialog patch v1 (10.48 KB, patch)
2009-08-31 18:00 EDT, Remy Suen CLA
no flags Details | Diff
UserValidationDialog patch v2 (10.52 KB, patch)
2009-09-01 22:25 EDT, Remy Suen CLA
susan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Henrik Lindberg CLA 2009-04-27 20:41:59 EDT
The login dialog is somewhat misaligned.

(Hint: to get login prompts when testing, try the p2 testserver - use http://localhost:8080/never as the repository URL and you will never be able to login), or try it with http://localhost:8080/private to be able to login with "Aladdin"/"open sesame".

Try it with both a saved password, and when password is not saved as the messages are now different.
To get the original message back, make sure to press ok once without saving the password, then restart the sdk to clear the in memory cache. The next time the plain "please provide..." message gets used.
Comment 1 Susan McCourt CLA 2009-04-27 22:14:32 EDT
marking for M7 but this may slip to RC1 depending on what happens in tomorrow's test pass
Comment 2 Pascal Rapicault CLA 2009-04-28 09:44:45 EDT
I think that there is a dialog some place else in the SDK that we may be able to copy  / reuse. I think John know where this is.
Comment 3 John Arthorne CLA 2009-04-28 10:00:17 EDT
There are other copies, but they are all the same class. The class UserValidationDialog exists in org.eclipse.update.ui, org.eclipse.ui.net, and org.eclipse.equinox.p2.ui, but they all look roughly the same to me.
Comment 4 Susan McCourt CLA 2009-04-28 11:11:39 EDT
My plan is to clean ours up, at the risk of us getting a late-breaking "why are some login dialogs different than others?"  

cc'ing Kevin in case he has an opinion on this.
Comment 5 Susan McCourt CLA 2009-04-29 19:57:30 EDT
bigger fish to fry for M7, not sure if we'll do this, esp since copies of this dialog are used elsewhere.
Comment 6 Susan McCourt CLA 2009-04-30 01:17:28 EDT
I'm going to remove the 3.5 milestone, this is not critical.
Comment 7 Susan McCourt CLA 2009-05-14 16:52:27 EDT
It also doesn't put the focus in the text field which is really annoying.  It pops in your face but you can't immediately type
Comment 8 Pascal Rapicault CLA 2009-05-14 20:36:48 EDT
Do we want to address this focus problem for 3.5 / 3.5.x?
Comment 9 Susan McCourt CLA 2009-05-14 21:30:38 EDT
I'll take a look for RC2.  It might be hard to justify, on the other hand it should be a one liner.  I don't recall any complaints in 3.4, but it was bugging me today while testing.
Comment 10 Pascal Rapicault CLA 2009-05-14 22:50:12 EDT
Remember that in 3.4 we did not get this dialog.
Comment 11 Susan McCourt CLA 2009-05-18 12:15:56 EDT
(In reply to comment #10)
> Remember that in 3.4 we did not get this dialog.
> 

I tried a 3.4.2 and the problem exists there, also, there is first a prompt from a different authentication dialog (not sure where it's coming from...secure storage?), followed by the p2 dialog prompt, which has the same focus problem.

There appears to be code to set the focus, so I'm guessing it's a parenting problem.  Will investigate for RC2.
Comment 12 Susan McCourt CLA 2009-05-18 12:23:16 EDT
I cloned this bug for the specific focus issue.
Moving this bug to 3.6.
This dialog should be cleaned up and there is no reason for it to be a subclass of MessageDialog.
Comment 13 Pascal Rapicault CLA 2009-05-22 11:26:18 EDT
See also #229396
Comment 14 Remy Suen CLA 2009-08-30 07:37:14 EDT
Created attachment 146004 [details]
Screenshot depicting the change.

I would be happy to provide a patch if necessary. The first two dialogs are mock-ups I did. This includes changing the dialog to subclass Dialog instead of MessageDialog. The third one is what it looks like right now.

I like the first one myself but whatever floats your boat. If you want something different, I can try to accommodate also (as long as SWT cooperates ;)).
Comment 15 Pascal Rapicault CLA 2009-08-31 16:03:04 EDT
I like the first proposal as well. Let's go with that.
Comment 16 Remy Suen CLA 2009-08-31 18:00:02 EDT
Created attachment 146120 [details]
UserValidationDialog patch v1

The focus problem described by bug 276745 will also be resolved because of this.
Comment 17 Remy Suen CLA 2009-09-01 22:25:45 EDT
Created attachment 146246 [details]
UserValidationDialog patch v2

I forgot to call the all-important applyDialogFont(Control) method.
Comment 18 Susan McCourt CLA 2009-09-03 16:14:39 EDT
Fixed in HEAD >20090903.  I also removed the no longer used strings for OK and Cancel now that we are correctly using IDialogConstants strings.

Note to self:  I verified the old behavior vs. new behavior using the p2 test server http://localhost:8080/private.  However you have to be sure that you haven't previously saved (right or wrong) credentials on localhost (even if using a different address, such as localhost:8080/never), or else you won't get the dialog.  At first I was afraid we had a subtle difference in behavior introduced by the patch but then I realized you need to compare clean workspaces and repo managers that haven't previously failed on the repo in question.

Remy, the patch was really nice.  Thanks for all the extra cleanup of javadoc, fixing the button strings, etc. etc.
Comment 19 Susan McCourt CLA 2009-09-15 13:01:01 EDT
Verified on Build id: I20090915-0100, WinXP, using the p2 test server (http://localhost:8080/never).
Thanks again for the patch, Remy!