diff --git a/src/ui/images/settings/blame-avatars-compact.png b/src/ui/images/settings/blame-avatars-compact.png new file mode 100644 index 0000000..eba7677 Binary files /dev/null and b/src/ui/images/settings/blame-avatars-compact.png differ diff --git a/src/ui/images/settings/blame-avatars.png b/src/ui/images/settings/blame-avatars.png new file mode 100644 index 0000000..d8c1bcd Binary files /dev/null and b/src/ui/images/settings/blame-avatars.png differ diff --git a/src/ui/images/settings/blame-compact.png b/src/ui/images/settings/blame-compact.png new file mode 100644 index 0000000..94eca09 Binary files /dev/null and b/src/ui/images/settings/blame-compact.png differ diff --git a/src/ui/images/settings/blame-heatmap-left.png b/src/ui/images/settings/blame-heatmap-left.png new file mode 100644 index 0000000..1a73b74 Binary files /dev/null and b/src/ui/images/settings/blame-heatmap-left.png differ diff --git a/src/ui/images/settings/blame-heatmap-right.png b/src/ui/images/settings/blame-heatmap-right.png new file mode 100644 index 0000000..cc63fbc Binary files /dev/null and b/src/ui/images/settings/blame-heatmap-right.png differ diff --git a/src/ui/images/settings/blame-highlight-gutter.png b/src/ui/images/settings/blame-highlight-gutter.png new file mode 100644 index 0000000..927b673 Binary files /dev/null and b/src/ui/images/settings/blame-highlight-gutter.png differ diff --git a/src/ui/images/settings/blame-highlight-line.png b/src/ui/images/settings/blame-highlight-line.png new file mode 100644 index 0000000..dca3577 Binary files /dev/null and b/src/ui/images/settings/blame-highlight-line.png differ diff --git a/src/ui/images/settings/blame-highlight-scrollbar.png b/src/ui/images/settings/blame-highlight-scrollbar.png new file mode 100644 index 0000000..6516a3c Binary files /dev/null and b/src/ui/images/settings/blame-highlight-scrollbar.png differ diff --git a/src/ui/images/settings/blame.png b/src/ui/images/settings/blame.png new file mode 100644 index 0000000..995923d Binary files /dev/null and b/src/ui/images/settings/blame.png differ diff --git a/src/ui/images/settings/code-lens-authors.png b/src/ui/images/settings/code-lens-authors.png index 8a4f28e..bc2c11e 100644 Binary files a/src/ui/images/settings/code-lens-authors.png and b/src/ui/images/settings/code-lens-authors.png differ diff --git a/src/ui/images/settings/code-lens-off.png b/src/ui/images/settings/code-lens-off.png deleted file mode 100644 index 3ea5fa9..0000000 Binary files a/src/ui/images/settings/code-lens-off.png and /dev/null differ diff --git a/src/ui/images/settings/code-lens-recent+authors.png b/src/ui/images/settings/code-lens-recent+authors.png new file mode 100644 index 0000000..33e59d6 Binary files /dev/null and b/src/ui/images/settings/code-lens-recent+authors.png differ diff --git a/src/ui/images/settings/code-lens-recent.png b/src/ui/images/settings/code-lens-recent.png index 7f0020a..1a8514c 100644 Binary files a/src/ui/images/settings/code-lens-recent.png and b/src/ui/images/settings/code-lens-recent.png differ diff --git a/src/ui/images/settings/code-lens.png b/src/ui/images/settings/code-lens.png index 1d60041..3ea5fa9 100644 Binary files a/src/ui/images/settings/code-lens.png and b/src/ui/images/settings/code-lens.png differ diff --git a/src/ui/images/settings/current-line-blame-off.png b/src/ui/images/settings/current-line-blame-off.png deleted file mode 100644 index c144346..0000000 Binary files a/src/ui/images/settings/current-line-blame-off.png and /dev/null differ diff --git a/src/ui/images/settings/current-line-blame-on.png b/src/ui/images/settings/current-line-blame-on.png new file mode 100644 index 0000000..56a487d Binary files /dev/null and b/src/ui/images/settings/current-line-blame-on.png differ diff --git a/src/ui/images/settings/current-line-blame.png b/src/ui/images/settings/current-line-blame.png index 279d37b..c144346 100644 Binary files a/src/ui/images/settings/current-line-blame.png and b/src/ui/images/settings/current-line-blame.png differ diff --git a/src/ui/images/settings/gitlens-view-history-avatars.png b/src/ui/images/settings/gitlens-view-history-avatars.png index d063bd4..8dc7abf 100644 Binary files a/src/ui/images/settings/gitlens-view-history-avatars.png and b/src/ui/images/settings/gitlens-view-history-avatars.png differ diff --git a/src/ui/images/settings/gitlens-view-repository-avatars.png b/src/ui/images/settings/gitlens-view-repository-avatars.png index ef29c4e..526b720 100644 Binary files a/src/ui/images/settings/gitlens-view-repository-avatars.png and b/src/ui/images/settings/gitlens-view-repository-avatars.png differ diff --git a/src/ui/images/settings/hovers-annotations-changes.png b/src/ui/images/settings/hovers-annotations-changes.png index dd66045..0d9faba 100644 Binary files a/src/ui/images/settings/hovers-annotations-changes.png and b/src/ui/images/settings/hovers-annotations-changes.png differ diff --git a/src/ui/images/settings/hovers-annotations-compact.png b/src/ui/images/settings/hovers-annotations-compact.png new file mode 100644 index 0000000..1ad3e70 Binary files /dev/null and b/src/ui/images/settings/hovers-annotations-compact.png differ diff --git a/src/ui/images/settings/hovers-annotations-details+changes.png b/src/ui/images/settings/hovers-annotations-details+changes.png new file mode 100644 index 0000000..7750e97 Binary files /dev/null and b/src/ui/images/settings/hovers-annotations-details+changes.png differ diff --git a/src/ui/images/settings/hovers-annotations-details.png b/src/ui/images/settings/hovers-annotations-details.png index 09158aa..db089e3 100644 Binary files a/src/ui/images/settings/hovers-annotations-details.png and b/src/ui/images/settings/hovers-annotations-details.png differ diff --git a/src/ui/images/settings/hovers-annotations-heatmap.png b/src/ui/images/settings/hovers-annotations-heatmap.png new file mode 100644 index 0000000..5fefcd2 Binary files /dev/null and b/src/ui/images/settings/hovers-annotations-heatmap.png differ diff --git a/src/ui/images/settings/hovers-annotations.png b/src/ui/images/settings/hovers-annotations.png index c9d743a..901a833 100644 Binary files a/src/ui/images/settings/hovers-annotations.png and b/src/ui/images/settings/hovers-annotations.png differ diff --git a/src/ui/images/settings/hovers-currentLine-annotation-changes.png b/src/ui/images/settings/hovers-currentLine-annotation-changes.png new file mode 100644 index 0000000..ca6e8b7 Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-annotation-changes.png differ diff --git a/src/ui/images/settings/hovers-currentLine-annotation-details+changes.png b/src/ui/images/settings/hovers-currentLine-annotation-details+changes.png new file mode 100644 index 0000000..995cc71 Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-annotation-details+changes.png differ diff --git a/src/ui/images/settings/hovers-currentLine-annotation-details.png b/src/ui/images/settings/hovers-currentLine-annotation-details.png new file mode 100644 index 0000000..10cf7ac Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-annotation-details.png differ diff --git a/src/ui/images/settings/hovers-off-currentLine.png b/src/ui/images/settings/hovers-currentLine-annotation.png similarity index 100% rename from src/ui/images/settings/hovers-off-currentLine.png rename to src/ui/images/settings/hovers-currentLine-annotation.png diff --git a/src/ui/images/settings/hovers-currentLine-changes.png b/src/ui/images/settings/hovers-currentLine-changes.png deleted file mode 100644 index 5329d4a..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-changes.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine-details.png b/src/ui/images/settings/hovers-currentLine-details.png deleted file mode 100644 index 9a79177..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-details.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine-line-blame.png b/src/ui/images/settings/hovers-currentLine-line-blame.png new file mode 100644 index 0000000..0d8934e Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-line-blame.png differ diff --git a/src/ui/images/settings/hovers-currentLine-line-changes.png b/src/ui/images/settings/hovers-currentLine-line-changes.png new file mode 100644 index 0000000..cb79191 Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-line-changes.png differ diff --git a/src/ui/images/settings/hovers-currentLine-line-details+changes.png b/src/ui/images/settings/hovers-currentLine-line-details+changes.png new file mode 100644 index 0000000..0aff4d9 Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-line-details+changes.png differ diff --git a/src/ui/images/settings/hovers-currentLine-line-details.png b/src/ui/images/settings/hovers-currentLine-line-details.png new file mode 100644 index 0000000..da77061 Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-line-details.png differ diff --git a/src/ui/images/settings/hovers-currentLine-line.png b/src/ui/images/settings/hovers-currentLine-line.png new file mode 100644 index 0000000..a8a1315 Binary files /dev/null and b/src/ui/images/settings/hovers-currentLine-line.png differ diff --git a/src/ui/images/settings/hovers-currentLine-off-whole-changes.png b/src/ui/images/settings/hovers-currentLine-off-whole-changes.png deleted file mode 100644 index 244a09a..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-off-whole-changes.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine-off-whole-details.png b/src/ui/images/settings/hovers-currentLine-off-whole-details.png deleted file mode 100644 index 739d76b..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-off-whole-details.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine-off-whole.png b/src/ui/images/settings/hovers-currentLine-off-whole.png deleted file mode 100644 index 207ff17..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-off-whole.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine-whole-changes.png b/src/ui/images/settings/hovers-currentLine-whole-changes.png deleted file mode 100644 index 95af92c..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-whole-changes.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine-whole-details.png b/src/ui/images/settings/hovers-currentLine-whole-details.png deleted file mode 100644 index db95bad..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-whole-details.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine-whole.png b/src/ui/images/settings/hovers-currentLine-whole.png deleted file mode 100644 index 9d6db9a..0000000 Binary files a/src/ui/images/settings/hovers-currentLine-whole.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-currentLine.png b/src/ui/images/settings/hovers-currentLine.png deleted file mode 100644 index 2f8a979..0000000 Binary files a/src/ui/images/settings/hovers-currentLine.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-off-annotations.png b/src/ui/images/settings/hovers-off-annotations.png deleted file mode 100644 index 059cb34..0000000 Binary files a/src/ui/images/settings/hovers-off-annotations.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-off-currentLine-off-whole.png b/src/ui/images/settings/hovers-off-currentLine-off-whole.png deleted file mode 100644 index 3c010a0..0000000 Binary files a/src/ui/images/settings/hovers-off-currentLine-off-whole.png and /dev/null differ diff --git a/src/ui/images/settings/hovers-off-currentLine-whole.png b/src/ui/images/settings/hovers-off-currentLine-whole.png deleted file mode 100644 index b669413..0000000 Binary files a/src/ui/images/settings/hovers-off-currentLine-whole.png and /dev/null differ diff --git a/src/ui/images/settings/status-bar-left.png b/src/ui/images/settings/status-bar-left.png index c0e04df..3e2c9bc 100644 Binary files a/src/ui/images/settings/status-bar-left.png and b/src/ui/images/settings/status-bar-left.png differ diff --git a/src/ui/images/settings/status-bar-right.png b/src/ui/images/settings/status-bar-right.png index d25f8ef..9309b8c 100644 Binary files a/src/ui/images/settings/status-bar-right.png and b/src/ui/images/settings/status-bar-right.png differ diff --git a/src/ui/images/settings/status-bar-off.png b/src/ui/images/settings/status-bar.png similarity index 100% rename from src/ui/images/settings/status-bar-off.png rename to src/ui/images/settings/status-bar.png diff --git a/src/ui/scss/main.scss b/src/ui/scss/main.scss index b054369..0e805b5 100644 --- a/src/ui/scss/main.scss +++ b/src/ui/scss/main.scss @@ -39,8 +39,7 @@ b { } code, -.shortcut-key, -.command { +.shortcut-key { background-color: var(--background-color--lighten-15); padding: 1px 5px; vertical-align: bottom; @@ -156,6 +155,10 @@ ul { padding: 0; } +.command { + padding: 1px 3px; +} + .container { align-items: center; display: flex; @@ -217,10 +220,10 @@ ul { } .icon__info { - -webkit-mask-image: url('data:image/svg+xml;utf8,'); mask-image: url('data:image/svg+xml;utf8,'); - -webkit-mask-repeat: no-repeat; + -webkit-mask-image: url('data:image/svg+xml;utf8,'); mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; } .icon--lg { @@ -241,6 +244,12 @@ ul { box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.8), 0px 0px 12px 1px rgba(0, 0, 0, 0.5); } +.image__preview--overlay { + position: absolute; + top: 0; + left: 0; +} + .label__hint { color: var(--color--75); display: block; @@ -329,6 +338,7 @@ ul { flex: 30% 1 1; margin-left: 2em; min-width: 400px; + position: relative; } .section__settings { @@ -344,6 +354,38 @@ ul { flex: 100% 0 0; flex-wrap: wrap; margin-bottom: 2em; + + position: relative; + cursor: pointer; + + &:after { + background-color: var(--color--75); + content: ''; + position: absolute; + right: 0; + top: 0; + width: 32px; + height: 40px; + mask-image: url('data:image/svg+xml;utf8,'); + -webkit-mask-image: url('data:image/svg+xml;utf8,'); + mask-size: 32px 40px; + -webkit-mask-size: 32px 40px; + mask-repeat: no-repeat; + -webkit-mask-repeat: no-repeat; + transition: transform 500ms cubic-bezier(0, 1.5, 1, 1); + } + + &.collapsed { + margin-bottom: 0; + + &:after { + transform: rotateX(180deg); + } + + & + .section__settings { + display: none; + } + } } .section__title { @@ -358,6 +400,7 @@ ul { } .section-group__content { + flex: auto 1 1; min-width: 0; } @@ -414,6 +457,12 @@ ul { .settings-group__hint { color: var(--color--75); font-weight: 200; + + span { + display: inline-block; + margin-left: 34px; + margin-top: 0.5em; + } } .settings-group__setting { diff --git a/src/ui/settings/app.ts b/src/ui/settings/app.ts index ec37e82..80b1723 100644 --- a/src/ui/settings/app.ts +++ b/src/ui/settings/app.ts @@ -18,14 +18,17 @@ export class App { initializeColorPalette(); this.initializeState(); - const onChecked = this.onChecked.bind(this); - DOM.listenAll('input[type="checkbox"],input[type="radio"]', 'change', function(this: HTMLInputElement) { onChecked(this); }); + const onInputChecked = this.onInputChecked.bind(this); + DOM.listenAll('input[type="checkbox"],input[type="radio"]', 'change', function(this: HTMLInputElement) { onInputChecked(this); }); - const onSelected = this.onSelected.bind(this); - DOM.listenAll('select', 'change', function(this: HTMLInputElement) { onSelected(this); }); + const onInputSelected = this.onInputSelected.bind(this); + DOM.listenAll('select', 'change', function(this: HTMLInputElement) { onInputSelected(this); }); + + const onSectionHeaderClicked = this.onSectionHeaderClicked.bind(this); + DOM.listenAll('.section__header', 'click', function(this: HTMLInputElement) { onSectionHeaderClicked(this); }); } - private onChecked(element: HTMLInputElement) { + private onInputChecked(element: HTMLInputElement) { console.log(`SettingsApp.onChange: name=${element.name}, checked=${element.checked}, value=${element.value}`); if (element.dataset.type === 'array') { @@ -58,7 +61,7 @@ export class App { this.applyChanges(); } - private onSelected(element: HTMLSelectElement) { + private onInputSelected(element: HTMLSelectElement) { const value = element.options[element.selectedIndex].value; console.log(`SettingsApp.onSelected: name=${element.name}, value=${value}`); @@ -68,6 +71,10 @@ export class App { this.applyChanges(); } + private onSectionHeaderClicked(element: HTMLElement) { + element.classList.toggle('collapsed'); + } + private applyChanges() { const args = JSON.stringify(this._changes); console.log(`SettingsApp.applyChanges: changes=${args}`); @@ -152,13 +159,24 @@ function ensureIfBoolean(value: string | boolean): string | boolean { function evaluateStateExpression(expression: string, changes: { [key: string]: string | boolean }): boolean { let state = false; for (const expr of expression.trim().split('&&')) { - const [lhs, rhs] = parseStateExpression(expr); + const [lhs, op, rhs] = parseStateExpression(expr); - let value = changes[lhs]; - if (value === undefined) { - value = getSettingValue(lhs); + switch (op) { + case '=': + let value = changes[lhs]; + if (value === undefined) { + value = getSettingValue(lhs); + } + state = rhs !== undefined ? rhs === '' + value : !!value; + break; + + case '+': + if (rhs !== undefined) { + const setting = getSettingValue(lhs); + state = setting.includes(rhs.toString()); + } + break; } - state = rhs !== undefined ? rhs === '' + value : !!value; if (!state) break; } @@ -181,9 +199,9 @@ function parseAdditionalSettingsExpression(expression: string): [string, string }); } -function parseStateExpression(expression: string): [string, string | boolean | undefined] { - const [lhs, rhs] = expression.trim().split('='); - return [lhs.trim(), rhs !== undefined ? rhs.trim() : rhs]; +function parseStateExpression(expression: string): [string, string, string | boolean | undefined] { + const [lhs, op, rhs] = expression.trim().split(/([=\+])/); + return [lhs.trim(), op !== undefined ? op.trim() : '=', rhs !== undefined ? rhs.trim() : rhs]; } function flatten(o: { [key: string]: any }, path?: string): { [key: string]: any } { diff --git a/src/ui/settings/index.html b/src/ui/settings/index.html index 15ae3bf..89ba67b 100644 --- a/src/ui/settings/index.html +++ b/src/ui/settings/index.html @@ -29,7 +29,7 @@ @@ -68,114 +68,18 @@
- - - - - - + + + + +
- - - -
-
-

Gutter Blame - - - -

-

Adds Git blame annotations for the current file to the gutter

-
-
-
-
- - -
-

Quickly tell the age of a line — indicator ranges from bright yellow (newer) to dark brown (older)

- -
- - -
- -
- - -
- -
- - -
- -
- - -
-
- - -
-
- - -
- -
- - -
-

Compacts (deduplicate) matching adjacent blame annotations

-
-
- -
+

+ + For more advanced customizations open User Settings and search for gitlens.gitExplorer +

@@ -228,21 +132,18 @@
- - - - - + + + +

- Use the - GitLens: Toggle Git Code Lens command to override this setting for the current window + For more advanced customizations open User Settings and search for gitlens.codeLens + + Use the + GitLens: Toggle Git Code Lens command to override this setting for the current window +

@@ -265,16 +166,89 @@
- - +

- Use the - GitLens: Toggle Line Blame Annotations command to override this setting for the current - window + For more advanced customizations open User Settings and search for gitlens.currentLine + + Use the + GitLens: Toggle Line Blame Annotations command to override this setting for the current window + +

+ + + +
+
+

Gutter Blame + + + +

+

Adds Git blame annotations for the current file to the gutter

+
+
+
+
+ + +
+

Quickly tell the age of a line — indicator ranges from bright yellow (newer) to dark brown (older)

+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+ +
+ + +
+

Compacts (deduplicate) matching adjacent blame annotations

+
+
+ + + + + + + + + +
+

+ + For more advanced customizations open User Settings and search for gitlens.blame

@@ -295,7 +269,8 @@ - + +
@@ -329,42 +304,20 @@
- - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + +
@@ -375,8 +328,8 @@
@@ -393,18 +346,12 @@
- - - - - - + + + + + +
@@ -446,18 +393,18 @@
- - - + + +

- Use the - GitLens: Toggle Line Blame Annotations command to override this setting for the current - window + For more advanced customizations open User Settings and search for gitlens.statusBar + + Use the + GitLens: Toggle Line Blame Annotations command to override this setting for the current window + +

@@ -469,7 +416,7 @@ gitlens in the - Keyboard Shortcuts editor to see the shortcuts and to customize them further

+ Keyboard Shortcuts editor to see the shortcuts and to customize them further

@@ -491,7 +438,7 @@ + Keyboard Shortcuts editor
@@ -505,15 +452,15 @@ GitLens View
  • - Gutter Blame -
  • -
  • Code Lens
  • Current Line Blame
  • + Gutter Blame +
  • +
  • Hovers