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.

Ensure that the GitHubPaneViewModel is initalized. #1426

Merged
merged 6 commits into from
Feb 8, 2018

Conversation

grokys
Copy link
Contributor

@grokys grokys commented Jan 23, 2018

  • Renamed IGitHubToolWindowManager.ShowHomePane to ShowGitHubPane because the latter is what we call it these days
  • Make IGitHubToolWindowManager.ShowGitHubPane async to make sure that GitHubPaneViewModel.InitializeAsync has finished before passing back a refrence to the GitHubPaneViewModel
  • Make the methods that call IGitHubToolWindowManager.ShowGitHubPane void async with logging when they fail

- Renamed `IGitHubToolWindowManager.ShowHomePane` to `ShowGitHubPane` because the latter is what we call it these days
- Make `IGitHubToolWindowManager.ShowGitHubPane` async to make sure that `GitHubPaneViewModel.InitializeAsync` has finished before passing back a refrence to the `GitHubPaneViewModel`
- Make the methods that call `IGitHubToolWindowManager.ShowGitHubPane` `void async` with logging when they fail
@grokys grokys requested review from shana and jcansdale January 23, 2018 16:14
@jcansdale
Copy link
Collaborator

@grokys,

  • I'm finding the GitHub pane spins forever when I open VS with the pane visible:

image

  • The GitHub.ShowCurrentPullRequest command does seem to work when the GitHub pane is visible.

  • If VS is opened with the GitHub pane closed, the GitHub.ShowCurrentPullRequest command doesn't open the pane.

@grokys grokys changed the title Ensure that the GitHubPaneViewModel is initalized. WIP: Ensure that the GitHubPaneViewModel is initalized. Jan 29, 2018
When the GitHub pane is shown from VS rather than our own code, kick off an initialization of the view model. This means we can't be sure of the state of the view model's initialization so make subsequent calls to the view model async either wait for an ongoing initialization, or exit if already initialized.
@grokys grokys changed the title WIP: Ensure that the GitHubPaneViewModel is initalized. Ensure that the GitHubPaneViewModel is initalized. Feb 7, 2018
@grokys
Copy link
Contributor Author

grokys commented Feb 7, 2018

@jcansdale could you take another look at this? It's hopefully working now.

/// Ensures that the service is initialized.
/// </summary>
/// <returns>A task that when completed indicates that the service is initialized.</returns>
/// <remarks>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simplying? ;-)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, is seems I missed the line with simplying and it isn't showing up for me as an in-line comment. What's going on? 😕

jcansdale
jcansdale previously approved these changes Feb 7, 2018
Copy link
Collaborator

@jcansdale jcansdale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a test merge with #1396 and this is working great! Apart from the typo I didn't notice any other issues. LGTM. 😄

Copy link
Collaborator

@jcansdale jcansdale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grokys grokys merged commit 54ef0b8 into master Feb 8, 2018
@grokys grokys deleted the fixes/githubpane-initialization branch February 8, 2018 12:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants