Skip to content

Commit 1e73e13

Browse files
committed
Closes #571 - Adds compact display setting to repositories view
1 parent 49c7deb commit 1e73e13

File tree

4 files changed

+11
-1
lines changed

4 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1818
- Adds a `gitlens.views.stashFileDescriptionFormat` setting to specify the description format of a stashed file in the views
1919
- Adds a `gitlens.views.stashDescriptionFormat` setting to specify the description format of stashed changes in the views
2020
- Adds a `gitlens.views.statusFileDescriptionFormat` setting to specify the description format of the status of a working or committed file in the views
21+
- Adds a `gitlens.views.repositories.compact` setting to specify whether to show the _Repositories_ view in a compact display density — closes [#571](https://github.com/eamodio/vscode-gitlens/issues/571)
2122

2223
### Fixed
2324

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,7 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
751751
| `gitlens.views.repositories.autoRefresh` | Specifies whether to automatically refresh the _Repositories_ view when the repository or the file system changes |
752752
| `gitlens.views.repositories.autoReveal` | Specifies whether to automatically reveal repositories in the _Repositories_ view when opening files |
753753
| `gitlens.views.repositories.branches.layout` | Specifies how the _Repositories_ view will display branches<br /><br />`list` - displays branches as a list<br />`tree` - displays branches as a tree when branch names contain slashes `/` |
754+
| `gitlens.views.repositories.compact` | Specifies whether to show the _Repositories_ view in a compact display density |
754755
| `gitlens.views.repositories.enabled` | Specifies whether to show the _Repositories_ view |
755756
| `gitlens.views.repositories.files.compact` | Specifies whether to compact (flatten) unnecessary file nesting in the _Repositories_ view. Only applies when `gitlens.views.repositories.files.layout` is set to `tree` or `auto` |
756757
| `gitlens.views.repositories.files.layout` | Specifies how the _Repositories_ view will display files<br /><br />`auto` - automatically switches between displaying files as a `tree` or `list` based on the `gitlens.views.repositories.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 |

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1367,6 +1367,12 @@
13671367
"markdownDescription": "Specifies how the _Repositories_ view will display branches",
13681368
"scope": "window"
13691369
},
1370+
"gitlens.views.repositories.compact": {
1371+
"type": "boolean",
1372+
"default": false,
1373+
"markdownDescription": "Specifies whether to show the _Repositories_ view in a compact display density",
1374+
"scope": "window"
1375+
},
13701376
"gitlens.views.repositories.enabled": {
13711377
"type": "boolean",
13721378
"default": true,

src/views/nodes/repositoryNode.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ export class RepositoryNode extends SubscribeableViewNode<RepositoriesView> {
7474
children.push(new StatusFilesNode(this.view, this, status, range));
7575
}
7676

77-
children.push(new MessageNode(this.view, this, '', GlyphChars.Dash.repeat(2), ''));
77+
if (!this.view.config.repositories.compact) {
78+
children.push(new MessageNode(this.view, this, '', GlyphChars.Dash.repeat(2), ''));
79+
}
7880
}
7981

8082
children.push(

0 commit comments

Comments
 (0)