Skip to content

Commit 77e5746

Browse files
committed
Updates upgrade notification
1 parent 12a0be2 commit 77e5746

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

src/constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,15 @@ export const urls = Object.freeze({
3838
proFeatures: 'https://gitkraken.com/gitlens/pro-features?utm_source=gitlens-extension&utm_medium=in-app-links',
3939
security: 'https://help.gitkraken.com/gitlens/security?utm_source=gitlens-extension&utm_medium=in-app-links',
4040
workspaces: 'https://gitkraken.com/solutions/workspaces?utm_source=gitlens-extension&utm_medium=in-app-links',
41+
4142
cli: 'https://gitkraken.com/cli?utm_source=gitlens-extension&utm_medium=in-app-links',
4243
browserExtension: 'https://gitkraken.com/browser-extension?utm_source=gitlens-extension&utm_medium=in-app-links',
4344
desktop: 'https://gitkraken.com/git-client?utm_source=gitlens-extension&utm_medium=in-app-links',
4445
gkdev: 'https://gitkraken.dev?utm_source=gitlens-extension&utm_medium=in-app-links',
46+
47+
releaseNotes: 'https://help.gitkraken.com/gitlens/gitlens-release-notes-current/',
48+
releaseAnnouncement:
49+
'https://www.gitkraken.com/blog/gitkraken-launches-devex-platform-acquires-codesee?utm_source=gitlens-extension&utm_medium=in-app-links',
4550
});
4651

4752
export const enum CharCode {

src/messages.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import type { MessageItem } from 'vscode';
22
import { ConfigurationTarget, window } from 'vscode';
33
import type { SuppressedMessages } from './config';
4-
import { Commands } from './constants';
4+
import { Commands, urls } from './constants';
55
import type { BlameIgnoreRevsFileError } from './git/errors';
66
import { BlameIgnoreRevsFileBadRevisionError } from './git/errors';
77
import type { GitCommit } from './git/models/commit';
88
import { executeCommand } from './system/command';
99
import { configuration } from './system/configuration';
1010
import { Logger } from './system/logger';
11+
import { openUrl } from './system/utils';
1112

1213
export function showBlameInvalidIgnoreRevsFileWarningMessage(
1314
ex: BlameIgnoreRevsFileError | BlameIgnoreRevsFileBadRevisionError,
@@ -192,15 +193,23 @@ export function showIntegrationRequestTimedOutWarningMessage(providerName: strin
192193

193194
export async function showWhatsNewMessage(version: string) {
194195
const confirm = { title: 'OK', isCloseAffordance: true };
195-
await showMessage(
196+
const announcement = { title: 'Read Announcement', isCloseAffordance: true };
197+
const result = await showMessage(
196198
'info',
197199
`Upgraded to GitLens ${version}${
198-
version === '15' ? ', with a host of new Pro features including Launchpad, Code Suggest, and more' : ''
199-
} — [see what's new](https://help.gitkraken.com/gitlens/gitlens-release-notes-current/ "See what's new in GitLens ${version}").`,
200+
version === '15'
201+
? `, with a host of new [Pro features](${urls.proFeatures}) including [Launchpad](${urls.codeSuggest}), [Code Suggest](${urls.codeSuggest}), and more`
202+
: ''
203+
} — [see what's new](${urls.releaseNotes} "See what's new in GitLens ${version}").`,
200204
undefined,
201205
null,
202206
confirm,
207+
announcement,
203208
);
209+
210+
if (result === announcement) {
211+
void openUrl(urls.releaseAnnouncement);
212+
}
204213
}
205214

206215
export async function showMessage(

src/plus/gk/account/subscriptionService.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
ProgressLocation,
1818
StatusBarAlignment,
1919
ThemeColor,
20-
Uri,
2120
window,
2221
} from 'vscode';
2322
import { getPlatform } from '@env/platform';
@@ -492,9 +491,7 @@ export class SubscriptionService implements Disposable {
492491
);
493492

494493
if (result === learn) {
495-
void env.openExternal(
496-
Uri.parse('https://help.gitkraken.com/gitlens/gitlens-release-notes-current/'),
497-
);
494+
void openUrl(urls.releaseNotes);
498495
}
499496
}
500497
} catch (ex) {
@@ -1268,11 +1265,9 @@ export class SubscriptionService implements Disposable {
12681265
this._statusBarSubscription.tooltip = new MarkdownString(
12691266
`${
12701267
isReactivatedTrial
1271-
? `[See what's new](https://help.gitkraken.com/gitlens/gitlens-release-notes-current/) with ${pluralize(
1272-
'day',
1273-
remaining ?? 0,
1274-
{ infix: ' more ' },
1275-
)} in your **${effective.name}** trial.`
1268+
? `[See what's new](${urls.releaseNotes}) with ${pluralize('day', remaining ?? 0, {
1269+
infix: ' more ',
1270+
})} in your **${effective.name}** trial.`
12761271
: `You have ${pluralize('day', remaining ?? 0)} remaining in your **${effective.name}** trial.`
12771272
} Once your trial ends, you'll need a paid plan for full access to [Pro features](command:gitlens.openWalkthrough?%7B%22step%22%3A%22pro-trial%22,%22source%22%3A%22prompt%22%7D).\n\nYour trial also includes access to our [DevEx platform](${
12781273
urls.platform

src/webviews/apps/plus/account/components/account-content.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,7 @@ export class AccountContent extends LitElement {
282282
? html`<p>
283283
<code-icon icon="rocket"></code-icon>
284284
See
285-
<a href="https://help.gitkraken.com/gitlens/gitlens-release-notes-current/"
286-
>what's new</a
287-
>
285+
<a href="${urls.releaseNotes}">what's new</a>
288286
in GitLens.
289287
</p>`
290288
: nothing}

0 commit comments

Comments
 (0)