Skip to content

Commit 16cdd10

Browse files
committed
Changes quick pick "eye" to open commit details
Changes "search" to reveal in the side bar Adds "Show Details" to commit/commit file quick pick
1 parent 84dff52 commit 16cdd10

File tree

7 files changed

+132
-192
lines changed

7 files changed

+132
-192
lines changed

src/commands/git/log.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,10 @@ export class LogGitCommand extends QuickCommand<State> {
191191

192192
let result: StepResult<ReturnType<typeof getSteps>>;
193193
if (state.openPickInView) {
194-
void GitActions.Commit.showDetailsView(state.reference as GitCommit);
194+
void GitActions.Commit.showDetailsView(state.reference as GitCommit, {
195+
pin: false,
196+
preserveFocus: false,
197+
});
195198
result = StepResult.Break;
196199
} else {
197200
result = yield* getSteps(

src/commands/git/search.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ export class SearchGitCommand extends QuickCommand<State> {
245245

246246
let result: StepResult<ReturnType<typeof getSteps>>;
247247
if (state.openPickInView) {
248-
void GitActions.Commit.showDetailsView(context.commit);
248+
void GitActions.Commit.showDetailsView(context.commit, {
249+
pin: false,
250+
preserveFocus: false,
251+
});
249252
result = StepResult.Break;
250253
} else {
251254
result = yield* getSteps(

src/commands/git/stash.ts

+14-4
Original file line numberDiff line numberDiff line change
@@ -364,9 +364,14 @@ export class StashGitCommand extends QuickCommand<State> {
364364
undefined,
365365
{
366366
placeholder: `Confirm ${context.title}`,
367-
additionalButtons: [QuickCommandButtons.RevealInSideBar],
367+
additionalButtons: [QuickCommandButtons.ShowDetailsView, QuickCommandButtons.RevealInSideBar],
368368
onDidClickButton: (quickpick, button) => {
369-
if (button === QuickCommandButtons.RevealInSideBar) {
369+
if (button === QuickCommandButtons.ShowDetailsView) {
370+
void GitActions.Stash.showDetailsView(state.reference, {
371+
pin: false,
372+
preserveFocus: true,
373+
});
374+
} else if (button === QuickCommandButtons.RevealInSideBar) {
370375
void GitActions.Stash.reveal(state.reference, {
371376
select: true,
372377
expand: true,
@@ -423,9 +428,14 @@ export class StashGitCommand extends QuickCommand<State> {
423428
undefined,
424429
{
425430
placeholder: `Confirm ${context.title}`,
426-
additionalButtons: [QuickCommandButtons.RevealInSideBar],
431+
additionalButtons: [QuickCommandButtons.ShowDetailsView, QuickCommandButtons.RevealInSideBar],
427432
onDidClickButton: (quickpick, button) => {
428-
if (button === QuickCommandButtons.RevealInSideBar) {
433+
if (button === QuickCommandButtons.ShowDetailsView) {
434+
void GitActions.Stash.showDetailsView(state.reference, {
435+
pin: false,
436+
preserveFocus: true,
437+
});
438+
} else if (button === QuickCommandButtons.RevealInSideBar) {
429439
void GitActions.Stash.reveal(state.reference, {
430440
select: true,
431441
expand: true,

src/commands/quickCommand.buttons.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,14 +113,14 @@ export namespace QuickCommandButtons {
113113
tooltip: 'Open in New Window',
114114
};
115115

116-
export const RevealInSideBar: QuickInputButton = {
116+
export const ShowDetailsView: QuickInputButton = {
117117
iconPath: new ThemeIcon('eye'),
118-
tooltip: 'Reveal in Side Bar',
118+
tooltip: 'Show Details',
119119
};
120120

121-
export const SearchInSideBar: QuickInputButton = {
121+
export const RevealInSideBar: QuickInputButton = {
122122
iconPath: new ThemeIcon('search'),
123-
tooltip: 'Search in Side Bar',
123+
tooltip: 'Reveal in Side Bar',
124124
};
125125

126126
export const ShowResultsInSideBar: QuickInputButton = {

0 commit comments

Comments
 (0)