Skip to content

Commit e679e4f

Browse files
committed
Refines plan naming for account section
1 parent 8404ea1 commit e679e4f

File tree

15 files changed

+227
-181
lines changed

15 files changed

+227
-181
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ Use the `Generate Commit Message` command from the Source Control view's context
279279

280280
# Ready for GitLens Pro?
281281

282-
When you're ready to unlock the full potential of GitLens and our [DevEx platform](https://gitkraken.com/devex?utm_source=gitlens-extension&utm_medium=in-app-links) and enjoy all the benefits on your privately-hosted repos, consider upgrading to GitLens Pro. With GitLens Pro, you'll gain access to [Pro features](https://gitkraken.com/gitlens/pro-features?utm_source=gitlens-extension&utm_medium=in-app-links) on privately-hosted repos.
282+
When you're ready to unlock the full potential of GitLens and the [GitKrakenDevEx platform](https://gitkraken.com/devex?utm_source=gitlens-extension&utm_medium=in-app-links) and enjoy all the benefits on your privately-hosted repos, consider upgrading to GitLens Pro. With GitLens Pro, you'll gain access to [Pro features](https://gitkraken.com/gitlens/pro-features?utm_source=gitlens-extension&utm_medium=in-app-links) on privately-hosted repos.
283283

284284
To learn more about the pricing and the additional features offered with GitLens Pro, visit the [GitLens Pricing page](https://www.gitkraken.com/gitlens/pricing?utm_source=gitlens-extension&utm_medium=in-app-links). Upgrade to GitLens Pro today and take your Git workflow to the next level!
285285

src/constants.subscription.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
1+
export const proPreviewLengthInDays = 3;
2+
export const proTrialLengthInDays = 7;
3+
14
export type PromoKeys = 'launchpad' | 'launchpad-extended' | 'pro50';
25

36
export const enum SubscriptionPlanId {
4-
Free = 'free',
5-
FreePlus = 'free+',
7+
Community = 'community',
8+
CommunityWithAccount = 'community-with-account',
69
Pro = 'pro',
710
Teams = 'teams',
811
Enterprise = 'enterprise',
912
}
1013

11-
// NOTE: Pay attention to gitlens:plus:state in package.json when modifying this enum
14+
// NOTE: Pay attention to gitlens:plus:state in the `package.json` when modifying this enum
1215
// NOTE: This is reported in telemetry so we should NOT change the values
1316
export const enum SubscriptionState {
1417
/** Indicates a user who hasn't verified their email address yet */
1518
VerificationRequired = -1,
16-
/** Indicates a Free user who hasn't yet started the preview trial */
17-
Free = 0,
18-
/** Indicates a Free user who is in preview trial */
19-
FreeInPreviewTrial = 1,
20-
/** Indicates a Free user who's preview has expired trial */
21-
FreePreviewTrialExpired = 2,
22-
/** Indicates a Free+ user with a completed trial */
23-
FreePlusInTrial = 3,
24-
/** Indicates a Free+ user who's trial has expired and is not yet eligible for reactivation */
25-
FreePlusTrialExpired = 4,
26-
/** Indicated a Free+ user who's trial has expired and is eligible for reactivation */
27-
FreePlusTrialReactivationEligible = 5,
28-
/** Indicates a Paid user */
19+
/** Indicates an account-less Community (free) user who hasn't started a Pro preview */
20+
Community = 0,
21+
/** Indicates an account-less Community (free) user who is in a Pro preview */
22+
ProPreview = 1,
23+
/** Indicates an account-less Community (free) user who's Pro preview has expired */
24+
ProPreviewExpired = 2,
25+
/** Indicates a Pro user who is in a Pro trial */
26+
ProTrial = 3,
27+
/** Indicates a Pro user who's Pro trial has expired, has an account, and is not yet eligible for reactivation */
28+
ProTrialExpired = 4,
29+
/** Indicated a Pro user who's Pro trial has expired, has an account, and is eligible for reactivation */
30+
ProTrialReactivationEligible = 5,
31+
/** Indicates a Pro/Teams/Enterprise paid user */
2932
Paid = 6,
3033
}

src/plus/gk/account/__debug__accountDebug.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Disposable } from 'vscode';
22
import { ThemeIcon, window } from 'vscode';
33
import { Commands } from '../../../constants.commands';
4-
import { SubscriptionPlanId, SubscriptionState } from '../../../constants.subscription';
4+
import { proTrialLengthInDays, SubscriptionPlanId, SubscriptionState } from '../../../constants.subscription';
55
import type { Container } from '../../../container';
66
import type { QuickPickItemOfT } from '../../../quickpicks/items/common';
77
import { createQuickPickSeparator } from '../../../quickpicks/items/common';
@@ -28,13 +28,13 @@ export function registerAccountDebug(container: Container, service: Subscription
2828
type SimulateQuickPickItem = QuickPickItemOfT<
2929
| { state: null; reactivatedTrial?: never; expiredPaid?: never; planId?: never }
3030
| {
31-
state: Exclude<SubscriptionState, SubscriptionState.FreePlusInTrial | SubscriptionState.Paid>;
31+
state: Exclude<SubscriptionState, SubscriptionState.ProTrial | SubscriptionState.Paid>;
3232
reactivatedTrial?: never;
3333
expiredPaid?: never;
3434
planId?: never;
3535
}
3636
| {
37-
state: SubscriptionState.FreePlusInTrial;
37+
state: SubscriptionState.ProTrial;
3838
reactivatedTrial?: boolean;
3939
expiredPaid?: never;
4040
planId?: never;
@@ -69,20 +69,20 @@ class AccountDebug {
6969
label: 'Community',
7070
description: 'Community, no account',
7171
iconPath: new ThemeIcon('blank'),
72-
item: { state: SubscriptionState.Free },
72+
item: { state: SubscriptionState.Community },
7373
},
7474
createQuickPickSeparator('Preview'),
7575
{
7676
label: 'Pro Preview',
7777
description: 'Pro, no account',
7878
iconPath: new ThemeIcon('blank'),
79-
item: { state: SubscriptionState.FreeInPreviewTrial },
79+
item: { state: SubscriptionState.ProPreview },
8080
},
8181
{
8282
label: 'Pro Preview (Expired)',
8383
description: 'Community, no account',
8484
iconPath: new ThemeIcon('blank'),
85-
item: { state: SubscriptionState.FreePreviewTrialExpired },
85+
item: { state: SubscriptionState.ProPreviewExpired },
8686
},
8787
createQuickPickSeparator('Account'),
8888
{
@@ -96,28 +96,28 @@ class AccountDebug {
9696
label: 'Pro Trial',
9797
description: 'Pro, account',
9898
iconPath: new ThemeIcon('blank'),
99-
item: { state: SubscriptionState.FreePlusInTrial },
99+
item: { state: SubscriptionState.ProTrial },
100100
},
101101
{
102102
label: 'Pro Trial (Reactivated)',
103103
description: 'Pro, account',
104104
iconPath: new ThemeIcon('blank'),
105105
item: {
106-
state: SubscriptionState.FreePlusInTrial,
106+
state: SubscriptionState.ProTrial,
107107
reactivatedTrial: true,
108108
},
109109
},
110110
{
111111
label: 'Pro Trial (Expired)',
112112
description: 'Community, account',
113113
iconPath: new ThemeIcon('blank'),
114-
item: { state: SubscriptionState.FreePlusTrialExpired },
114+
item: { state: SubscriptionState.ProTrialExpired },
115115
},
116116
{
117117
label: 'Pro Trial (Reactivation Eligible)',
118118
description: 'Community, account',
119119
iconPath: new ThemeIcon('blank'),
120-
item: { state: SubscriptionState.FreePlusTrialReactivationEligible },
120+
item: { state: SubscriptionState.ProTrialReactivationEligible },
121121
},
122122
createQuickPickSeparator('Paid'),
123123
{
@@ -229,15 +229,15 @@ class AccountDebug {
229229
const { state, reactivatedTrial, expiredPaid, planId } = item;
230230

231231
switch (state) {
232-
case SubscriptionState.Free:
233-
case SubscriptionState.FreeInPreviewTrial:
234-
case SubscriptionState.FreePreviewTrialExpired:
232+
case SubscriptionState.Community:
233+
case SubscriptionState.ProPreview:
234+
case SubscriptionState.ProPreviewExpired:
235235
this.service.overrideSession(null);
236236

237237
this.service.changeSubscription(
238-
state === SubscriptionState.Free
238+
state === SubscriptionState.Community
239239
? undefined
240-
: getPreviewSubscription(state === SubscriptionState.FreePreviewTrialExpired ? 0 : 3),
240+
: getPreviewSubscription(state === SubscriptionState.ProPreviewExpired ? 0 : 3),
241241
{ store: false },
242242
);
243243
return false;
@@ -329,7 +329,7 @@ function getSimulatedTrialLicenseResponse(
329329
organizationId?: string,
330330
type: GKLicenseType = 'gitkraken_v1-pro',
331331
status: 'active-new' | 'active-reactivated' | 'expired' | 'expired-reactivatable' = 'active-new',
332-
durationDays: number = 7,
332+
durationDays: number = proTrialLengthInDays,
333333
): GKLicenses {
334334
const tenSeconds = 10 * 1000;
335335
const oneDay = 24 * 60 * 60 * 1000;
@@ -380,20 +380,20 @@ function getSimulatedCheckInResponse(
380380
: {};
381381
let trialLicenseStatus: 'active-new' | 'active-reactivated' | 'expired' | 'expired-reactivatable' = 'active-new';
382382
switch (targetSubscriptionState) {
383-
case SubscriptionState.FreePlusTrialExpired:
383+
case SubscriptionState.ProTrialExpired:
384384
trialLicenseStatus = 'expired';
385385
break;
386-
case SubscriptionState.FreePlusTrialReactivationEligible:
386+
case SubscriptionState.ProTrialReactivationEligible:
387387
trialLicenseStatus = 'expired-reactivatable';
388388
break;
389-
case SubscriptionState.FreePlusInTrial:
389+
case SubscriptionState.ProTrial:
390390
trialLicenseStatus = options?.trial?.reactivatedTrial ? 'active-reactivated' : 'active-new';
391391
break;
392392
}
393393
const trialLicenseData =
394-
targetSubscriptionState === SubscriptionState.FreePlusInTrial ||
395-
targetSubscriptionState === SubscriptionState.FreePlusTrialExpired ||
396-
targetSubscriptionState === SubscriptionState.FreePlusTrialReactivationEligible
394+
targetSubscriptionState === SubscriptionState.ProTrial ||
395+
targetSubscriptionState === SubscriptionState.ProTrialExpired ||
396+
targetSubscriptionState === SubscriptionState.ProTrialReactivationEligible
397397
? getSimulatedTrialLicenseResponse(
398398
options?.organizationId,
399399
targetSubscriptionType,
@@ -408,7 +408,7 @@ function getSimulatedCheckInResponse(
408408
effectiveLicenses: trialLicenseData,
409409
},
410410
nextOptInDate:
411-
targetSubscriptionState === SubscriptionState.FreePlusTrialReactivationEligible
411+
targetSubscriptionState === SubscriptionState.ProTrialReactivationEligible
412412
? tenSecondsAgo.toISOString()
413413
: undefined,
414414
};

src/plus/gk/account/authenticationConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export class AuthenticationConnection implements Disposable {
169169
input.onDidAccept(() => resolve(input.value)),
170170
);
171171

172-
input.title = 'GitKraken Sign In';
172+
input.title = 'GitLens Sign In';
173173
input.placeholder = 'Please enter the provided authorization code';
174174
input.prompt = 'If the auto-redirect fails, paste the authorization code';
175175

@@ -239,7 +239,7 @@ export class AuthenticationConnection implements Disposable {
239239
private updateStatusBarItem(signingIn?: boolean) {
240240
if (signingIn && this._statusBarItem == null) {
241241
this._statusBarItem = window.createStatusBarItem('gitlens.plus.signIn', StatusBarAlignment.Left);
242-
this._statusBarItem.name = 'GitKraken Sign in';
242+
this._statusBarItem.name = 'GitLens Sign in';
243243
this._statusBarItem.text = 'Signing in to GitKraken...';
244244
this._statusBarItem.show();
245245
}

src/plus/gk/account/promos.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ const promos: Promo[] = [
1818
key: 'launchpad',
1919
code: 'GLLAUNCHPAD24',
2020
states: [
21-
SubscriptionState.Free,
22-
SubscriptionState.FreeInPreviewTrial,
23-
SubscriptionState.FreePreviewTrialExpired,
24-
SubscriptionState.FreePlusInTrial,
25-
SubscriptionState.FreePlusTrialExpired,
26-
SubscriptionState.FreePlusTrialReactivationEligible,
21+
SubscriptionState.Community,
22+
SubscriptionState.ProPreview,
23+
SubscriptionState.ProPreviewExpired,
24+
SubscriptionState.ProTrial,
25+
SubscriptionState.ProTrialExpired,
26+
SubscriptionState.ProTrialReactivationEligible,
2727
],
2828
expiresOn: new Date('2024-09-27T06:59:00.000Z').getTime(),
2929
commandTooltip: 'Launchpad Sale: Save 75% or more on GitLens Pro',
@@ -32,12 +32,12 @@ const promos: Promo[] = [
3232
key: 'launchpad-extended',
3333
code: 'GLLAUNCHPAD24',
3434
states: [
35-
SubscriptionState.Free,
36-
SubscriptionState.FreeInPreviewTrial,
37-
SubscriptionState.FreePreviewTrialExpired,
38-
SubscriptionState.FreePlusInTrial,
39-
SubscriptionState.FreePlusTrialExpired,
40-
SubscriptionState.FreePlusTrialReactivationEligible,
35+
SubscriptionState.Community,
36+
SubscriptionState.ProPreview,
37+
SubscriptionState.ProPreviewExpired,
38+
SubscriptionState.ProTrial,
39+
SubscriptionState.ProTrialExpired,
40+
SubscriptionState.ProTrialReactivationEligible,
4141
],
4242
startsOn: new Date('2024-09-27T06:59:00.000Z').getTime(),
4343
expiresOn: new Date('2024-10-14T06:59:00.000Z').getTime(),
@@ -46,12 +46,12 @@ const promos: Promo[] = [
4646
{
4747
key: 'pro50',
4848
states: [
49-
SubscriptionState.Free,
50-
SubscriptionState.FreeInPreviewTrial,
51-
SubscriptionState.FreePreviewTrialExpired,
52-
SubscriptionState.FreePlusInTrial,
53-
SubscriptionState.FreePlusTrialExpired,
54-
SubscriptionState.FreePlusTrialReactivationEligible,
49+
SubscriptionState.Community,
50+
SubscriptionState.ProPreview,
51+
SubscriptionState.ProPreviewExpired,
52+
SubscriptionState.ProTrial,
53+
SubscriptionState.ProTrialExpired,
54+
SubscriptionState.ProTrialReactivationEligible,
5555
],
5656
commandTooltip: 'Limited-Time Sale: Save 33% or more on your 1st seat of Pro. See your special price',
5757
},

0 commit comments

Comments
 (0)