Skip to content

Commit 5276288

Browse files
committed
Closes #377 - adds control over explorer locations
1 parent fc551c2 commit 5276288

File tree

9 files changed

+135
-20
lines changed

9 files changed

+135
-20
lines changed

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [8.3.1] - 2018-05-18
8+
### Added
9+
- Adds the ability to control where the *GitLens*, *GitLens History*, and *GitLens Results* explorers are shown 🎉 — closes [#213](https://github.com/eamodio/vscode-gitlens/issues/213), [#377](https://github.com/eamodio/vscode-gitlens/issues/377)
10+
- Adds `gitlens.gitExplorer.location` setting to the interactive settings editor to specify where the *GitLens* explorer is shown — either in the *Explorer* or *Source Control* view
11+
- Adds `gitlens.historyExplorer.location` setting to the interactive settings editor to specify where the *GitLens History* explorer is shown — either in the *Explorer* or *Source Control* view
12+
- Adds `gitlens.resultsExplorer.location` setting to the interactive settings editor to specify where the *GitLens Results* view is shown — either in the *Explorer* or *Source Control* view
13+
14+
### Fixed
15+
- Fixes [#372](https://github.com/eamodio/vscode-gitlens/issues/372) - Wrong URL to VSTS work item when using hash work item id in commit
16+
717
## [8.3.0] - 2018-05-17
818
### Added
919
- Adds user-defined modes for quickly toggling between sets of settings
@@ -22,7 +32,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2232

2333
![modes settings](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/cl-modes-settings.png)
2434

25-
- Adds `gitlens.mode.active` settings to specify the active GitLens mode, if any
35+
- Adds `gitlens.mode.active` setting to specify the active GitLens mode, if any
2636
- Adds `gitlens.modes` setting to specify the user-defined GitLens modes
2737
- Adds an icon for the *Compare File with Previous Revision* command (`gitlens.diffWithPrevious`) and moves it into the editor toolbar
2838
- Adds an icon for the *Compare File with Next Revision* command (`gitlens.diffWithNext`) and moves it into the editor toolbar

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414

1515
# What's new in GitLens 8
1616
## 8.3 — May 2018
17-
- Moves the *GitLens*, *GitLens History*, and *GitLens Results* explorers under the Source Control activity (in the sidebar) 🎉 — closes [#213](https://github.com/eamodio/vscode-gitlens/issues/213)
17+
- Adds the ability to control where the *GitLens*, *GitLens History*, and *GitLens Results* explorers are shown 🎉 — closes [#213](https://github.com/eamodio/vscode-gitlens/issues/213), [#377](https://github.com/eamodio/vscode-gitlens/issues/377)
18+
- Adds `gitlens.gitExplorer.location` setting to the interactive settings editor to specify where the *GitLens* explorer is shown — either in the *Explorer* or *Source Control* view
19+
- Adds `gitlens.historyExplorer.location` setting to the interactive settings editor to specify where the *GitLens History* explorer is shown — either in the *Explorer* or *Source Control* view
20+
- Adds `gitlens.resultsExplorer.location` setting to the interactive settings editor to specify where the *GitLens Results* view is shown — either in the *Explorer* or *Source Control* view
1821
- Adds user-defined modes for quickly toggling between sets of settings
1922

2023
![mode switch](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/cl-mode-switch.png)
@@ -31,7 +34,7 @@
3134

3235
![modes settings](https://raw.githubusercontent.com/eamodio/vscode-gitlens/master/images/cl-modes-settings.png)
3336

34-
- Adds `gitlens.mode.active` settings to specify the active GitLens mode, if any
37+
- Adds `gitlens.mode.active` setting to specify the active GitLens mode, if any
3538
- Adds `gitlens.modes` setting to specify the user-defined GitLens modes
3639
- Adds an icon for the *Compare File with Previous Revision* command (`gitlens.diffWithPrevious`) and moves it into the editor toolbar
3740
- Adds an icon for the *Compare File with Next Revision* command (`gitlens.diffWithNext`) and moves it into the editor toolbar
@@ -58,6 +61,7 @@
5861
- Fixes [#366](https://github.com/eamodio/vscode-gitlens/issues/366) - Running a GitLens command from a keybinding fails
5962
- Fixes [#155](https://github.com/eamodio/vscode-gitlens/issues/155) - Navigating file diffs with `alt+,` gets stuck
6063
- Fixes [#359](https://github.com/eamodio/vscode-gitlens/issues/359) - Show changes of an added file in the first commit
64+
- Fixes [#372](https://github.com/eamodio/vscode-gitlens/issues/372) - Wrong URL to VSTS work item when using hash work item id in commit
6165
- Fixes *bronze* typo thanks to [PR #361](https://github.com/eamodio/vscode-gitlens/pull/361) by Cory Forsyth ([@bantic](https://github.com/bantic))
6266
- Fixes *individually* typo thanks to [PR #364](https://github.com/eamodio/vscode-gitlens/pull/364) by Brett Cannon ([@brettcannon](https://github.com/brettcannon))
6367
- Fixes issue where comparing previous revision during a merge/rebase conflict failed to show the correct contents
@@ -615,6 +619,7 @@ See also [Explorer Settings](#explorer-settings "Jump to the Explorer settings")
615619
|`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` setting and the number of files at each nesting level<br /> `list` - displays files as a list<br /> `tree` - displays files as a tree
616620
|`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 displaying files as `auto`
617621
|`gitlens.gitExplorer.includeWorkingTree`|Specifies whether to include working tree files inside the `Repository Status` node of the *GitLens* explorer
622+
|`gitlens.gitExplorer.location`|Specifies where to show the `GitLens` explorer<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view
618623
|`gitlens.gitExplorer.showTrackingBranch`|Specifies whether to show the tracking branch when displaying local branches in the *GitLens* explorer"
619624
|`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"
620625

@@ -625,6 +630,7 @@ See also [Explorer Settings](#explorer-settings "Jump to the Explorer settings")
625630
|Name | Description
626631
|-----|------------
627632
|`gitlens.historyExplorer.enabled`|Specifies whether to show the current file history undocked in a *GitLens History* explorer
633+
|`gitlens.historyExplorer.location`|Specifies where to show the `GitLens History` explorer<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view
628634

629635
### GitLens Results View Settings
630636

@@ -635,6 +641,7 @@ See also [Explorer Settings](#explorer-settings "Jump to the Explorer settings")
635641
|`gitlens.resultsExplorer.files.compact`|Specifies whether to compact (flatten) unnecessary file nesting in the *GitLens Results* view<br />Only applies when displaying files as a `tree` or `auto`
636642
|`gitlens.resultsExplorer.files.layout`|Specifies how the *GitLens Results* view will display files<br /> `auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.resultsExplorer.files.threshold` setting and the number of files at each nesting level<br /> `list` - displays files as a list<br /> `tree` - displays files as a tree
637643
|`gitlens.resultsExplorer.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 Results* view<br />Only applies when displaying files as `auto`
644+
|`gitlens.resultsExplorer.location`|Specifies where to show the `GitLens Results` view<br />`explorer` - adds to the Explorer view<br />`scm` - adds to the Source Control view
638645

639646
### Explorer Settings
640647

package.json

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,16 @@
464464
"description": "Specifies whether to include working tree files inside the `Repository Status` node of the `GitLens` explorer",
465465
"scope": "window"
466466
},
467+
"gitlens.gitExplorer.location": {
468+
"type": "string",
469+
"default": "scm",
470+
"enum": [
471+
"explorer",
472+
"scm"
473+
],
474+
"description": "Specifies where to show the `GitLens` explorer\n `explorer` - adds to the Explorer view\n `scm` - adds to the Source Control view",
475+
"scope": "window"
476+
},
467477
"gitlens.gitExplorer.showTrackingBranch": {
468478
"type": "boolean",
469479
"default": true,
@@ -497,6 +507,16 @@
497507
"description": "Specifies whether to show the current file history undocked in a `GitLens History` explorer",
498508
"scope": "window"
499509
},
510+
"gitlens.historyExplorer.location": {
511+
"type": "string",
512+
"default": "explorer",
513+
"enum": [
514+
"explorer",
515+
"scm"
516+
],
517+
"description": "Specifies where to show the `GitLens History` explorer\n `explorer` - adds to the Explorer view\n `scm` - adds to the Source Control view",
518+
"scope": "window"
519+
},
500520
"gitlens.hovers.annotations.changes": {
501521
"type": "boolean",
502522
"default": true,
@@ -925,6 +945,16 @@
925945
"description": "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 Results` view\nOnly applies when displaying files as `auto`",
926946
"scope": "window"
927947
},
948+
"gitlens.resultsExplorer.location": {
949+
"type": "string",
950+
"default": "explorer",
951+
"enum": [
952+
"explorer",
953+
"scm"
954+
],
955+
"description": "Specifies where to show the `GitLens Results` view\n `explorer` - adds to the Explorer view\n `scm` - adds to the Source Control view",
956+
"scope": "window"
957+
},
928958
"gitlens.settings.mode": {
929959
"type": "string",
930960
"default": "simple",
@@ -3120,21 +3150,38 @@
31203150
}
31213151
],
31223152
"views": {
3153+
"explorer": [
3154+
{
3155+
"id": "gitlens.gitExplorer",
3156+
"name": "GitLens",
3157+
"when": "gitlens:enabled && gitlens:gitExplorer == explorer"
3158+
},
3159+
{
3160+
"id": "gitlens.historyExplorer",
3161+
"name": "GitLens History",
3162+
"when": "gitlens:enabled && gitlens:historyExplorer == explorer"
3163+
},
3164+
{
3165+
"id": "gitlens.resultsExplorer",
3166+
"name": "GitLens Results",
3167+
"when": "gitlens:enabled && gitlens:resultsExplorer == explorer"
3168+
}
3169+
],
31233170
"scm": [
31243171
{
31253172
"id": "gitlens.gitExplorer",
31263173
"name": "GitLens",
3127-
"when": "gitlens:enabled && gitlens:gitExplorer"
3174+
"when": "gitlens:enabled && gitlens:gitExplorer == scm"
31283175
},
31293176
{
31303177
"id": "gitlens.historyExplorer",
31313178
"name": "GitLens History",
3132-
"when": "gitlens:enabled && gitlens:historyExplorer"
3179+
"when": "gitlens:enabled && gitlens:historyExplorer == scm"
31333180
},
31343181
{
31353182
"id": "gitlens.resultsExplorer",
31363183
"name": "GitLens Results",
3137-
"when": "gitlens:enabled && gitlens:resultsExplorer"
3184+
"when": "gitlens:enabled && gitlens:resultsExplorer == scm"
31383185
}
31393186
]
31403187
}

src/ui/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,12 +190,14 @@ export interface IGitExplorerConfig {
190190
enabled: boolean;
191191
files: IExplorersFilesConfig;
192192
includeWorkingTree: boolean;
193+
location: 'explorer' | 'scm';
193194
showTrackingBranch: boolean;
194195
view: GitExplorerView;
195196
}
196197

197198
export interface IHistoryExplorerConfig {
198199
enabled: boolean;
200+
location: 'explorer' | 'scm';
199201
}
200202

201203
export interface IMenuConfig {
@@ -236,6 +238,7 @@ export interface IModeConfig {
236238

237239
export interface IResultsExplorerConfig {
238240
files: IExplorersFilesConfig;
241+
location: 'explorer' | 'scm';
239242
}
240243

241244
export interface IRemotesConfig {

src/ui/settings/index.html

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,14 @@ <h2 class="section__title">GitLens Explorer
254254
<label for="gitExplorer.enabled">Show the GitLens explorer</label>
255255
</div>
256256

257+
<div class="settings-group__setting ml-2" data-enablement="gitExplorer.enabled">
258+
<label for="gitExplorer.location">Show in the</label>
259+
<select class="setting" id="gitExplorer.location" name="gitExplorer.location" disabled>
260+
<option value="explorer">Explorer view</option>
261+
<option value="scm">Source Control view</option>
262+
</select>
263+
</div>
264+
257265
<div class="settings-group__setting ml-2" data-enablement="gitExplorer.enabled &amp; historyExplorer.enabled =false">
258266
<label for="gitExplorer.view">When opened, show the</label>
259267
<select class="setting hidden" id="gitExplorer.view" name="gitExplorer.view" data-visibility="historyExplorer.enabled =false" disabled>
@@ -343,6 +351,14 @@ <h2 class="section__title">GitLens History Explorer
343351
</div>
344352
<p class="setting__hint hidden" data-visibility="gitExplorer.enabled &amp; historyExplorer.enabled =false">The current file history will be shown (docked) in the GitLens explorer</p>
345353

354+
<div class="settings-group__setting ml-2" data-enablement="historyExplorer.enabled">
355+
<label for="historyExplorer.location">Show in the</label>
356+
<select class="setting" id="historyExplorer.location" name="historyExplorer.location" disabled>
357+
<option value="explorer">Explorer view</option>
358+
<option value="scm">Source Control view</option>
359+
</select>
360+
</div>
361+
346362
<div class="settings-group__setting nowrap ml-2 hidden" data-enablement="historyExplorer.enabled" data-visibility="settings.mode =advanced">
347363
<input class="setting" id="historyExplorer.avatars" name="explorers.avatars" type="checkbox" disabled/>
348364
<label for="historyExplorer.avatars">Use author avatars icons</label>
@@ -359,7 +375,7 @@ <h2 class="section__title">GitLens History Explorer
359375
</div>
360376
</section>
361377

362-
<section id="gitlens-results" class="hidden" data-visibility="settings.mode =advanced">
378+
<section id="gitlens-results">
363379
<div class="section__header">
364380
<h2 class="section__title">GitLens Results
365381
<a class="link__learn-more" title="Learn more" href="https://github.com/eamodio/vscode-gitlens/#gitlens-results-view">
@@ -371,6 +387,14 @@ <h2 class="section__title">GitLens Results
371387
<div class="section__settings">
372388
<div class="settings-group">
373389
<div class="settings-group__setting">
390+
<label for="resultsExplorer.location">Show in the</label>
391+
<select class="setting" id="resultsExplorer.location" name="resultsExplorer.location">
392+
<option value="explorer">Explorer view</option>
393+
<option value="scm">Source Control view</option>
394+
</select>
395+
</div>
396+
397+
<div class="settings-group__setting hidden" data-visibility="settings.mode =advanced">
374398
<label for="resultsExplorer.files.layout">Layout files</label>
375399
<select class="setting" id="resultsExplorer.files.layout" name="resultsExplorer.files.layout">
376400
<option value="auto">automatically</option>
@@ -379,13 +403,13 @@ <h2 class="section__title">GitLens Results
379403
</select>
380404
</div>
381405

382-
<div class="settings-group__setting nowrap">
406+
<div class="settings-group__setting nowrap hidden" data-visibility="settings.mode =advanced">
383407
<input class="setting" id="resultsExplorer.files.compact" name="resultsExplorer.files.compact" type="checkbox"/>
384408
<label for="resultsExplorer.files.compact">Use compact layout</label>
385409
</div>
386-
<p class="setting__hint">Compacts (flattens) unnecessary nesting when using a tree layouts</p>
410+
<p class="setting__hint hidden" data-visibility="settings.mode =advanced">Compacts (flattens) unnecessary nesting when using a tree layouts</p>
387411

388-
<div class="settings-group__setting nowrap">
412+
<div class="settings-group__setting nowrap hidden" data-visibility="settings.mode =advanced">
389413
<input class="setting" id="resultsExplorer.avatars" name="explorers.avatars" type="checkbox"/>
390414
<label for="resultsExplorer.avatars">Use author avatars icons</label>
391415
</div>
@@ -1034,7 +1058,7 @@ <h2>Jump to</h2>
10341058
<li><a class="jump-to" href="#general">General</a></li>
10351059
<li><a class="jump-to" href="#gitlens-explorer">GitLens Explorer</a></li>
10361060
<li><a class="jump-to" href="#gitlens-history-explorer">GitLens History Explorer</a></li>
1037-
<li><a class="jump-to" href="#gitlens-results" class="hidden" data-visibility="settings.mode =advanced">GitLens Results</a></li>
1061+
<li><a class="jump-to" href="#gitlens-results">GitLens Results</a></li>
10381062
<li><a class="jump-to" href="#code-lens">Code Lens</a></li>
10391063
<li><a class="jump-to" href="#current-line">Current Line Blame</a></li>
10401064
<li><a class="jump-to" href="#blame">Gutter Blame</a></li>

0 commit comments

Comments
 (0)