Skip to content

Commit a442b78

Browse files
committed
Adds intro launchpad item
1 parent 0b6c975 commit a442b78

File tree

1 file changed

+36
-6
lines changed

1 file changed

+36
-6
lines changed

src/plus/launchpad/launchpad.ts

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,17 @@ import {
3434
UnsnoozeQuickInputButton,
3535
} from '../../commands/quickCommand.buttons';
3636
import { ensureAccessStep } from '../../commands/quickCommand.steps';
37+
import type { OpenWalkthroughCommandArgs } from '../../commands/walkthroughs';
3738
import { proBadge, urls } from '../../constants';
39+
import { Commands } from '../../constants.commands';
3840
import type { LaunchpadTelemetryContext, Source, Sources, TelemetryEvents } from '../../constants.telemetry';
3941
import type { Container } from '../../container';
4042
import { PlusFeatures } from '../../features';
4143
import type { QuickPickItemOfT } from '../../quickpicks/items/common';
4244
import { createQuickPickItemOfT, createQuickPickSeparator } from '../../quickpicks/items/common';
4345
import type { DirectiveQuickPickItem } from '../../quickpicks/items/directive';
4446
import { createDirectiveQuickPickItem, Directive, isDirectiveQuickPickItem } from '../../quickpicks/items/directive';
47+
import { executeCommand } from '../../system/command';
4548
import { configuration } from '../../system/configuration';
4649
import { getScopedCounter } from '../../system/counter';
4750
import { fromNow } from '../../system/date';
@@ -838,7 +841,20 @@ export class LaunchpadCommand extends QuickCommand<State> {
838841
state: StepState<State>,
839842
context: Context,
840843
): AsyncStepResultGenerator<{ connected: boolean | IntegrationId; resume: () => void }> {
841-
const confirmations: (QuickPickItemOfT<IntegrationId> | DirectiveQuickPickItem)[] = [];
844+
const confirmations: (QuickPickItemOfT<IntegrationId> | DirectiveQuickPickItem)[] = [
845+
createDirectiveQuickPickItem(Directive.Cancel, undefined, {
846+
label: 'Launchpad prioritizes your pull requests to keep you focused and your team unblocked',
847+
detail: 'Click to learn more about Launchpad',
848+
iconPath: new ThemeIcon('rocket'),
849+
onDidSelect: () =>
850+
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
851+
step: 'launchpad',
852+
source: 'launchpad',
853+
detail: 'info',
854+
}),
855+
}),
856+
createQuickPickSeparator(),
857+
];
842858

843859
for (const integration of supportedLaunchpadIntegrations) {
844860
if (context.connectedIntegrations.get(integration)) {
@@ -876,7 +892,7 @@ export class LaunchpadCommand extends QuickCommand<State> {
876892
`${this.title} \u00a0\u2022\u00a0 Connect an Integration`,
877893
confirmations,
878894
createDirectiveQuickPickItem(Directive.Cancel, false, { label: 'Cancel' }),
879-
{ placeholder: 'Launchpad requires a connected integration', ignoreFocusOut: false },
895+
{ placeholder: 'Connect an integration to get started with Launchpad', buttons: [], ignoreFocusOut: false },
880896
);
881897

882898
// Note: This is a hack to allow the quickpick to stay alive after the user finishes connecting the integration.
@@ -905,21 +921,35 @@ export class LaunchpadCommand extends QuickCommand<State> {
905921
const step = this.createConfirmStep(
906922
`${this.title} \u00a0\u2022\u00a0 Connect an ${hasConnectedIntegration ? 'Additional ' : ''}Integration`,
907923
[
924+
createDirectiveQuickPickItem(Directive.Cancel, undefined, {
925+
label: 'Launchpad prioritizes your pull requests to keep you focused and your team unblocked',
926+
detail: 'Click to learn more about Launchpad',
927+
iconPath: new ThemeIcon('rocket'),
928+
onDidSelect: () =>
929+
void executeCommand<OpenWalkthroughCommandArgs>(Commands.OpenWalkthrough, {
930+
step: 'launchpad',
931+
source: 'launchpad',
932+
detail: 'info',
933+
}),
934+
}),
935+
createQuickPickSeparator(),
908936
createQuickPickItemOfT(
909937
{
910938
label: `Connect an ${hasConnectedIntegration ? 'Additional ' : ''}Integration...`,
911939
detail: hasConnectedIntegration
912-
? 'Add additional integrations to view their pull requests in Launchpad'
913-
: 'Launchpad organizes your pull requests into actionable groups to keep your team unblocked',
940+
? 'Connect additional integrations to view their pull requests in Launchpad'
941+
: 'Connect an integration to accelerate your PR reviews',
942+
picked: true,
914943
},
915944
true,
916945
),
917946
],
918947
createDirectiveQuickPickItem(Directive.Cancel, false, { label: 'Cancel' }),
919948
{
920949
placeholder: hasConnectedIntegration
921-
? 'Add additional integrations to Launchpad'
922-
: 'Launchpad requires a connected integration',
950+
? 'Connect additional integrations to Launchpad'
951+
: 'Connect an integration to get started with Launchpad',
952+
buttons: [],
923953
ignoreFocusOut: true,
924954
},
925955
);

0 commit comments

Comments
 (0)