Skip to content

Commit

Permalink
Clean up previous walkthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
nzaytsev committed Oct 28, 2024
1 parent 5b4fbd3 commit a83c128
Show file tree
Hide file tree
Showing 27 changed files with 30 additions and 1,146 deletions.
132 changes: 8 additions & 124 deletions package.json

Large diffs are not rendered by default.

15 changes: 2 additions & 13 deletions src/constants.telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import type { Config, GraphBranchesVisibility, GraphConfig } from './config';
import type { WalkthroughSteps } from './constants';
import type { AIModels, AIProviders } from './constants.ai';
import type { Commands } from './constants.commands';
import type { IntegrationId, SupportedCloudIntegrationIds } from './constants.integrations';
Expand Down Expand Up @@ -388,19 +389,7 @@ export type TelemetryEvents = {

/** Sent when the walkthrough is opened */
walkthrough: {
step?:
| 'get-started'
| 'core-features'
| 'pro-features'
| 'pro-trial'
| 'pro-upgrade'
| 'pro-reactivate'
| 'pro-paid'
| 'visualize'
| 'launchpad'
| 'code-collab'
| 'integrations'
| 'more';
step?: WalkthroughSteps;
};
} & Record<`${WebviewTypes | WebviewViewTypes}/showAborted`, WebviewShownEventData> &
Record<
Expand Down
20 changes: 8 additions & 12 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,11 @@ export const urls = Object.freeze({
});

export type WalkthroughSteps =
| 'get-started'
| 'core-features'
| 'pro-features'
| 'pro-trial'
| 'pro-upgrade'
| 'pro-reactivate'
| 'pro-paid'
| 'visualize'
| 'launchpad'
| 'code-collab'
| 'integrations'
| 'more';
| 'welcome-in-trial'
| 'welcome-paid'
| 'welcome-in-trial-expired'
| 'get-started-community'
| 'visualize-code-history'
| 'accelerate-pr-reviews'
| 'streamline-collaboration'
| 'improve-workflows-with-integrations';
19 changes: 7 additions & 12 deletions src/plus/gk/account/subscriptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,35 +280,30 @@ export class SubscriptionService implements Disposable {
switch (subscription.state) {
case SubscriptionState.VerificationRequired:
case SubscriptionState.Community:
case SubscriptionState.ProPreview:
case SubscriptionState.ProPreviewExpired:
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
...source,
step: 'pro-features',
step: 'get-started-community',
});
break;
case SubscriptionState.ProTrial:
case SubscriptionState.ProPreview:
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
...source,
step: 'pro-trial',
});
break;
case SubscriptionState.ProTrialExpired:
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
...source,
step: 'pro-upgrade',
step: 'welcome-in-trial',
});
break;
case SubscriptionState.ProTrialReactivationEligible:
case SubscriptionState.ProTrialExpired:
case SubscriptionState.ProPreviewExpired:
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
...source,
step: 'pro-reactivate',
step: 'welcome-in-trial-expired',
});
break;
case SubscriptionState.Paid:
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
...source,
step: 'pro-paid',
step: 'welcome-paid',
});
break;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plus/launchpad/launchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ export class LaunchpadCommand extends QuickCommand<State> {
iconPath: new ThemeIcon('rocket'),
onDidSelect: () =>
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
step: 'launchpad',
step: 'accelerate-pr-reviews',
source: 'launchpad',
detail: 'info',
}),
Expand Down
2 changes: 1 addition & 1 deletion src/plus/launchpad/launchpadIndicator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ export class LaunchpadIndicator implements Disposable {
switch (action) {
case 'info': {
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
step: 'launchpad',
step: 'accelerate-pr-reviews',
source: 'launchpad-indicator',
detail: 'info',
});
Expand Down
2 changes: 1 addition & 1 deletion src/views/draftsView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class DraftsView extends ViewBase<'drafts', DraftsViewNode, DraftsViewCon
this.getQualifiedCommand('info'),
() =>
executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
step: 'code-collab',
step: 'streamline-collaboration',
source: 'cloud-patches',
detail: 'info',
}),
Expand Down
2 changes: 1 addition & 1 deletion src/views/launchpadView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export class LaunchpadView extends ViewBase<'launchpad', LaunchpadViewNode, Laun
this.getQualifiedCommand('info'),
() =>
executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
step: 'launchpad',
step: 'accelerate-pr-reviews',
source: 'launchpad-view',
detail: 'info',
}),
Expand Down
3 changes: 1 addition & 2 deletions src/webviews/home/homeWebview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,7 @@ export class HomeWebviewProvider implements WebviewProvider<State, State, HomeWe
doneCount: this.container.walkthrough.doneCount,
progress: this.container.walkthrough.progress,
},
showWalkthroughProgress:
!this.getWalkthroughDismissed() && configuration.getAny('gitlens.test.newWalkthrough'),
showWalkthroughProgress: !this.getWalkthroughDismissed(),
};
}

Expand Down
Binary file removed walkthroughs/welcome/code-collab.png
Binary file not shown.
103 changes: 0 additions & 103 deletions walkthroughs/welcome/commit-graph.svg

This file was deleted.

Loading

0 comments on commit a83c128

Please sign in to comment.