Skip to content

Commit

Permalink
update trial messaging
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiolms committed Nov 7, 2024
1 parent f8d40c6 commit 8a45fa3
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 39 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17510,7 +17510,7 @@
},
{
"view": "gitlens.views.drafts",
"contents": "Cloud Patches ᴘʀᴇᴠɪᴇᴡ — easily and securely share code with your teammates or other developers, accessible from anywhere, streamlining your workflow with better collaboration."
"contents": "Cloud Patches ᴘʀᴇᴠɪᴇᴡ — easily and securely share code with your teammates and other developers without adding noise to your repository."
},
{
"view": "gitlens.views.drafts",
Expand Down Expand Up @@ -17556,7 +17556,7 @@
},
{
"view": "gitlens.views.worktrees",
"contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by allowing you to work on multiple branches simultaneously."
"contents": "[Worktrees](https://help.gitkraken.com/gitlens/side-bar/#worktrees-view-pro) ᴾᴿᴼ — minimize context switching by working on multiple branches simultaneously."
},
{
"view": "gitlens.views.worktrees",
Expand All @@ -17580,7 +17580,7 @@
},
{
"view": "gitlens.views.worktrees",
"contents": "[Upgrade to Pro](command:gitlens.plus.upgrade?%7B%22source%22%3A%22worktrees%22%7D)",
"contents": "Use on privately-hosted repos requires [GitLens Pro](https://help.gitkraken.com/gitlens/gitlens-community-vs-gitlens-pro?%7B%22source%22%3A%22worktrees%22%7D).\n\n[Upgrade to Pro](command:gitlens.plus.upgrade?%7B%22source%22%3A%22worktrees%22%7D)",
"when": "gitlens:plus:required && gitlens:plus:state == 4"
},
{
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ export const urls = Object.freeze({

releaseNotes: 'https://help.gitkraken.com/gitlens/gitlens-release-notes-current/',
releaseAnnouncement: `https://www.gitkraken.com/blog/gitkraken-launches-devex-platform-acquires-codesee?${utm}`,
gitlensProVsCommunity: `https://help.gitkraken.com/gitlens/gitlens-community-vs-gitlens-pro/?${utm}`,
});

export type WalkthroughSteps =
Expand Down
27 changes: 12 additions & 15 deletions src/plus/gk/account/subscriptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,33 +317,30 @@ export class SubscriptionService implements Disposable {
} = this._subscription;

if (account?.verified === false) {
const days = getSubscriptionTimeRemaining(this._subscription, 'days') ?? proTrialLengthInDays;

const verify: MessageItem = { title: 'Resend Email' };
const learn: MessageItem = { title: 'See Pro Features' };
const learn: MessageItem | undefined = isSubscriptionPaid(this._subscription)
? { title: 'See Pro Features' }
: undefined;
const confirm: MessageItem = { title: 'Continue', isCloseAffordance: true };

const result = await window.showInformationMessage(
isSubscriptionPaid(this._subscription)
? `You are now on the ${actual.name} plan. \n\nYou must first verify your email. Once verified, you will have full access to Pro features.`
: `Welcome to your ${
effective.name
} Trial.\n\nYou must first verify your email. Once verified, you will have full access to Pro features for ${
days < 1 ? '<1 more day' : pluralize('day', days, { infix: ' more ' })
}.`,
: `Welcome to GitLens.`,
{
modal: true,
detail: `Your ${
isSubscriptionPaid(this._subscription) ? 'plan' : 'trial'
} also includes access to the GitKraken DevEx platform, unleashing powerful Git visualization & productivity capabilities everywhere you work: IDE, desktop, browser, and terminal.`,
detail: isSubscriptionPaid(this._subscription)
? `Your ${
isSubscriptionPaid(this._subscription) ? 'plan' : 'trial'
} also includes access to the GitKraken DevEx platform, unleashing powerful Git visualization & productivity capabilities everywhere you work: IDE, desktop, browser, and terminal.`
: `Verify the email we just sent you to start your Pro trial.`,
},
verify,
learn,
confirm,
...([verify, learn, confirm].filter(Boolean) as MessageItem[]),
);

if (result === verify) {
void this.resendVerification(source);
} else if (result === learn) {
} else if (learn && result === learn) {
void this.learnAboutPro({ source: 'prompt', detail: { action: 'trial-started-verify-email' } }, source);
}
} else if (isSubscriptionPaid(this._subscription)) {
Expand Down
4 changes: 2 additions & 2 deletions src/quickpicks/items/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function createDirectiveQuickPickItem(
break;
case Directive.StartProTrial:
label = 'Start Pro Trial';
detail = `Start your free ${proTrialLengthInDays}-day Pro trial for full access to Pro features`;
detail = `Start your free ${proTrialLengthInDays}-day GitLens Pro trial - no credit card required.`;
break;
case Directive.RequiresVerification:
label = 'Resend Email';
Expand All @@ -74,7 +74,7 @@ export function createDirectiveQuickPickItem(
case Directive.RequiresPaidSubscription:
label = 'Upgrade to Pro';
if (detail != null) {
description ??= ' \u2014\u00a0\u00a0 a paid plan is required to use this Pro feature';
description ??= ' - access Launchpad and all Pro features with GitLens Pro';
} else {
detail = 'Upgrading to a paid plan is required to use this Pro feature';
}
Expand Down
22 changes: 11 additions & 11 deletions src/webviews/apps/plus/shared/components/feature-gate-plus-state.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { css, html, LitElement, nothing } from 'lit';
import { customElement, property, query } from 'lit/decorators.js';
import { urls } from '../../../../../constants';
import { Commands } from '../../../../../constants.commands';
import { proTrialLengthInDays, SubscriptionState } from '../../../../../constants.subscription';
import type { Source } from '../../../../../constants.telemetry';
Expand Down Expand Up @@ -139,31 +140,30 @@ export class GlFeatureGatePlusState extends LitElement {

case SubscriptionState.ProPreviewExpired:
return html`
<p>
Use on privately-hosted repos requires <a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>.
</p>
<gl-button
appearance="${appearance}"
href="${generateCommandLink(Commands.PlusSignUp, this.source)}"
>Start Pro Trial</gl-button
>&nbsp;Try GitLens Pro&nbsp;</gl-button
>
<p>
Start your free ${proTrialLengthInDays}-day Pro trial to try
${this.featureWithArticleIfNeeded ? `${this.featureWithArticleIfNeeded} and other ` : ''}Pro
features, or
Start your free ${proTrialLengthInDays}-day GitLens Pro trial - no credit card required. Or
<a href="${generateCommandLink(Commands.PlusLogin, this.source)}" title="Sign In">sign in</a>.
</p>
`;

case SubscriptionState.ProTrialExpired:
return html` <gl-button
return html`<p>
Use on privately-hosted repos requires <a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>.
</p>
<gl-button
appearance="${appearance}"
href="${generateCommandLink(Commands.PlusUpgrade, this.source)}"
>Upgrade to Pro</gl-button
>
${this.renderPromo(promo)}
<p>
Your Pro trial has ended. Please upgrade for full access to
${this.featureWithArticleIfNeeded ? `${this.featureWithArticleIfNeeded} and other ` : ''}Pro
features.
</p>`;
${this.renderPromo(promo)}`;

case SubscriptionState.ProTrialReactivationEligible:
return html`
Expand Down
20 changes: 12 additions & 8 deletions src/webviews/apps/plus/shared/components/home-account-content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,11 +361,14 @@ export class GLHomeAccountContent extends LitElement {
case SubscriptionState.ProTrialExpired:
return html`
<div class="account">
<p>Your Pro trial has ended. You can now only use Pro features on publicly-hosted repos.</p>
<p>
Thank you for trying <a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>. <br /><br />
Continue leveraging Pro features and workflows on privately-hosted repos by upgrading today.
</p>
<button-container>
<gl-button full href="command:gitlens.plus.upgrade">Upgrade to Pro</gl-button>
</button-container>
${this.renderPromo(promo)} ${this.renderIncludesDevEx()}
${this.renderPromo(promo)}
</div>
`;

Expand Down Expand Up @@ -395,15 +398,16 @@ export class GLHomeAccountContent extends LitElement {
return html`
<div class="account">
<p>
Sign up for access to Pro features and the
<a href="${urls.platform}">GitKraken DevEx platform</a>, or
<a href="command:gitlens.plus.login">sign in</a>.
Unlock advanced workflows and professional developer features with
<a href="${urls.gitlensProVsCommunity}">GitLens Pro</a>.
</p>
<button-container>
<gl-button full href="command:gitlens.plus.signUp">Sign Up</gl-button>
<gl-button full href="command:gitlens.plus.signUp">Try GitLens Pro</gl-button>
</button-container>
<p>Signing up starts your free ${proTrialLengthInDays}-day Pro trial.</p>
${this.renderIncludesDevEx()}
<p>
Get ${proTrialLengthInDays} days of GitLens Pro for free - no credit card required. Or
<a href="command:gitlens.plus.login">sign in</a>.
</p>
</div>
`;
}
Expand Down

0 comments on commit 8a45fa3

Please sign in to comment.