Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
- Removes the option to associate an issue from cards in the RECENT section of the _Home_ view ([#4333](https://github.com/gitkraken/vscode-gitlens/issues/4333))
- Combines the "Create Pull Request" and "Create with AI" buttons into a split button ([#4330](https://github.com/gitkraken/vscode-gitlens/issues/4330))
- On the _Home_ view in the active branch card replaces repository with a breadcrumb that has both the repository and current branch, where the repository is collapsible and is hidden by default ([#4332](https://github.com/gitkraken/vscode-gitlens/issues/4332))
- Hides Walkthrough links and buttons in _Cursor_ because they are not applicable ([#3837](https://github.com/gitkraken/vscode-gitlens/issues/3837))

### Fixed

Expand Down
27 changes: 18 additions & 9 deletions contributions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1465,11 +1465,11 @@
},
"gitlens.getStarted": {
"label": "Get Started",
"commandPalette": true,
"commandPalette": "gitlens:walkthroughSupported",
"menus": {
"extension/context": [
{
"when": "extension =~ /^eamodio.gitlens?$/ && extensionStatus == installed",
"when": "extension =~ /^eamodio.gitlens?$/ && extensionStatus == installed && gitlens:walkthroughSupported",
"group": "9_gitlens",
"order": 1
}
Expand Down Expand Up @@ -7868,14 +7868,14 @@
"menus": {
"view/item/context": [
{
"when": "viewItem == gitlens:views:drafts",
"when": "viewItem == gitlens:views:drafts && gitlens:walkthroughSupported",
"group": "8_info",
"order": 1
}
],
"view/title": [
{
"when": "view == gitlens.views.drafts",
"when": "view == gitlens.views.drafts && gitlens:walkthroughSupported",
"group": "8_info",
"order": 1
}
Expand Down Expand Up @@ -8847,21 +8847,21 @@
"menus": {
"gitlens/views/grouped/launchpad": [
{
"when": "gitlens:views:scm:grouped:view == launchpad",
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:walkthroughSupported",
"group": "2_gitlens_actions",
"order": 1
}
],
"view/item/context": [
{
"when": "viewItem == gitlens:views:launchpad",
"when": "viewItem == gitlens:views:launchpad && gitlens:walkthroughSupported",
"group": "8_info",
"order": 1
}
],
"view/title": [
{
"when": "view == gitlens.views.launchpad",
"when": "view == gitlens.views.launchpad && gitlens:walkthroughSupported",
"group": "8_info",
"order": 1
}
Expand Down Expand Up @@ -16781,7 +16781,12 @@
"order": 1,
"welcomeContent": [
{
"contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked."
"contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "gitlens:walkthroughSupported"
},
{
"contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "!gitlens:walkthroughSupported"
},
{
"contents": "[Connect an Integration...](command:gitlens.showLaunchpad?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nAllows Launchpad to organize your pull requests into actionable groups and keep your team unblocked.",
Expand Down Expand Up @@ -16888,7 +16893,11 @@
},
{
"contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad"
"when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:walkthroughSupported"
},
{
"contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && !gitlens:walkthroughSupported"
},
{
"contents": "[Connect an Integration...](command:gitlens.showLaunchpad?%7B%22source%22%3A%22launchpad-view%22%7D)\n\nAllows Launchpad to organize your pull requests into actionable groups and keep your team unblocked.",
Expand Down
31 changes: 23 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11033,6 +11033,10 @@
"command": "gitlens.fetchRepositories",
"when": "gitlens:repos:withRemotes && !gitlens:readonly && !gitlens:untrusted && !gitlens:hasVirtualFolders"
},
{
"command": "gitlens.getStarted",
"when": "gitlens:walkthroughSupported"
},
{
"command": "gitlens.ghpr.views.openOrCreateWorktree",
"when": "false"
Expand Down Expand Up @@ -14200,7 +14204,7 @@
"extension/context": [
{
"command": "gitlens.getStarted",
"when": "extension =~ /^eamodio.gitlens?$/ && extensionStatus == installed",
"when": "extension =~ /^eamodio.gitlens?$/ && extensionStatus == installed && gitlens:walkthroughSupported",
"group": "9_gitlens@1"
},
{
Expand Down Expand Up @@ -15512,7 +15516,7 @@
"gitlens/views/grouped/launchpad": [
{
"command": "gitlens.views.launchpad.info",
"when": "gitlens:views:scm:grouped:view == launchpad",
"when": "gitlens:views:scm:grouped:view == launchpad && gitlens:walkthroughSupported",
"group": "2_gitlens_actions@1"
},
{
Expand Down Expand Up @@ -18789,7 +18793,7 @@
},
{
"command": "gitlens.views.drafts.info",
"when": "viewItem == gitlens:views:drafts",
"when": "viewItem == gitlens:views:drafts && gitlens:walkthroughSupported",
"group": "8_info@1"
},
{
Expand Down Expand Up @@ -19004,7 +19008,7 @@
},
{
"command": "gitlens.views.launchpad.info",
"when": "viewItem == gitlens:views:launchpad",
"when": "viewItem == gitlens:views:launchpad && gitlens:walkthroughSupported",
"group": "8_info@1"
},
{
Expand Down Expand Up @@ -20874,7 +20878,7 @@
},
{
"command": "gitlens.views.drafts.info",
"when": "view == gitlens.views.drafts",
"when": "view == gitlens.views.drafts && gitlens:walkthroughSupported",
"group": "8_info@1"
},
{
Expand Down Expand Up @@ -21099,7 +21103,7 @@
},
{
"command": "gitlens.views.launchpad.info",
"when": "view == gitlens.views.launchpad",
"when": "view == gitlens.views.launchpad && gitlens:walkthroughSupported",
"group": "8_info@1"
},
{
Expand Down Expand Up @@ -23627,7 +23631,13 @@
},
{
"view": "gitlens.views.launchpad",
"contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked."
"contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "gitlens:walkthroughSupported"
},
{
"view": "gitlens.views.launchpad",
"contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "!gitlens:walkthroughSupported"
},
{
"view": "gitlens.views.launchpad",
Expand Down Expand Up @@ -23687,7 +23697,12 @@
{
"view": "gitlens.views.scm.grouped",
"contents": "[Launchpad](command:gitlens.views.launchpad.info \"Learn about Launchpad\") — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad"
"when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && gitlens:walkthroughSupported"
},
{
"view": "gitlens.views.scm.grouped",
"contents": "Launchpad — organizes your pull requests into actionable groups to help you focus and keep your team unblocked.",
"when": "!gitlens:views:scm:grouped:loading && gitlens:views:scm:grouped:view == launchpad && !gitlens:walkthroughSupported"
},
{
"view": "gitlens.views.scm.grouped",
Expand Down
33 changes: 18 additions & 15 deletions src/commands/quickCommand.steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ import { first, map } from '../system/iterable';
import { Logger } from '../system/logger';
import { getSettledValue } from '../system/promise';
import { pad, pluralize, truncate } from '../system/string';
import { isWalkthroughSupported } from '../telemetry/walkthroughStateProvider';
import type { ViewsWithRepositoryFolders } from '../views/viewBase';
import type {
AsyncStepResultGenerator,
Expand Down Expand Up @@ -2795,21 +2796,23 @@ export async function* ensureAccessStep<

switch (feature) {
case 'launchpad':
directives.splice(
0,
0,
createDirectiveQuickPickItem(Directive.Cancel, undefined, {
label: 'Launchpad prioritizes your pull requests to keep you focused and your team unblocked',
detail: 'Click to learn more about Launchpad',
iconPath: new ThemeIcon('rocket'),
onDidSelect: () =>
void executeCommand<OpenWalkthroughCommandArgs>('gitlens.openWalkthrough', {
step: 'accelerate-pr-reviews',
source: { source: 'launchpad', detail: 'info' },
}),
}),
createQuickPickSeparator(),
);
if (isWalkthroughSupported()) {
directives.splice(
0,
0,
createDirectiveQuickPickItem(Directive.Cancel, undefined, {
label: 'Launchpad prioritizes your pull requests to keep you focused and your team unblocked',
detail: 'Click to learn more about Launchpad',
iconPath: new ThemeIcon('rocket'),
onDidSelect: () =>
void executeCommand<OpenWalkthroughCommandArgs>('gitlens.openWalkthrough', {
step: 'accelerate-pr-reviews',
source: { source: 'launchpad', detail: 'info' },
}),
}),
createQuickPickSeparator(),
);
}
break;
case 'startWork':
directives.splice(
Expand Down
1 change: 1 addition & 0 deletions src/constants.context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export type ContextKeys = {
'gitlens:views:scm:grouped:welcome': boolean;
'gitlens:vsls': boolean | 'host' | 'guest';
'gitlens:window:annotated': AnnotationStatus;
'gitlens:walkthroughSupported': boolean;
} & Record<`gitlens:action:${string}`, number> &
Record<`gitlens:feature:unsupported:${Features}`, boolean> &
Record<`gitlens:key:${Keys}`, boolean> &
Expand Down
10 changes: 6 additions & 4 deletions src/container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ import { log } from './system/decorators/log';
import { Logger } from './system/logger';
import { TelemetryService } from './telemetry/telemetry';
import { UsageTracker } from './telemetry/usageTracker';
import { WalkthroughStateProvider } from './telemetry/walkthroughStateProvider';
import { isWalkthroughSupported, WalkthroughStateProvider } from './telemetry/walkthroughStateProvider';
import { GitTerminalLinkProvider } from './terminal/linkProvider';
import { GitDocumentTracker } from './trackers/documentTracker';
import { LineTracker } from './trackers/lineTracker';
Expand Down Expand Up @@ -205,7 +205,9 @@ export class Container {
);
this._disposables.push((this._uri = new UriService(this)));
this._disposables.push((this._subscription = new SubscriptionService(this, this._connection, previousVersion)));
this._disposables.push((this._walkthrough = new WalkthroughStateProvider(this)));
if (isWalkthroughSupported()) {
this._disposables.push((this._walkthrough = new WalkthroughStateProvider(this)));
}
this._disposables.push((this._organizations = new OrganizationService(this, this._connection)));

this._disposables.push((this._git = new GitProviderService(this)));
Expand Down Expand Up @@ -713,8 +715,8 @@ export class Container {
return this._usage;
}

private readonly _walkthrough: WalkthroughStateProvider;
get walkthrough(): WalkthroughStateProvider {
private readonly _walkthrough: WalkthroughStateProvider | undefined;
get walkthrough(): WalkthroughStateProvider | undefined {
return this._walkthrough;
}

Expand Down
15 changes: 9 additions & 6 deletions src/plus/gk/subscriptionService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ import { flatten } from '../../system/object';
import { pauseOnCancelOrTimeout } from '../../system/promise';
import { pluralize } from '../../system/string';
import { createDisposable } from '../../system/unifiedDisposable';
import { isWalkthroughSupported } from '../../telemetry/walkthroughStateProvider';
import { LoginUriPathPrefix } from './authenticationConnection';
import { authenticationProviderScopes } from './authenticationProvider';
import type { GKCheckInResponse } from './models/checkin';
Expand Down Expand Up @@ -482,13 +483,13 @@ export class SubscriptionService implements Disposable {
void this.resendVerification(source);
}
} else if (isSubscriptionPaid(this._subscription)) {
const learn: MessageItem = { title: 'Learn More' };
const learn: MessageItem | undefined = isWalkthroughSupported() ? { title: 'Learn More' } : undefined;
const confirm: MessageItem = { title: 'Continue', isCloseAffordance: true };
const result = await window.showInformationMessage(
`You are now on ${actual.name} and have full access to all GitLens Pro features.`,
{ modal: true },
confirm,
learn,
...(learn ? [learn] : []),
);

if (result === learn) {
Expand All @@ -497,7 +498,7 @@ export class SubscriptionService implements Disposable {
} else if (isSubscriptionTrial(this._subscription)) {
const days = getSubscriptionTimeRemaining(this._subscription, 'days') ?? 0;

const learn: MessageItem = { title: 'Learn More' };
const learn: MessageItem | undefined = isWalkthroughSupported() ? { title: 'Learn More' } : undefined;
const confirm: MessageItem = { title: 'Continue', isCloseAffordance: true };
const result = await window.showInformationMessage(
`Welcome to your ${effective.name} Trial.\n\nYou now have full access to all GitLens Pro features for ${
Expand All @@ -508,15 +509,17 @@ export class SubscriptionService implements Disposable {
detail: 'Your trial also includes access to the GitKraken DevEx platform, unleashing powerful Git visualization & productivity capabilities everywhere you work: IDE, desktop, browser, and terminal.',
},
confirm,
learn,
...(learn ? [learn] : []),
);

if (result === learn) {
void this.learnAboutPro({ source: 'prompt', detail: { action: 'trial-started' } }, source);
}
} else {
const upgrade: MessageItem = { title: 'Upgrade to Pro' };
const learn: MessageItem = { title: 'Community vs. Pro' };
const learn: MessageItem | undefined = isWalkthroughSupported()
? { title: 'Community vs. Pro' }
: undefined;
const confirm: MessageItem = { title: 'Continue', isCloseAffordance: true };
const result = await window.showInformationMessage(
`You are now on ${actual.name}.`,
Expand All @@ -525,7 +528,7 @@ export class SubscriptionService implements Disposable {
detail: 'You only have access to Pro features on publicly-hosted repos. For full access to all Pro features, please upgrade to GitLens Pro.',
},
upgrade,
learn,
...(learn ? [learn] : []),
confirm,
);

Expand Down
34 changes: 18 additions & 16 deletions src/plus/launchpad/launchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import { getScopedCounter } from '../../system/counter';
import { fromNow } from '../../system/date';
import { some } from '../../system/iterable';
import { interpolate, pluralize } from '../../system/string';
import { isWalkthroughSupported } from '../../telemetry/walkthroughStateProvider';
import { ProviderBuildStatusState, ProviderPullRequestReviewState } from '../integrations/providers/models';
import type { LaunchpadCategorizedResult, LaunchpadItem } from './launchpadProvider';
import {
Expand Down Expand Up @@ -1175,21 +1176,22 @@ export class LaunchpadCommand extends QuickCommand<State> {
context: Context,
): AsyncStepResultGenerator<{ connected: boolean | IntegrationIds; resume: () => void | undefined }> {
const hasConnectedIntegration = some(context.connectedIntegrations.values(), c => c);
const confirmations: (QuickPickItemOfT<IntegrationIds> | DirectiveQuickPickItem)[] = !hasConnectedIntegration
? [
createDirectiveQuickPickItem(Directive.Cancel, undefined, {
label: 'Launchpad prioritizes your pull requests to keep you focused and your team unblocked',
detail: 'Click to learn more about Launchpad',
iconPath: new ThemeIcon('rocket'),
onDidSelect: () =>
void executeCommand<OpenWalkthroughCommandArgs>('gitlens.openWalkthrough', {
step: 'accelerate-pr-reviews',
source: { source: 'launchpad', detail: 'info' },
}),
}),
createQuickPickSeparator(),
]
: [];
const confirmations: (QuickPickItemOfT<IntegrationIds> | DirectiveQuickPickItem)[] =
!hasConnectedIntegration && isWalkthroughSupported()
? [
createDirectiveQuickPickItem(Directive.Cancel, undefined, {
label: 'Launchpad prioritizes your pull requests to keep you focused and your team unblocked',
detail: 'Click to learn more about Launchpad',
iconPath: new ThemeIcon('rocket'),
onDidSelect: () =>
void executeCommand<OpenWalkthroughCommandArgs>('gitlens.openWalkthrough', {
step: 'accelerate-pr-reviews',
source: { source: 'launchpad', detail: 'info' },
}),
}),
createQuickPickSeparator(),
]
: [];

for (const integration of supportedLaunchpadIntegrations) {
if (context.connectedIntegrations.get(integration)) {
Expand Down Expand Up @@ -1249,7 +1251,7 @@ export class LaunchpadCommand extends QuickCommand<State> {
const step = this.createConfirmStep(
`${this.title} \u00a0\u2022\u00a0 Connect an ${hasConnectedIntegration ? 'Additional ' : ''}Integration`,
[
...(hasConnectedIntegration
...(hasConnectedIntegration || !isWalkthroughSupported()
? []
: [
createDirectiveQuickPickItem(Directive.Cancel, undefined, {
Expand Down
Loading