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

GitHub extension stopped reporting progress when cloning from the Start Page #2196

Closed
prasethu opened this issue Jan 23, 2019 · 3 comments

Comments

@prasethu
Copy link
Collaborator

commented Jan 23, 2019

In all recent versions of the GitHub extension, I've noticed that a clone from the Start Page does not show progress on the status bar of Visual Studio.

On debugging the Clone API call in Team Explorer I found that a null IProgress was being sent and hence progress cannot be reported.

We're planning to add this feature to the Start Window and this lack of progress will cause experience gaps.

@prasethu

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 23, 2019

@jcansdale / @meaghanlewis looping you in based on the history of this repo 😄 I think @shana worked on the original implementation.

I'm on the VS team and noticed this on the debugger. I think progress is currently broken in the clone api that the GitHub extension calls, so if you could validate that when IProgress passed to the clone API is non-null, that would help a lot.

This is the file where a Code Container Provider is declared: VisualStudio/src/GitHub.StartPage/StartPagePackage.cs

I'm happy to talk more if needed.

//cc: @prnadago

@jcansdale

This comment has been minimized.

Copy link
Collaborator

commented Jan 24, 2019

Hi @prasethu,

I disabled this when working on a VS 2019 compatible version before the VS preview was out.

#if TEAMEXPLORER14
await StartClonenOnConnectPageAsync(teamExplorer, cloneUrl, clonePath, recurseSubmodules);
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
await WaitForCloneOnHomePageAsync(teamExplorer);
#elif TEAMEXPLORER15 || TEAMEXPLORER16
// The ServiceProgressData type is in a Visual Studio 2019 assembly that we don't currently have access to.
// Using reflection to call the CloneAsync in order to avoid conflicts with the Visual Studio 2017 version.
// Progress won't be displayed on the status bar, but it appears prominently on the Team Explorer Home view.
var gitExt = serviceProvider.GetService<IGitActionsExt>();
var cloneAsyncMethod = typeof(IGitActionsExt).GetMethod(nameof(IGitActionsExt.CloneAsync));
Assumes.NotNull(cloneAsyncMethod);
var cloneParameters = new object[] { cloneUrl, clonePath, recurseSubmodules, null, null };
var cloneTask = (Task)cloneAsyncMethod.Invoke(gitExt, cloneParameters);
NavigateToHomePage(teamExplorer); // Show progress on Team Explorer - Home
await cloneTask;
#endif

Now that I've got the VS 2019 assemblies to target, I should be able to reinstate it. 🤞 I'll keep you posted!

@prasethu

This comment has been minimized.

Copy link
Collaborator Author

commented Jan 24, 2019

Thanks @jcansdale ! There's a chance that this experience will ship in the next preview, so if you could make this work and build me a private VSIX I can try it on my side.

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.