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

Consolidate tree views #966

Closed
wants to merge 4 commits into from
Closed

Conversation

RMacfarlane
Copy link
Contributor

@RMacfarlane RMacfarlane commented Feb 20, 2019

#965

Removes the "Changes in Pull Request" tree view

@RMacfarlane RMacfarlane changed the title remove commented out code Consolidate tree views Feb 20, 2019
@rebornix
Copy link
Member

The code looks good in overall (I'll take detailed review later) but it seems we didn't handle restoring from review mode when first launch. For example, we checkout to a branch and start reviews, and then reload the window, navigate to the GitHub viewlet, all trees are collapsed. It requries two expands at least (expand category first, find the pr with checkmark if it's not on the second page, expand that pr) to review the code changes again.

@@ -98,6 +99,9 @@ export const onDidSubmitReview: vscode.Event<Comment[]> = _onDidSubmitReview.eve
export class PullRequestManager {
static ID = 'PullRequestManager';
private _activePullRequest?: PullRequestModel;
public activeFileChanges?: GitFileChange[];
public activeOutdatedFileChanges?: GitFileChange[];
public activeComments?: Comment[];
private _credentialStore: CredentialStore;
Copy link
Member

Choose a reason for hiding this comment

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

Not a fan of having view info in PullRequestManager. We can probably keep the information in prsTreeDataProvider. The ReviewManager takes care of git status change, and modifying PullRequestManager.activePullRequest, prsTreeDataProvider then listens to activePullRequest change event and reveal/refresh the tree when necessary.

@kieferrm kieferrm mentioned this pull request Feb 25, 2019
8 tasks
@meaghanlewis meaghanlewis mentioned this pull request Mar 4, 2019
7 tasks
@RMacfarlane RMacfarlane closed this Mar 5, 2019
@RMacfarlane RMacfarlane deleted the rmacfarlane/tree-consolidation branch September 6, 2019 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants