Bug 379619 - clicking Validate Settings should temporarily disable Validate on Finish
Summary: clicking Validate Settings should temporarily disable Validate on Finish
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.11   Edit
Assignee: Frank Becker CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2012-05-15 21:47 EDT by Sam Davis CLA
Modified: 2013-10-17 04:59 EDT (History)
2 users (show)

See Also:


Attachments
mylyn/context/zip (36.82 KB, application/octet-stream)
2012-05-17 08:26 EDT, Frank Becker CLA
no flags Details
mylyn/context/zip (13.28 KB, application/octet-stream)
2012-05-19 13:09 EDT, Frank Becker CLA
no flags Details
mylyn/context/zip (14.47 KB, application/octet-stream)
2012-08-26 05:26 EDT, Frank Becker CLA
no flags Details
mylyn/context/zip (19.00 KB, application/octet-stream)
2013-10-15 01:22 EDT, Frank Becker CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2012-05-15 21:47:45 EDT
* edit the properties of a task repository
* click validate
* click finish
* the repository is unnecessarily validated again

This is pretty annoying as it gets me every time. If I manually validate, then there is no need to do it again when I click finish unless I have changed something. I think the Validate on Finish checkbox should be greyed out after a successful validation, and treated as unchecked, until the user makes a change to something other than the label.
Comment 1 Frank Becker CLA 2012-05-17 08:26:17 EDT
Review https://git.eclipse.org/r/6013 created!

Steffen, can you please review.
Comment 2 Frank Becker CLA 2012-05-17 08:26:19 EDT
Created attachment 215763 [details]
mylyn/context/zip
Comment 3 Sam Davis CLA 2012-05-17 17:41:26 EDT
Thanks Frank!
Comment 4 Steffen Pingel CLA 2012-05-17 18:03:32 EDT
I'm -1 on this change. The updated workflow should no longer require manual validation. Users are now expected to change settings and hit Finish. 

The proposed automation for toggling the validate on finish button won't be obvious and I am not aware of other dialogs in Eclipse that work that way. I'm inclined to mark this bug as wontfix.
Comment 5 Sam Davis CLA 2012-05-17 18:13:19 EDT
I see the concern, but this is inconsistent with all other connectors. I think that this should be pushed from Bugzilla up to the framework, so that all connectors get this support. However, for existing users who are used to clicking validate, this is very annoying. Also, I know of at least one connector where validation is done during set up to retrieve the list of project areas from the server. For that connector there is no reason to validate again on finish, so there should be API to allow the box to be unchecked.
Comment 6 Steffen Pingel CLA 2012-05-17 18:18:18 EDT
This is in the framework and all connectors should be leveraging the new API. If the connector did already validate and no settings were changed it could simple return a valid status without contacting the server again.
Comment 7 Sam Davis CLA 2012-05-17 18:30:41 EDT
Thanks, that's exactly what should happen! The Bugzilla connector doesn't do that though. Because connectors have to opt in to get this functionality, most (that I know of) do not, and so users may not know what to expect.
Comment 8 Steffen Pingel CLA 2012-05-17 18:39:58 EDT
Frank, I wonder if we could change your patch to generically implement that behavior: If a repository has been validated and nothing has changed the framework should shortcut the validation, e.g. by setting a flag in the page that the repository has already been validated in which case the validation method would return by default.
Comment 9 Sam Davis CLA 2012-05-17 18:48:26 EDT
Another reason to do this is that sometimes validation takes a long time and is not cancellable.
Comment 10 Frank Becker CLA 2012-05-18 12:18:21 EDT
(In reply to comment #8)
> Frank, I wonder if we could change your patch to generically implement that
> behavior: If a repository has been validated and nothing has changed the
> framework should shortcut the validation, e.g. by setting a flag in the page
> that the repository has already been validated in which case the validation
> method would return by default.

Yes we can do this. I think I have only to remove some lines of code for enable/disable the validateOnFinist button.

A new review is coming soon.
Comment 11 Frank Becker CLA 2012-05-18 12:48:16 EDT
new review created!

Should I change the following SettingPage?
* MockRepositorySettingsPage
* OslcRepositorySettingsPage
* TracRepositorySettingsPage
* MyTracRepositorySettingsPage
* WebRepositorySettingsPage
Comment 12 Steffen Pingel CLA 2012-05-18 12:51:15 EDT
Let's do a review first. I would prefer if we implemented in a way that didn't require changes to the client implementations or at least generalized it but I haven't looked at the proposal, yet.
Comment 13 Frank Becker CLA 2012-05-18 12:57:36 EDT
(In reply to comment #12)
> Let's do a review first. I would prefer if we implemented in a way that didn't
> require changes to the client implementations or at least generalized it but I
> haven't looked at the proposal, yet.

We need to add an ModifyListener or an SelectionListener to every Control that is relevant for validation od do you know an other way?
Comment 14 Sam Davis CLA 2012-05-18 13:01:01 EDT
Could you intercept changes to the TaskRepository? Maybe compare the properties before and after apply is called?
Comment 15 Frank Becker CLA 2012-05-19 13:09:10 EDT
(In reply to comment #14)
> Could you intercept changes to the TaskRepository? Maybe compare the properties
> before and after apply is called?

Yes, please look in PatchSet 3.
Only the following two properties label and Disconnected are ignored
Comment 16 Frank Becker CLA 2012-05-19 13:09:13 EDT
Created attachment 215904 [details]
mylyn/context/zip
Comment 17 Sam Davis CLA 2012-05-22 13:56:06 EDT
That looks like it would work, assuming that the repository page doesn't do something weird and store some information somewhere else, which seems like a reasonable assumption. I"m not sure, though, why you implemented compareTo rather than just using equals(), as it doesn't seem like the order matters. Note that String.compareTo(null) will throw an NPE - I'm not sure whether you need to worry about that here.
Comment 18 Steffen Pingel CLA 2012-05-23 06:25:18 EDT
Thanks Frank. It's too late to take this change on for 3.8 but we should consider it for the next cycle.
Comment 19 Steffen Pingel CLA 2012-05-23 09:59:30 EDT
Frank, I have reverted the changes that were pushed to the master of o.e.m.commons. The compareTo() implementation does not look right and it's not clear to me why it's needed. These type of changes need to be accompanied by tests and should go through a code review before being pushed to master.
Comment 20 Frank Becker CLA 2012-08-26 05:26:13 EDT
Steffen,

I create patch set 4 in review 6013.
Now we no longer need the change in o.e.m.commons. We use equals() instead of compareTo().
Comment 21 Frank Becker CLA 2012-08-26 05:26:29 EDT
Created attachment 220311 [details]
mylyn/context/zip
Comment 22 Frank Becker CLA 2012-10-26 14:59:43 EDT
Steffen,

can you please review this?

Or should I look for an other reviewer?
Comment 23 Sam Davis CLA 2012-11-19 15:00:02 EST
I no longer have a "validate on finish" checkbox when running on master. So, if I can't validate (e.g. if I am offline), I can't finish. Was this change intentional?
Comment 24 Frank Becker CLA 2012-11-19 15:19:57 EST
(In reply to comment #23)
> I no longer have a "validate on finish" checkbox when running on master. So, if
> I can't validate (e.g. if I am offline), I can't finish. Was this change
> intentional?

No that is an regression from bug#253142. I put the fix soon.
Comment 25 Sam Davis CLA 2012-11-19 16:06:15 EST
Great, thanks Frank.
Comment 26 Tomasz Zarna CLA 2013-06-17 09:56:09 EDT
Not sure if I get the UX problem right here, but wouldn't disabling the "Validate" button if the "Validate on finish" is checked spare us the extra validation? Or do we want them both to be enabled all the time?
Comment 27 Tomasz Zarna CLA 2013-06-17 09:57:52 EDT
(In reply to comment #24)
> No that is an regression from bug#253142. I put the fix soon.

Frank, you'll need to rebase your patch on top of that change, as the checkbox is still not there.
Comment 28 Sam Davis CLA 2013-06-20 19:12:23 EDT
(In reply to comment #26)
> Not sure if I get the UX problem right here, but wouldn't disabling the
> "Validate" button if the "Validate on finish" is checked spare us the extra
> validation? Or do we want them both to be enabled all the time?

Yes, sometimes you want to validate without finishing.
Comment 29 Steffen Pingel CLA 2013-06-21 05:55:29 EDT
(In reply to comment #28)
> (In reply to comment #26)
> > Not sure if I get the UX problem right here, but wouldn't disabling the
> > "Validate" button if the "Validate on finish" is checked spare us the extra
> > validation? Or do we want them both to be enabled all the time?
> 
> Yes, sometimes you want to validate without finishing.

Do we actually still need this? If the finish button achieves the same result why have 2 buttons?
Comment 30 Sam Davis CLA 2013-06-21 18:21:03 EDT
Are you suggesting to remove the Validate button? I often want to change the connection setting and see if it validates before I make other changes.
Comment 31 Frank Becker CLA 2013-06-23 15:00:41 EDT
I often use the Validate button direct after filling in the password so I check the other properties after I know that the connection setting are valid.
Comment 32 Frank Becker CLA 2013-10-11 05:45:06 EDT
pushed patch set 8 of review https://git.eclipse.org/r/#/c/6013/ so maybe we can do this for 3.10.
Comment 33 Frank Becker CLA 2013-10-15 01:22:40 EDT
new patch set (9) that use guava AbstractRepositorySettingPage.equalsProperties
Comment 34 Frank Becker CLA 2013-10-15 01:22:46 EDT
Created attachment 236471 [details]
mylyn/context/zip
Comment 35 Steffen Pingel CLA 2013-10-16 13:52:42 EDT
Looks like this is almost ready to be merged. Since we are past the cut off for 3.10 I have updated the milestone to the next release.
Comment 36 Frank Becker CLA 2013-10-17 04:59:57 EDT
review is now in MASTER.