From 4adbf0e51f53a8b68380745808fcb8512e438e33 Mon Sep 17 00:00:00 2001 From: Eric Amodio Date: Wed, 24 Nov 2021 15:57:24 -0500 Subject: [PATCH] Adds an arrow to the open changes action on hovers Makes commit ids code-blocks in hovers to stand out more Updates the tooltip for clarity as well --- src/git/formatters/commitFormatter.ts | 10 +++++----- src/views/nodes/commitNode.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/git/formatters/commitFormatter.ts b/src/git/formatters/commitFormatter.ts index 8617b08..ffc71ab 100644 --- a/src/git/formatters/commitFormatter.ts +++ b/src/git/formatters/commitFormatter.ts @@ -289,7 +289,7 @@ export class CommitFormatter extends Formatter { this._options.tokenOptions.commands, )}\``; - commands += `  **[\`${GlyphChars.MuchLessThan}\`](${DiffWithCommand.getMarkdownCommandArgs({ + commands += `  [$(chevron-left)$(compare-changes)](${DiffWithCommand.getMarkdownCommandArgs({ lhs: { sha: diffUris.previous.sha ?? emptyStr, uri: diffUris.previous.documentUri(), @@ -300,7 +300,7 @@ export class CommitFormatter extends Formatter { }, repoPath: this._item.repoPath, line: this._options.editor?.line, - })} "Open Changes")** `; + })} "Open Changes with Previous Revision")`; } else { commands = `\`${this._padOrTruncate( GitRevision.shorten( @@ -315,14 +315,14 @@ export class CommitFormatter extends Formatter { const separator = '   |   '; - commands = `---\n\n[$(git-commit) ${this.id}](${ShowQuickCommitCommand.getMarkdownCommandArgs( + commands = `---\n\n[\`$(git-commit) ${this.id}\`](${ShowQuickCommitCommand.getMarkdownCommandArgs( this._item.sha, )} "Show Commit")`; - commands += `   [$(compare-changes)](${DiffWithCommand.getMarkdownCommandArgs( + commands += `  [$(chevron-left)$(compare-changes)](${DiffWithCommand.getMarkdownCommandArgs( this._item, this._options.editor?.line, - )} "Open Changes")`; + )} "Open Changes with Previous Revision")`; if (this._item.previousSha != null) { const uri = GitUri.toRevisionUri( diff --git a/src/views/nodes/commitNode.ts b/src/views/nodes/commitNode.ts index 4f6ebef..5ae5a1a 100644 --- a/src/views/nodes/commitNode.ts +++ b/src/views/nodes/commitNode.ts @@ -151,7 +151,7 @@ export class CommitNode extends ViewRefNode