Skip to content

Commit

Permalink
Updates walkthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed May 12, 2024
1 parent 6890c92 commit caa1c7c
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 20 deletions.
37 changes: 23 additions & 14 deletions package.json

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/commands/walkthroughs.ts
@@ -1,16 +1,19 @@
import type { WalkthroughSteps } from '../constants';
import { Commands } from '../constants';
import type { Container } from '../container';
import { command } from '../system/command';
import { openWalkthrough } from '../system/utils';
import { Command } from './base';

export type GetStartedCommandArgs = WalkthroughSteps | undefined;

@command()
export class GetStartedCommand extends Command {
constructor(private readonly container: Container) {
super(Commands.GetStarted);
}

execute(stepId?: string) {
execute(stepId?: WalkthroughSteps) {
const extensionId = this.container.context.extension.id;
// If the walkthroughId param is the same as the extension id, then this was run from the extensions view gear menu
if (stepId === extensionId) {
Expand Down
14 changes: 14 additions & 0 deletions src/constants.ts
Expand Up @@ -1112,3 +1112,17 @@ export type StoredSearchAndCompareItem = StoredComparison | StoredSearch;
export type StoredSearchAndCompareItems = Record<string, StoredSearchAndCompareItem>;
export type StoredStarred = Record<string, boolean>;
export type RecentUsage = Record<string, number>;

export type WalkthroughSteps =
| 'get-started'
| 'core-features'
| 'pro-features'
| 'pro-trial'
| 'pro-upgrade'
| 'pro-reactivate'
| 'pro-paid'
| 'visualize'
| 'launchpad'
| 'code-collab'
| 'integrations'
| 'more';
3 changes: 2 additions & 1 deletion src/plus/focus/focusIndicator.ts
@@ -1,5 +1,6 @@
import type { ConfigurationChangeEvent, StatusBarItem } from 'vscode';
import { Disposable, MarkdownString, StatusBarAlignment, ThemeColor, window } from 'vscode';
import type { GetStartedCommandArgs } from '../../commands/walkthroughs';
import type { Colors } from '../../constants';
import { Commands, previewBadge } from '../../constants';
import type { Container } from '../../container';
Expand Down Expand Up @@ -464,7 +465,7 @@ export class FocusIndicator implements Disposable {
this.storeFirstInteractionIfNeeded();
switch (action) {
case 'info': {
void executeCommand(Commands.GetStarted, 'launchpad');
void executeCommand<GetStartedCommandArgs>(Commands.GetStarted, 'launchpad');
break;
}
case 'hide': {
Expand Down
4 changes: 2 additions & 2 deletions src/views/draftsView.ts
@@ -1,5 +1,6 @@
import type { CancellationToken, TreeViewVisibilityChangeEvent } from 'vscode';
import { Disposable, TreeItem, TreeItemCollapsibleState, window } from 'vscode';
import type { GetStartedCommandArgs } from '../commands/walkthroughs';
import type { DraftsViewConfig } from '../config';
import { Commands, previewBadge } from '../constants';
import type { Container } from '../container';
Expand All @@ -11,7 +12,6 @@ import { executeCommand } from '../system/command';
import { configuration } from '../system/configuration';
import { gate } from '../system/decorators/gate';
import { groupByFilterMap } from '../system/iterable';
import { openUrl } from '../system/utils';
import { CacheableChildrenViewNode } from './nodes/abstract/cacheableChildrenViewNode';
import { DraftNode } from './nodes/draftNode';
import { GroupingNode } from './nodes/groupingNode';
Expand Down Expand Up @@ -119,7 +119,7 @@ export class DraftsView extends ViewBase<'drafts', DraftsViewNode, DraftsViewCon
return [
registerViewCommand(
this.getQualifiedCommand('info'),
() => openUrl('https://help.gitkraken.com/gitlens/side-bar/#drafts-☁%ef%b8%8f'),
() => executeCommand<GetStartedCommandArgs>(Commands.GetStarted, 'code-collab'),
this,
),
registerViewCommand(
Expand Down
2 changes: 1 addition & 1 deletion src/views/workspacesView.ts
Expand Up @@ -147,7 +147,7 @@ export class WorkspacesView extends ViewBase<'workspaces', WorkspacesViewNode, W
return [
registerViewCommand(
this.getQualifiedCommand('info'),
() => openUrl('https://help.gitkraken.com/gitlens/side-bar/#workspaces-☁%ef%b8%8f'),
() => openUrl('https://gitkraken.com/solutions/workspaces'),
this,
),
registerViewCommand(
Expand Down
2 changes: 1 addition & 1 deletion src/webviews/apps/welcome/welcome.html
Expand Up @@ -368,7 +368,7 @@ <h3 class="sticky">
<a
class="muted"
data-org-requires="drafts"
href="command:gitlens.getStarted?%22patchesAndSuggest%22"
href="command:gitlens.getStarted?%22code-collab%22"
aria-label="Learn more about Code Suggest"
><gl-tooltip hoist content="Learn more about Code Suggest"
><span>Code Suggest</span></gl-tooltip
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions walkthroughs/welcome/pro-paid.md
@@ -0,0 +1,3 @@
<figure align="center">
<img src="power-up.png" alt="Power-up with Pro and the GitKraken DevEx Platform" />
</figure>

0 comments on commit caa1c7c

Please sign in to comment.