Skip to content

Commit

Permalink
Fixes view item revealing
Browse files Browse the repository at this point in the history
Adds proper reveal to repo folders
Adds reveal to contributors git commands
  • Loading branch information
eamodio committed Dec 18, 2021
1 parent e378c14 commit 0d3a6dc
Show file tree
Hide file tree
Showing 33 changed files with 535 additions and 151 deletions.
7 changes: 7 additions & 0 deletions package.json
Expand Up @@ -1614,6 +1614,13 @@
"markdownDescription": "Specifies whether to show avatar images instead of commit (or status) icons in the _Contributors_ view",
"scope": "window",
"order": 60
},
"gitlens.views.contributors.reveal": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to reveal contributors in the _Contributors_ view, otherwise they revealed in the _Repositories_ view",
"scope": "window",
"order": 20
}
}
},
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/branch.ts
Expand Up @@ -4,6 +4,7 @@ import { Container } from '../../container';
import { GitBranchReference, GitReference, Repository } from '../../git/git';
import { FlagsQuickPickItem, QuickPickItemOfT } from '../../quickpicks';
import { Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,
Expand All @@ -24,6 +25,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
showTags: boolean;
title: string;
}
Expand Down Expand Up @@ -148,6 +150,7 @@ export class BranchGitCommand extends QuickCommand<State> {

protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
associatedView: Container.instance.branchesView,
repos: Container.instance.git.openRepositories,
showTags: false,
title: this.title,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/cherry-pick.ts
Expand Up @@ -2,6 +2,7 @@
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/git';
import { FlagsQuickPickItem } from '../../quickpicks';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
PartialStepState,
Expand All @@ -19,6 +20,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
cache: Map<string, Promise<GitLog | undefined>>;
destination: GitBranch;
selectedBranchOrTag: GitReference | undefined;
Expand Down Expand Up @@ -81,6 +83,7 @@ export class CherryPickGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
cache: new Map<string, Promise<GitLog | undefined>>(),
destination: undefined!,
selectedBranchOrTag: undefined,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/coauthors.ts
Expand Up @@ -3,6 +3,7 @@ import { commands } from 'vscode';
import { Container } from '../../container';
import { GitContributor, Repository } from '../../git/git';
import { Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
PartialStepState,
pickContributorsStep,
Expand All @@ -16,6 +17,7 @@ import {
interface Context {
repos: Repository[];
activeRepo: Repository | undefined;
associatedView: ViewsWithRepositoryFolders;
title: string;
}

Expand Down Expand Up @@ -94,6 +96,7 @@ export class CoAuthorsGitCommand extends QuickCommand<State> {
const context: Context = {
repos: Container.instance.git.openRepositories,
activeRepo: undefined,
associatedView: Container.instance.contributorsView,
title: this.title,
};

Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/fetch.ts
Expand Up @@ -4,6 +4,7 @@ import { Container } from '../../container';
import { GitBranchReference, GitReference, Repository } from '../../git/git';
import { FlagsQuickPickItem } from '../../quickpicks';
import { Arrays, Dates, Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,
Expand All @@ -19,6 +20,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
title: string;
}

Expand Down Expand Up @@ -68,6 +70,7 @@ export class FetchGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
title: this.title,
};

Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/log.ts
Expand Up @@ -4,6 +4,7 @@ import { Container } from '../../container';
import { GitLog, GitLogCommit, GitReference, Repository } from '../../git/git';
import { GitUri } from '../../git/gitUri';
import { Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import { GitCommandsCommand } from '../gitCommands';
import {
PartialStepState,
Expand All @@ -18,6 +19,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
cache: Map<string, Promise<GitLog | undefined>>;
selectedBranchOrTag: GitReference | undefined;
title: string;
Expand Down Expand Up @@ -77,6 +79,7 @@ export class LogGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
cache: new Map<string, Promise<GitLog | undefined>>(),
selectedBranchOrTag: undefined,
title: this.title,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/merge.ts
Expand Up @@ -3,6 +3,7 @@ import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/git';
import { Directive, DirectiveQuickPickItem, FlagsQuickPickItem } from '../../quickpicks';
import { Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,
Expand All @@ -21,6 +22,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
cache: Map<string, Promise<GitLog | undefined>>;
destination: GitBranch;
pickCommit: boolean;
Expand Down Expand Up @@ -78,6 +80,7 @@ export class MergeGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
cache: new Map<string, Promise<GitLog | undefined>>(),
destination: undefined!,
pickCommit: false,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/pull.ts
Expand Up @@ -4,6 +4,7 @@ import { Container } from '../../container';
import { GitBranch, GitBranchReference, GitReference, Repository } from '../../git/git';
import { Directive, DirectiveQuickPickItem, FlagsQuickPickItem } from '../../quickpicks';
import { Arrays, Dates, Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,
Expand All @@ -20,6 +21,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
title: string;
}

Expand Down Expand Up @@ -74,6 +76,7 @@ export class PullGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
title: this.title,
};

Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/push.ts
Expand Up @@ -5,6 +5,7 @@ import { Container } from '../../container';
import { GitBranch, GitBranchReference, GitReference, Repository } from '../../git/git';
import { Directive, DirectiveQuickPickItem, FlagsQuickPickItem } from '../../quickpicks';
import { Arrays, Dates, Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,
Expand All @@ -22,6 +23,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
title: string;
}

Expand Down Expand Up @@ -80,6 +82,7 @@ export class PushGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
title: this.title,
};

Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/rebase.ts
Expand Up @@ -4,6 +4,7 @@ import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevision, Repository } from '../../git/git';
import { Directive, DirectiveQuickPickItem, FlagsQuickPickItem } from '../../quickpicks';
import { Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
AsyncStepResultGenerator,
Expand All @@ -22,6 +23,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
cache: Map<string, Promise<GitLog | undefined>>;
destination: GitBranch;
pickCommit: boolean;
Expand Down Expand Up @@ -99,6 +101,7 @@ export class RebaseGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
cache: new Map<string, Promise<GitLog | undefined>>(),
destination: undefined!,
pickCommit: false,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/reset.ts
Expand Up @@ -2,6 +2,7 @@
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevisionReference, Repository } from '../../git/git';
import { FlagsQuickPickItem } from '../../quickpicks';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
PartialStepState,
Expand All @@ -18,6 +19,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
cache: Map<string, Promise<GitLog | undefined>>;
destination: GitBranch;
title: string;
Expand Down Expand Up @@ -72,6 +74,7 @@ export class ResetGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
cache: new Map<string, Promise<GitLog | undefined>>(),
destination: undefined!,
title: this.title,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/revert.ts
Expand Up @@ -2,6 +2,7 @@
import { Container } from '../../container';
import { GitBranch, GitLog, GitReference, GitRevisionReference, Repository } from '../../git/git';
import { FlagsQuickPickItem } from '../../quickpicks';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
PartialStepState,
Expand All @@ -18,6 +19,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
cache: Map<string, Promise<GitLog | undefined>>;
destination: GitBranch;
title: string;
Expand Down Expand Up @@ -74,6 +76,7 @@ export class RevertGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
cache: new Map<string, Promise<GitLog | undefined>>(),
destination: undefined!,
title: this.title,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/search.ts
Expand Up @@ -5,6 +5,7 @@ import { GitLog, GitLogCommit, Repository, SearchOperators, searchOperators, Sea
import { ActionQuickPickItem, QuickPickItemOfT } from '../../quickpicks';
import { Strings } from '../../system';
import { SearchResultsNode } from '../../views/nodes';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import { GitCommandsCommand } from '../gitCommands';
import {
appendReposToTitle,
Expand All @@ -22,6 +23,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
commit: GitLogCommit | undefined;
resultsKey: string | undefined;
resultsPromise: Promise<GitLog | undefined> | undefined;
Expand Down Expand Up @@ -92,6 +94,7 @@ export class SearchGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.searchAndCompareView,
commit: undefined,
resultsKey: undefined,
resultsPromise: undefined,
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/show.ts
Expand Up @@ -2,6 +2,7 @@
import { Container } from '../../container';
import { GitAuthor, GitLogCommit, GitRevisionReference, GitStashCommit, Repository } from '../../git/git';
import { CommandQuickPickItem, CommitFilesQuickPickItem, GitCommandQuickPickItem } from '../../quickpicks';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
PartialStepState,
pickCommitStep,
Expand All @@ -17,6 +18,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
title: string;
}

Expand Down Expand Up @@ -77,6 +79,7 @@ export class ShowGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
title: this.title,
};

Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/stash.ts
Expand Up @@ -8,6 +8,7 @@ import { Logger } from '../../logger';
import { Messages } from '../../messages';
import { FlagsQuickPickItem, QuickPickItemOfT } from '../../quickpicks';
import { Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import { GitActions, GitCommandsCommand } from '../gitCommands';
import {
appendReposToTitle,
Expand All @@ -27,6 +28,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
title: string;
}

Expand Down Expand Up @@ -145,6 +147,7 @@ export class StashGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.stashesView,
title: this.title,
};

Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/status.ts
Expand Up @@ -4,6 +4,7 @@ import { Container } from '../../container';
import { GitReference, GitStatus, Repository } from '../../git/git';
import { CommandQuickPickItem, GitCommandQuickPickItem } from '../../quickpicks';
import { Strings } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
PartialStepState,
pickRepositoryStep,
Expand All @@ -16,6 +17,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
status: GitStatus;
title: string;
}
Expand Down Expand Up @@ -56,6 +58,7 @@ export class StatusGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
status: undefined!,
title: this.title,
};
Expand Down
3 changes: 3 additions & 0 deletions src/commands/git/switch.ts
Expand Up @@ -4,6 +4,7 @@ import { BranchSorting } from '../../config';
import { Container } from '../../container';
import { GitReference, Repository } from '../../git/git';
import { Arrays } from '../../system';
import { ViewsWithRepositoryFolders } from '../../views/viewBase';
import {
appendReposToTitle,
inputBranchNameStep,
Expand All @@ -21,6 +22,7 @@ import {

interface Context {
repos: Repository[];
associatedView: ViewsWithRepositoryFolders;
showTags: boolean;
title: string;
}
Expand Down Expand Up @@ -89,6 +91,7 @@ export class SwitchGitCommand extends QuickCommand<State> {
protected async *steps(state: PartialStepState<State>): StepGenerator {
const context: Context = {
repos: Container.instance.git.openRepositories,
associatedView: Container.instance.commitsView,
showTags: false,
title: this.title,
};
Expand Down

0 comments on commit 0d3a6dc

Please sign in to comment.