Bug 533369 - "Add existing Git repo" wizard require user to press the Search button to update the list of repositories
Summary: "Add existing Git repo" wizard require user to press the Search button to upd...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 4.10   Edit
Hardware: PC Windows 10
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
Depends on:
Blocks:
 
Reported: 2018-04-09 05:49 EDT by Pradeep Balachandran CLA
Modified: 2019-09-18 06:33 EDT (History)
3 users (show)

See Also:


Attachments
Add Existing Git Repo Dialog (Photon M6) (24.35 KB, image/png)
2018-04-09 05:49 EDT, Pradeep Balachandran CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pradeep Balachandran CLA 2018-04-09 05:49:15 EDT
Created attachment 273492 [details]
Add Existing Git Repo Dialog (Photon M6)

Eclipse Platform (with JDT and EGit)

Version: Photon (4.8)
Build id: I20180405-2000

In the dialog for adding an exiting Git repo, user has to click on the "Search" button for it to start acting on the input in the Directory textbox. This textbox does nothing when hitting 'ENTER', which is typically the expected behavior.
Comment 1 Pradeep Balachandran CLA 2018-04-09 06:02:32 EDT
EGit version: 4.10.0.201712302008-r
Comment 2 Thomas Wolf CLA 2018-04-11 03:45:19 EDT
Not a bug in my opinion. In a dialog, <ENTER> is bound to the default button ("Finish" in this case), which is disabled at that time because no repository is selected.
Comment 3 Pradeep Balachandran CLA 2018-04-11 13:45:05 EDT
I expect the behavior to be consistent with other wizards. For example, in 'File > Import > Existing Projects into Workspace' Wizard, user can hit ENTER in the "Select root directory" textbox after typing in a path. 

My suggestion is to mimic the behavior of 'Select root directory' textbox.
Comment 4 Thomas Wolf CLA 2018-04-11 14:22:03 EDT
And in Package Explorer, Context Menu->New project...->General Project, in the "Location" field, you can't use <ENTER>.

Moreover, here in the "Add existing git repo" dialog, there are even two buttons associated with this text field, "Browse..." and "Search". Why should one be favoured over the other?

My recommendation is still "won't fix".
Comment 5 Michael Keppler CLA 2018-04-11 14:40:15 EDT
As a kind of compromise, you could change the dialog default button to the search button _as long as_ the hint about needing a new search is displayed at the top. 

That would probably lead to the desired effect of starting a search only if it is needed (and of finishing the dialog otherwise).
Comment 6 Thomas Wolf CLA 2018-04-11 14:46:41 EDT
(In reply to Michael Keppler from comment #5)
> As a kind of compromise, you could change the dialog default button to the
> search button _as long as_ the hint about needing a new search is displayed
> at the top. 

Perhaps. Though intercepting <ENTER> sometimes and sometimes not is going to be confusing. And I think with two buttons it makes no sense at all. What if I type in a prefix of the path I want? I might just as well expect "Enter" to activate the "Browse..." button!

BTW: with the focus on the text field, the sequence <TAB> <SPACE> will activate "Browse...", and <TAB> <TAB> <SPACE> will activate "Search". So there is a reasonable way to perform these actions using the keyboard only.
Comment 7 Pradeep Balachandran CLA 2018-04-11 23:57:51 EDT
(In reply to Thomas Wolf from comment #4)
> And in Package Explorer, Context Menu->New project...->General Project, in
> the "Location" field, you can't use <ENTER>.

This is not the right example. In this case, it is the expected behavior because the purpose of the textbox is not same as in EGit wizard. 

The value in the Location textbox in New Project wizard doesn't have to be processed to show additional data in the wizard. In the case of the Directory textbox of Add Existing Git Repo dialog, the value has to be processed and additional data shown to the user, before the user can proceed. 

That is why I mentioned the wizard for importing existing project into workspace as an example - there the purpose of the textbox is similar to the Directory textbox in this wizard.

> Moreover, here in the "Add existing git repo" dialog, there are even two
> buttons associated with this text field, "Browse..." and "Search". Why
> should one be favoured over the other?

My suggestion is to simplify it by removing the Search button and use ENTER instead.

The following approaches provide as a way to accept the value and start populating the contents in the list of repos:
1. Allow ENTER. (simple, intuitive)
2. Do it implicitly on change of focus (from textbox) if its content changed. (smart but complex, confusing)
3. Same behavior as now (simple, confusing). 
 
> My recommendation is still "won't fix".

That's your call as the developer. I am hoping it won't be "won't fix" :-)
Comment 8 Thomas Wolf CLA 2018-04-12 02:25:58 EDT
(In reply to Pradeep Balachandran from comment #7)
> > Moreover, here in the "Add existing git repo" dialog, there are even two
> > buttons associated with this text field, "Browse..." and "Search". Why
> > should one be favoured over the other?
> 
> My suggestion is to simplify it by removing the Search button and use ENTER
> instead.

No. We won't hide operations like that.

> The following approaches provide as a way to accept the value and start
> populating the contents in the list of repos:
> 1. Allow ENTER. (simple, intuitive)

Personally, I wouldn't find this intuitive at all.
Comment 9 Pradeep Balachandran CLA 2018-04-12 04:29:10 EDT
(In reply to Thomas Wolf from comment #8)
> (In reply to Pradeep Balachandran from comment #7)
> > > Moreover, here in the "Add existing git repo" dialog, there are even two
> > > buttons associated with this text field, "Browse..." and "Search". Why
> > > should one be favoured over the other?
> > 
> > My suggestion is to simplify it by removing the Search button and use ENTER
> > instead.
> 
> No. We won't hide operations like that.

Sorry, that's not hiding, on the contrary, making it obvious by following a common pattern, like in other wizards in Eclipse and in other scenarios like the address field in a browser.
Comment 10 Lars Vogel CLA 2019-09-18 06:32:21 EDT
Maybe once the user changes the path you could update the list of repositories? 

Or you use a delayed observer which triggers the update after 400 ms if the user changes the path. Databinding has nice support for this.

For example, I changed /scratch/gda/workspace_git/gda-aggregator to /scratch/gda/workspace_git/ and waited a while for the new Git repos to appear. Took me a while to realize that I have to press the Search button.