Browse Source

Add possibility to disable all welcome screens. Fixes #1049. (#1258)

main
Rickard 4 years ago
committed by GitHub
parent
commit
b30f4bcf0d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 3 deletions
  1. +2
    -1
      README.md
  2. +8
    -2
      package.json
  3. +1
    -0
      src/config.ts
  4. +4
    -0
      src/extension.ts

+ 2
- 1
README.md View File

@ -903,7 +903,8 @@ See also [View Settings](#view-settings- 'Jump to the View settings')
| `gitlens.insiders` | Specifies whether to enable experimental features | | `gitlens.insiders` | Specifies whether to enable experimental features |
| `gitlens.liveshare.allowGuestAccess` | Specifies whether to allow guest access to GitLens features when using Visual Studio Live Share | | `gitlens.liveshare.allowGuestAccess` | Specifies whether to allow guest access to GitLens features when using Visual Studio Live Share |
| `gitlens.outputLevel` | Specifies how much (if any) output will be sent to the GitLens output channel | | `gitlens.outputLevel` | Specifies how much (if any) output will be sent to the GitLens output channel |
| `gitlens.showWhatsNewAfterUpgrades` | Specifies whether to show What's New after upgrading to new feature releases |
| `gitlens.showWelcomeOrWhatsNew` | Specifies whether to show the Welcome (Quick Setup) experience on first install, or the What's New notification after upgrading to new feature releases |
| `gitlens.showWhatsNewAfterUpgrades` | Specifies whether to show the What's New notification after upgrading to new feature releases |
| `gitlens.advanced.abbreviatedShaLength` | Specifies the length of abbreviated commit SHAs (shas) | | `gitlens.advanced.abbreviatedShaLength` | Specifies the length of abbreviated commit SHAs (shas) |
| `gitlens.advanced.blame.customArguments` | Specifies additional arguments to pass to the `git blame` command | | `gitlens.advanced.blame.customArguments` | Specifies additional arguments to pass to the `git blame` command |
| `gitlens.advanced.blame.delayAfterEdit` | Specifies the time (in milliseconds) to wait before re-blaming an unsaved document after an edit. Use 0 to specify an infinite wait | | `gitlens.advanced.blame.delayAfterEdit` | Specifies the time (in milliseconds) to wait before re-blaming an unsaved document after an edit. Use 0 to specify an infinite wait |

+ 8
- 2
package.json View File

@ -1463,10 +1463,16 @@
"markdownDescription": "Specifies user-defined remote (code-hosting) services or custom domains for built-in remote services", "markdownDescription": "Specifies user-defined remote (code-hosting) services or custom domains for built-in remote services",
"scope": "resource" "scope": "resource"
}, },
"gitlens.showWelcomeOrWhatsNew": {
"type": "boolean",
"default": true,
"markdownDescription": "Specifies whether to show the Welcome (Quick Setup) experience on first install, or the What's New notification after upgrading to new feature releases",
"scope": "window"
},
"gitlens.showWhatsNewAfterUpgrades": { "gitlens.showWhatsNewAfterUpgrades": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
"markdownDescription": "Specifies whether to show What's New after upgrading to new feature releases",
"markdownDescription": "Specifies whether to show the What's New notification after upgrading to new feature releases",
"scope": "window" "scope": "window"
}, },
"gitlens.sortBranchesBy": { "gitlens.sortBranchesBy": {
@ -2600,7 +2606,7 @@
}, },
{ {
"command": "gitlens.showWelcomePage", "command": "gitlens.showWelcomePage",
"title": "Welcome",
"title": "Welcome (Quick Setup)",
"category": "GitLens" "category": "GitLens"
}, },
{ {

+ 1
- 0
src/config.ts View File

@ -108,6 +108,7 @@ export interface Config {
modes: Record<string, ModeConfig>; modes: Record<string, ModeConfig>;
outputLevel: TraceLevel; outputLevel: TraceLevel;
remotes: RemotesConfig[] | null; remotes: RemotesConfig[] | null;
showWelcomeOrWhatsNew: boolean;
showWhatsNewAfterUpgrades: boolean; showWhatsNewAfterUpgrades: boolean;
sortBranchesBy: BranchSorting; sortBranchesBy: BranchSorting;
sortTagsBy: TagSorting; sortTagsBy: TagSorting;

+ 4
- 0
src/extension.ts View File

@ -198,6 +198,8 @@ export function notifyOnUnsupportedGitVersion(version: string) {
async function showWelcomeOrWhatsNew(version: string, previousVersion: string | undefined) { async function showWelcomeOrWhatsNew(version: string, previousVersion: string | undefined) {
if (previousVersion == null) { if (previousVersion == null) {
Logger.log('GitLens first-time install'); Logger.log('GitLens first-time install');
if (!Container.config.showWelcomeOrWhatsNew) return;
await commands.executeCommand(Commands.ShowWelcomePage); await commands.executeCommand(Commands.ShowWelcomePage);
return; return;
@ -207,6 +209,8 @@ async function showWelcomeOrWhatsNew(version: string, previousVersion: string |
Logger.log(`GitLens upgraded from v${previousVersion} to v${version}`); Logger.log(`GitLens upgraded from v${previousVersion} to v${version}`);
} }
if (!Container.config.showWelcomeOrWhatsNew) return;
const [major, minor] = version.split('.').map(v => parseInt(v, 10)); const [major, minor] = version.split('.').map(v => parseInt(v, 10));
const [prevMajor, prevMinor] = previousVersion.split('.').map(v => parseInt(v, 10)); const [prevMajor, prevMinor] = previousVersion.split('.').map(v => parseInt(v, 10));
if ( if (

Loading…
Cancel
Save