Skip to content

Commit eb722f6

Browse files
nzaytsevd13
authored andcommitted
Opens multidiff view on open all changes from the home view
1 parent 012eb14 commit eb722f6

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

src/constants.commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ export const enum Commands {
248248
ViewsCopy = 'gitlens.views.copy',
249249
ViewsCopyAsMarkdown = 'gitlens.views.copyAsMarkdown',
250250
ViewsCopyUrl = 'gitlens.views.copyUrl',
251+
ViewsOpenAllChangedFileDiffs = 'gitlens.views.openChangedFileDiffs',
251252
ViewsOpenDirectoryDiff = 'gitlens.views.openDirectoryDiff',
252253
ViewsOpenDirectoryDiffWithWorking = 'gitlens.views.openDirectoryDiffWithWorking',
253254
ViewsOpenUrl = 'gitlens.views.openUrl',

src/webviews/apps/plus/home/components/branch-section.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ export const headingLoaderStyles = css`
117117
`;
118118

119119
export const branchCardStyles = css`
120+
:host {
121+
--gl-card-hover-background: color-mix(in lab, var(--vscode-sideBar-background) 100%, #fff 8%);
122+
}
120123
.branch-item {
121124
position: relative;
122125
}
@@ -196,6 +199,10 @@ export const branchCardStyles = css`
196199
background-color: var(--gl-card-background);
197200
}
198201
202+
.branch-item:hover .branch-item__actions,
203+
.branch-item:focus-within .branch-item__actions {
204+
background-color: var(--gl-card-hover-background);
205+
}
199206
.branch-item:not(:focus-within):not(:hover) .branch-item__actions {
200207
${srOnlyStyles}
201208
}

src/webviews/home/homeWebview.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -773,11 +773,11 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
773773
if (pr?.refs?.base == null || pr.refs.head == null) return;
774774

775775
const comparisonRefs = getComparisonRefsForPullRequest(refs.repoPath, pr.refs);
776-
return this.container.views.searchAndCompare.compare(
777-
comparisonRefs.repoPath,
778-
comparisonRefs.head,
779-
comparisonRefs.base,
780-
);
776+
return this.container.views.searchAndCompare
777+
.compare(comparisonRefs.repoPath, comparisonRefs.head, comparisonRefs.base)
778+
.then(compareNode => {
779+
executeCommand(Commands.ViewsOpenAllChangedFileDiffs, compareNode);
780+
});
781781
}
782782

783783
private async pullRequestViewOnRemote(refs: BranchRef, clipboard?: boolean) {

0 commit comments

Comments
 (0)