Browse Source

Closes #1156 - adds quick open file history

main
Eric Amodio 4 years ago
parent
commit
60adad8541
5 changed files with 58 additions and 13 deletions
  1. +6
    -0
      CHANGELOG.md
  2. +38
    -8
      package.json
  3. +1
    -0
      src/commands/common.ts
  4. +1
    -1
      src/commands/showQuickFileHistory.ts
  5. +12
    -4
      src/webviews/apps/settings/partials/menus.html

+ 6
- 0
CHANGELOG.md View File

@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
## [Unreleased]
### Added
- Adds a new _Quick Open File History_ command to all places where _Open File History_ already exists — closes [#1156](https://github.com/eamodio/vscode-gitlens/issues/1156)
## [11.1.3] - 2021-01-05
### Fixed

+ 38
- 8
package.json View File

@ -133,6 +133,7 @@
"onCommand:gitlens.showQuickRevisionDetailsInDiffLeft",
"onCommand:gitlens.showQuickRevisionDetailsInDiffRight",
"onCommand:gitlens.showQuickFileHistory",
"onCommand:gitlens.quickOpenFileHistory",
"onCommand:gitlens.showQuickBranchHistory",
"onCommand:gitlens.showQuickRepoHistory",
"onCommand:gitlens.showQuickRepoStatus",
@ -3128,6 +3129,11 @@
"category": "GitLens"
},
{
"command": "gitlens.quickOpenFileHistory",
"title": "Quick Open File History",
"category": "GitLens"
},
{
"command": "gitlens.showQuickBranchHistory",
"title": "Show Branch History",
"category": "GitLens"
@ -4963,6 +4969,10 @@
"when": "gitlens:activeFileStatus =~ /tracked/"
},
{
"command": "gitlens.quickOpenFileHistory",
"when": "gitlens:activeFileStatus =~ /tracked/"
},
{
"command": "gitlens.showQuickBranchHistory",
"when": "gitlens:enabled"
},
@ -5981,6 +5991,11 @@
"group": "2_gitlens@5"
},
{
"command": "gitlens.quickOpenFileHistory",
"when": "gitlens:activeFileStatus =~ /tracked/ && config.gitlens.menus.editor.history",
"group": "2_gitlens@6"
},
{
"submenu": "gitlens/editor/annotations",
"when": "editorTextFocus && gitlens:activeFileStatus =~ /blameable/ && config.gitlens.menus.editor.blame",
"group": "2_gitlens_1@5"
@ -6151,6 +6166,11 @@
"command": "gitlens.showFileHistoryInView",
"when": "gitlens:enabled && config.gitlens.menus.editorTab.history",
"group": "2_gitlens@4"
},
{
"command": "gitlens.quickOpenFileHistory",
"when": "gitlens:enabled && config.gitlens.menus.editorTab.history",
"group": "2_gitlens@5"
}
],
"explorer/context": [
@ -6174,7 +6194,12 @@
{
"command": "gitlens.showFileHistoryInView",
"when": "!explorerResourceIsRoot && !explorerResourceIsFolder && gitlens:enabled && config.gitlens.menus.explorer.history",
"group": "4_gitlens@3"
"group": "4_timeline@2"
},
{
"command": "gitlens.quickOpenFileHistory",
"when": "!explorerResourceIsRoot && !explorerResourceIsFolder && gitlens:enabled && config.gitlens.menus.explorer.history",
"group": "4_timeline@3"
},
{
"command": "gitlens.copyRemoteFileUrlToClipboard",
@ -6237,21 +6262,16 @@
{
"command": "gitlens.openFileOnRemote",
"when": "gitlens:enabled && gitlens:hasRemotes && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.remote",
"group": "navigation@97",
"group": "navigation@96",
"alt": "gitlens.copyRemoteFileUrlToClipboard"
},
{
"command": "gitlens.openFileOnRemoteFrom",
"when": "gitlens:enabled && gitlens:hasRemotes && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.remote",
"group": "navigation@98",
"group": "navigation@97",
"alt": "gitlens.copyRemoteFileUrlFrom"
},
{
"command": "gitlens.showFileHistoryInView",
"when": "gitlens:enabled && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.history",
"group": "navigation@99"
},
{
"command": "gitlens.stashSaveFiles",
"when": "gitlens:enabled && !gitlens:readonly && scmProvider == git && scmResourceGroup =~ /^(workingTree|index)$/ && config.gitlens.menus.scmItem.stash",
"group": "1_modification@2"
@ -6260,6 +6280,16 @@
"command": "gitlens.copyRemoteFileUrlToClipboard",
"when": "gitlens:enabled && gitlens:hasRemotes && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.clipboard",
"group": "2_gitlens@1"
},
{
"command": "gitlens.showFileHistoryInView",
"when": "gitlens:enabled && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.history",
"group": "4_timeline@2"
},
{
"command": "gitlens.quickOpenFileHistory",
"when": "gitlens:enabled && scmProvider == git && scmResourceGroup =~ /^(workingTree|index|merge)$/ && config.gitlens.menus.scmItem.history",
"group": "4_timeline@3"
}
],
"timeline/item/context": [

+ 1
- 0
src/commands/common.ts View File

@ -97,6 +97,7 @@ export enum Commands {
PullRepositories = 'gitlens.pullRepositories',
PushRepositories = 'gitlens.pushRepositories',
GitCommands = 'gitlens.gitCommands',
QuickOpenFileHistory = 'gitlens.quickOpenFileHistory',
RefreshHover = 'gitlens.refreshHover',
ResetRemoteConnectionAuthorization = 'gitlens.resetRemoteConnectionAuthorization',
ResetSuppressedWarnings = 'gitlens.resetSuppressedWarnings',

+ 1
- 1
src/commands/showQuickFileHistory.ts View File

@ -21,7 +21,7 @@ export interface ShowQuickFileHistoryCommandArgs {
@command()
export class ShowQuickFileHistoryCommand extends ActiveEditorCachedCommand {
constructor() {
super([Commands.ShowFileHistoryInView, Commands.ShowQuickFileHistory]);
super([Commands.ShowFileHistoryInView, Commands.ShowQuickFileHistory, Commands.QuickOpenFileHistory]);
}
protected preExecute(context: CommandContext, args?: ShowQuickFileHistoryCommandArgs) {

+ 12
- 4
src/webviews/apps/settings/partials/menus.html View File

@ -77,7 +77,9 @@
data-setting-type="object"
disabled
/>
<label for="menus.editor.history">Add <i>Open File History</i> command</label>
<label for="menus.editor.history"
>Add <i>Open File History</i> and <i>Quick Open File History</i> commands</label
>
</div>
</div>
@ -179,7 +181,9 @@
data-setting-type="object"
disabled
/>
<label for="menus.editorTab.history">Add <i>Open File History</i> command</label>
<label for="menus.editorTab.history"
>Add <i>Open File History</i> and <i>Quick Open File History</i> commands</label
>
</div>
</div>
</div>
@ -301,7 +305,9 @@
data-setting-type="object"
disabled
/>
<label for="menus.explorer.history">Add <i>Open File History</i> command</label>
<label for="menus.explorer.history"
>Add <i>Open File History</i> and <i>Quick Open File History</i> commands</label
>
</div>
</div>
@ -501,7 +507,9 @@
data-setting-type="object"
disabled
/>
<label for="menus.scmItem.history">Add <i>Open File History</i> command</label>
<label for="menus.scmItem.history"
>Add <i>Open File History</i> and <i>Quick Open File History</i> commands</label
>
</div>
</div>

||||||
x
 
000:0
Loading…
Cancel
Save