Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify the repository list and URL tabs in the clone dialog #2197

Merged
merged 16 commits into from Feb 5, 2019

Conversation

@jcansdale
Copy link
Collaborator

commented Jan 23, 2019

It appears users rarely change the tab they're initially presented with. This is despite the fact that the different tabs are useful in different circumstances. If the user is cloning a repository they own or have contributed to, the GitHub/GitHub Enterprise tab makes sense. If they're cloning a public repository owned by a different user, it would be necessary to use the URL tab.

What this PR does

This PR combines the repository list and URL tabs so that a user can clone any repository without needing to understand the difference between tabs.

  • Allow filtering repositories by URL or part of URL
  • Allow user to clone any URL in filter box
  • Match repository URLs that include a trailing / or .git
  • Change filter prompt to "Search or enter a URL"
  • Remove the URL tab

To do

  • Ignore trailing / or .git when searching

How to test

Finding a repository by its URL

  1. Click File > Open > Open from GitHub...
  2. Paste the URL for a repository you own into Search or enter a URL
  3. Check repository appears under Your repositories section
  4. Clone or open repository

image

Cloning a public repository by its URL

  1. Click File > Open > Open from GitHub...
  2. Paste the URL for a public repository that you don't own into Search or enter a URL
  3. Check that Clone button is clickable
  4. Clone or open repository

Re-cloning a repository

  1. Click File > Open StartPage
  2. Click on a https:// link under Recent
  3. Check clicked on URL is in Search or enter a URL box
  4. Clone or open repository

image

Cloning a GitHub Enterprise repository by its URL

  1. Copy the URL of a GitHub Enterprise repository
  2. Click File > Open > Open from GitHub...
  3. Check the Enterprise tab is active
  4. Check the URL is in Search or enter a URL box
  5. Clone or open repository

What this PR doesn't do

  • Clone a repository from a server (or user account) that is different to the one currently logged in

What if the user has already logged into a GitHub/Enterprise account, but not the one they they want to clone from? At the moment they would need to open Team Explorer - Connect and sign out/sign in to the correct account. This isn't very discoverable.

This is out of scope for this PR since it also wasn't possible with the previous implementation. Should we offer an explicit login/sign out option in another PR?

  • Automatically confirm that a repository exists for the entered URL

It would be nice if we could automatically check that a repository exists when the user enters a URL. The repository could be automatically added to a section called something like Public repositories.

Alternatively, we could automatically fire off a search and supplement the repository list when the user starts entering a query. This would allow users to find public repositories they about without visiting github.com.

  • Surface starred repositories

We can easily see if a repository has been starred, but we don't currently surface this information. This is likely a useful signal when scanning for a repository in a potentially long list.

Fixes #2187

jcansdale added some commits Jan 23, 2019

Allow user to enter repository URL in filter
If user enters a valid repository URL, expose it as the selected
repository.
Allow filtering my owner URL
Search for URLs that contain the Filter rather than requiring an exact
match.

@meaghanlewis meaghanlewis referenced this pull request Jan 23, 2019

Closed

Development sprint: February 25th release #2178

7 of 15 tasks complete

jcansdale added some commits Jan 28, 2019

Open clone dialog on tab for URL
Add IRepositoryCloneViewModel.Url property.
Select the tab corresponding to the host.
Don't select a tab when host doesn't match.

@jcansdale jcansdale changed the title [wip] Unify the repository list and URL tabs Unify the repository list and URL tabs Jan 29, 2019

@jcansdale jcansdale requested review from grokys and meaghanlewis Jan 29, 2019

@meaghanlewis

This comment has been minimized.

Copy link
Contributor

commented Jan 31, 2019

This looks good to me functionality wise.

@jcansdale jcansdale requested a review from StanleyGoldman Feb 1, 2019

@StanleyGoldman

This comment has been minimized.

Copy link
Contributor

commented Feb 1, 2019

Looks good. What about that last todo?

@meaghanlewis

This comment has been minimized.

Copy link
Contributor

commented Feb 1, 2019

We will also need to update the documentation for this unified dialog here: https://github.com/github/VisualStudio/blob/master/docs/using/cloning-a-repository-to-visual-studio.md#clone-repositories.

I'm happy to do that.

jcansdale added some commits Feb 4, 2019

@jcansdale jcansdale merged commit 86bb524 into master Feb 5, 2019

3 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
github.VisualStudio Build #20190204.36 succeeded
Details

@jcansdale jcansdale deleted the fixes/2187-unify-repository-list-tabs branch Feb 5, 2019

@jcansdale jcansdale referenced this pull request Feb 11, 2019

Open

Release Notes #1

@meaghanlewis meaghanlewis changed the title Unify the repository list and URL tabs Unify the repository list and URL tabs in the clone dialog Feb 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.