Skip to content

Commit

Permalink
Removes docked history view (wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Sep 10, 2018
1 parent f01a8b7 commit 3779835
Show file tree
Hide file tree
Showing 20 changed files with 172 additions and 483 deletions.
43 changes: 15 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,16 @@ For more advanced customizations, refer to the [settings documentation](#gitlens

### GitLens Explorer

A [customizable](#gitlens-explorer-settings 'Jump to the GitLens Explorer settings') explorer to navigate and explore repositories or file histories. The _GitLens_ explorer provides two views (modes) — a Repository view and a File History view.

- A toolbar provides _Search Commits_, _Switch to Repository View_ or _Switch to File History View_, and _Refresh_ commands
- Quickly switch between views using the _Switch to Repository View_ or _Switch to File History View_ commands
- A context menu provides _Automatic Layout_, _List Layout_, _Tree Layout_, _Enable Automatic Refresh_ or _Disable Automatic Refresh_, and _Follow Renames_ or _Don't Follow Renames_ commands

#### Repository view

<p align="center">
<img src="https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/ss-gitlens-explorer-repository.png" alt="GitLens Explorer Repository view" />
<img src="https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/ss-gitlens-explorer-repository.png" alt="GitLens Explorer" />
</p>

The repository view provides a full Git repository explorer, which has the following features,
A [customizable](#gitlens-explorer-settings 'Jump to the GitLens Explorer settings') explorer to navigate and explore repositories.

- A toolbar provides _Search Commits_, and _Refresh_ commands
- A context menu provides _Automatic Layout_, _List Layout_, _Tree Layout_, and _Enable Automatic Refresh_ or _Disable Automatic Refresh_ commands

The explorer provides a full Git repository explorer, which has the following features,

- **Repository Status**

Expand Down Expand Up @@ -223,20 +220,6 @@ The repository view provides a full Git repository explorer, which has the follo
- Revisions (commits) expand to show the set of files changed, complete with status indicators for adds, changes, renames, and deletes
- See the _Revisions (commits) expand_ section under **Branches** above for more details

### File History view

<p align="center">
<img src="https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/ss-gitlens-explorer-history.png" alt="GitLens Explorer File History view" />
</p>

The file history view provides the revision history of the current file, which has the following features,

- Automatically updates to track the current editor
- A context menu provides _Open File_, _Open File in Remote_ (if available), and _Refresh_ commands
- An inline toolbar provides an _Open File_ command
- Context menus for each revision (commit) provides
- _Open Changes_, _Open Changes with Working File_, _Open File_, _Open Revision_, _Open File in Remote_ (if available), _Open Revision in Remote_ (if available), _Apply Changes_, _Compare with Selected_ (when available), _Select for Compare_, and _Show Commit File Details_ commands

---

### GitLens File History Explorer
Expand All @@ -245,7 +228,12 @@ The file history view provides the revision history of the current file, which h
<img src="https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/ss-gitlens-history-explorer.png" alt="GitLens File History Explorer" />
</p>

A [customizable](#gitlens-file-history-explorer-settings 'Jump to the GitLens File History Explorer settings') stand-alone explorer to visualize the history of the current file &mdash; undocked version of the _GitLens_ Explorer history view
A [customizable](#gitlens-file-history-explorer-settings 'Jump to the GitLens File History Explorer settings') explorer to visualize the revision history of the current file.

- A toolbar provides a _Refresh_ command
- A context menu provides a _Follow Renames_ or _Don't Follow Renames_ command

The file history view provides the revision history of the current file, which has the following features,

- Automatically updates to track the current editor
- A context menu provides _Open File_, _Open File in Remote_ (if available), and _Refresh_ commands
Expand Down Expand Up @@ -681,14 +669,13 @@ See also [Explorer Settings](#explorer-settings 'Jump to the Explorer settings')
| ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `gitlens.gitExplorer.autoRefresh` | Specifies whether to automatically refresh the _GitLens_ explorer when the repository or the file system changes |
| `gitlens.gitExplorer.branches.layout` | Specifies how the _GitLens_ explorer will display branches<br />`list` - displays branches as a list<br />`tree` - displays branches as a tree when branch names contain slashes `/` |
| `gitlens.gitExplorer.enabled` | Specifies whether to show the _GitLens_ explorer" |
| `gitlens.gitExplorer.enabled` | Specifies whether to show the _GitLens_ explorer |
| `gitlens.gitExplorer.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _GitLens_ explorer<br />Only applies when `gitlens.gitExplorer.files.layout` is set to `tree` or `auto` |
| `gitlens.gitExplorer.files.layout` | Specifies how the _GitLens_ explorer will display files<br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.gitExplorer.files.threshold` value and the number of files at each nesting level<br />`list` - displays files as a list<br />`tree` - displays files as a tree |
| `gitlens.gitExplorer.files.threshold` | Specifies when to switch between displaying files as a `tree` or `list` based on the number of files in a nesting level in the _GitLens_ explorer<br />Only applies when `gitlens.gitExplorer.files.layout` is set to `auto` |
| `gitlens.gitExplorer.includeWorkingTree` | Specifies whether to include working tree files inside the `Repository Status` node of the _GitLens_ explorer |
| `gitlens.gitExplorer.location` | Specifies where to show the _GitLens_ explorer<br />`gitlens` - adds to the GitLens view<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view |
| `gitlens.gitExplorer.showTrackingBranch` | Specifies whether to show the tracking branch when displaying local branches in the _GitLens_ explorer" |
| `gitlens.gitExplorer.view` | Specifies the starting view of the _GitLens_ explorer<br />`auto` - shows the last selected view, defaults to `repository`<br />`history` - shows the commit history of the current file<br />`repository` - shows a repository explorer" |
| `gitlens.gitExplorer.showTrackingBranch` | Specifies whether to show the tracking branch when displaying local branches in the _GitLens_ explorer |

### GitLens File History Explorer Settings

Expand Down
142 changes: 4 additions & 138 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -555,22 +555,6 @@
"description": "Specifies whether to show the tracking branch when displaying local branches in the `GitLens` explorer",
"scope": "window"
},
"gitlens.gitExplorer.view": {
"type": "string",
"default": "auto",
"enum": [
"auto",
"history",
"repository"
],
"enumDescriptions": [
"Shows the last selected view, defaults to `repository`",
"Shows the commit history of the current file",
"Shows a repository explorer"
],
"description": "Specifies the starting view of the `GitLens` explorer",
"scope": "window"
},
"gitlens.heatmap.ageThreshold": {
"type": "string",
"default": "90",
Expand Down Expand Up @@ -1984,15 +1968,6 @@
"title": "Delete Tag (via Terminal)",
"category": "GitLens"
},
{
"command": "gitlens.gitExplorer.undockHistory",
"title": "Undock File History from GitLens Explorer",
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-undock.svg",
"light": "images/light/icon-undock.svg"
}
},
{
"command": "gitlens.gitExplorer.refresh",
"title": "Refresh",
Expand Down Expand Up @@ -2032,52 +2007,6 @@
"title": "Disable Automatic Refresh",
"category": "GitLens"
},
{
"command": "gitlens.gitExplorer.setRenameFollowingOn",
"title": "Follow Renames",
"category": "GitLens"
},
{
"command": "gitlens.gitExplorer.setRenameFollowingOff",
"title": "Don't Follow Renames",
"category": "GitLens"
},
{
"command": "gitlens.gitExplorer.switchToHistoryView",
"title": "Switch to File History View",
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-history.svg",
"light": "images/light/icon-history.svg"
}
},
{
"command": "gitlens.gitExplorer.switchToRepositoryView",
"title": "Switch to Repository View",
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-repo.svg",
"light": "images/light/icon-repo.svg"
}
},
{
"command": "gitlens.historyExplorer.close",
"title": "Close",
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-close.svg",
"light": "images/light/icon-close.svg"
}
},
{
"command": "gitlens.historyExplorer.dock",
"title": "Dock File History to GitLens Explorer",
"category": "GitLens",
"icon": {
"dark": "images/dark/icon-dock.svg",
"light": "images/light/icon-dock.svg"
}
},
{
"command": "gitlens.historyExplorer.refresh",
"title": "Refresh",
Expand Down Expand Up @@ -2559,34 +2488,6 @@
"command": "gitlens.gitExplorer.setAutoRefreshToOff",
"when": "false"
},
{
"command": "gitlens.gitExplorer.setRenameFollowingOn",
"when": "false"
},
{
"command": "gitlens.gitExplorer.setRenameFollowingOff",
"when": "false"
},
{
"command": "gitlens.gitExplorer.switchToHistoryView",
"when": "gitlens:enabled && !gitlens:historyExplorer && gitlens:gitExplorer:view == repository"
},
{
"command": "gitlens.gitExplorer.switchToRepositoryView",
"when": "gitlens:enabled && !gitlens:historyExplorer && gitlens:gitExplorer:view == history"
},
{
"command": "gitlens.gitExplorer.undockHistory",
"when": "gitlens:enabled && !gitlens:historyExplorer"
},
{
"command": "gitlens.historyExplorer.close",
"when": "false"
},
{
"command": "gitlens.historyExplorer.dock",
"when": "gitlens:enabled && gitlens:historyExplorer"
},
{
"command": "gitlens.historyExplorer.refresh",
"when": "false"
Expand Down Expand Up @@ -2875,39 +2776,24 @@
"when": "view =~ /^gitlens.gitExplorer:/",
"group": "navigation@1"
},
{
"command": "gitlens.gitExplorer.undockHistory",
"when": "view =~ /^gitlens.gitExplorer:/ && gitlens:gitExplorer:view == history && !gitlens:historyExplorer",
"group": "navigation@2"
},
{
"command": "gitlens.gitExplorer.switchToHistoryView",
"when": "view =~ /^gitlens.gitExplorer:/ && !gitlens:historyExplorer && gitlens:gitExplorer:view == repository",
"group": "navigation@3"
},
{
"command": "gitlens.gitExplorer.switchToRepositoryView",
"when": "view =~ /^gitlens.gitExplorer:/ && !gitlens:historyExplorer && gitlens:gitExplorer:view == history",
"group": "navigation@3"
},
{
"command": "gitlens.gitExplorer.refresh",
"when": "view =~ /^gitlens.gitExplorer:/",
"group": "navigation@8"
},
{
"command": "gitlens.gitExplorer.setFilesLayoutToAuto",
"when": "view =~ /^gitlens.gitExplorer:/ && gitlens:gitExplorer:view == repository",
"when": "view =~ /^gitlens.gitExplorer:/",
"group": "1_gitlens"
},
{
"command": "gitlens.gitExplorer.setFilesLayoutToList",
"when": "view =~ /^gitlens.gitExplorer:/ && gitlens:gitExplorer:view == repository",
"when": "view =~ /^gitlens.gitExplorer:/",
"group": "1_gitlens"
},
{
"command": "gitlens.gitExplorer.setFilesLayoutToTree",
"when": "view =~ /^gitlens.gitExplorer:/ && gitlens:gitExplorer:view == repository",
"when": "view =~ /^gitlens.gitExplorer:/",
"group": "1_gitlens"
},
{
Expand All @@ -2920,31 +2806,11 @@
"when": "view =~ /^gitlens.gitExplorer:/ && config.gitlens.gitExplorer.autoRefresh && gitlens:gitExplorer:autoRefresh",
"group": "2_gitlens"
},
{
"command": "gitlens.gitExplorer.setRenameFollowingOn",
"when": "view =~ /^gitlens.gitExplorer:/ && gitlens:gitExplorer:view == history && !config.gitlens.advanced.fileHistoryFollowsRenames",
"group": "2_gitlens_1"
},
{
"command": "gitlens.gitExplorer.setRenameFollowingOff",
"when": "view =~ /^gitlens.gitExplorer:/ && gitlens:gitExplorer:view == history && config.gitlens.advanced.fileHistoryFollowsRenames",
"group": "2_gitlens_1"
},
{
"command": "gitlens.historyExplorer.refresh",
"when": "view =~ /^gitlens.historyExplorer:/",
"group": "navigation@1"
},
{
"command": "gitlens.historyExplorer.dock",
"when": "view =~ /^gitlens.historyExplorer:/ && gitlens:gitExplorer",
"group": "navigation@9"
},
{
"command": "gitlens.historyExplorer.close",
"when": "view =~ /^gitlens.historyExplorer:/ && !gitlens:gitExplorer",
"group": "navigation@9"
},
{
"command": "gitlens.historyExplorer.setRenameFollowingOn",
"when": "view =~ /^gitlens.historyExplorer:/ && !config.gitlens.advanced.fileHistoryFollowsRenames",
Expand Down Expand Up @@ -3204,7 +3070,7 @@
},
{
"command": "gitlens.showQuickFileHistory",
"when": "viewItem =~ /gitlens:file\\b/ && gitlens:gitExplorer:view == repository",
"when": "viewItem =~ /gitlens:file\\b/",
"group": "8_gitlens@1"
},
{
Expand Down
3 changes: 1 addition & 2 deletions src/commands/showGitExplorer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
import { GitExplorerView } from '../configuration';
import { Container } from '../container';
import { Command, Commands } from './common';

Expand All @@ -9,6 +8,6 @@ export class ShowGitExplorerCommand extends Command {
}

execute() {
return Container.gitExplorer.show(GitExplorerView.Repository);
return Container.gitExplorer.show();
}
}
7 changes: 1 addition & 6 deletions src/commands/showHistoryExplorer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
'use strict';
import { GitExplorerView } from '../configuration';
import { Container } from '../container';
import { Command, Commands } from './common';

Expand All @@ -9,10 +8,6 @@ export class ShowHistoryExplorerCommand extends Command {
}

execute() {
if (Container.config.historyExplorer.enabled) {
return Container.historyExplorer.show();
}

return Container.gitExplorer.show(GitExplorerView.History);
return Container.historyExplorer.show();
}
}
2 changes: 0 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export enum CommandContext {
ExplorersCanCompare = 'gitlens:explorers:canCompare',
GitExplorer = 'gitlens:gitExplorer',
GitExplorerAutoRefresh = 'gitlens:gitExplorer:autoRefresh',
GitExplorerView = 'gitlens:gitExplorer:view',
HasRemotes = 'gitlens:hasRemotes',
HistoryExplorer = 'gitlens:historyExplorer',
Key = 'gitlens:key',
Expand Down Expand Up @@ -124,6 +123,5 @@ export const ImageMimetypes: { [key: string]: string } = {

export enum WorkspaceState {
GitExplorerAutoRefresh = 'gitlens:gitExplorer:autoRefresh',
GitExplorerView = 'gitlens:gitExplorer:view',
ResultsExplorerKeepResults = 'gitlens:resultsExplorer:keepResults'
}

0 comments on commit 3779835

Please sign in to comment.