Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Signal completion when opening repository using Get to Code #2212

Merged

Conversation

jcansdale
Copy link
Collaborator

@jcansdale jcansdale commented Feb 4, 2019

When the Get to Code flow calls AcquireCodeContainerAsync, it uses downloadProgress completion as a signal to close the dialog. This PR ensures that this signal is sent when opening a repository as well as cloning a repository.

What this PR does

  • Adds tests for the GitHub.StartPage project / GitHubContainerProvider class
  • Signal downloadProgress as complete before AcquireCodeContainerAsync returns a CodeContainer

It uses the following call to signal completion (1 of 1 steps complete with no progress message):

downloadProgress.Report(new ServiceProgressData(string.Empty, string.Empty, 1, 1));

How to test

  1. Install a version of Visual Studio 2019 that includes Get to Code + GitHub integration
  2. Open Visual Studio 2019
  3. Install Dogfood VSIX + restart VS
  4. Click Tools > Dogfood and select .vsix artifact (or URL) for this PR + restart VS
  5. Click Clone or checkout code
  6. Click on GitHub button under Browse a repository
  7. Select a repository + local path that already exists
  8. Click on Open button
  9. Expect Clone or checkout code window to close
  10. Expect your repository to be visible on Team Explorer tool window

Fixes #2211

When returning a container it should report all steps complete.
When a repository is opened rather than cloned, the operation won't
have reported any progress. As a workaround, report 1/1 steps complete
before returning a CodeContainer.
@jcansdale jcansdale changed the title [wip] Signal completion when opening repository using Get to Code Signal completion when opening repository using Get to Code Feb 4, 2019
@jcansdale jcansdale merged commit e96f0b8 into master Feb 5, 2019
@jcansdale jcansdale deleted the fixes/2211-signal-complete-when-opening-from-start-page branch February 5, 2019 11:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clone dialog remains visible after opening a repository
2 participants