Skip to content

Commit f299976

Browse files
committed
Updates walkthrough
- fix review notes - add contents to the left part - add mock contents to the right part - add feature flag
1 parent dcfecb4 commit f299976

File tree

15 files changed

+118
-42
lines changed

15 files changed

+118
-42
lines changed

images/icons/rocket-filled.svg

Lines changed: 1 addition & 0 deletions
Loading

images/icons/template/mapping.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@
5252
"repo-pull": 61745,
5353
"repo-push": 61746,
5454
"provider-jira": 61747,
55-
"play-button": 61748
55+
"play-button": 61748,
56+
"rocket-filled": 61749
5657
}

package.json

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9774,6 +9774,13 @@
97749774
"fontPath": "dist/glicons.woff2",
97759775
"fontCharacter": "\\f134"
97769776
}
9777+
},
9778+
"gitlens-rocket-filled": {
9779+
"description": "rocket-filled icon",
9780+
"default": {
9781+
"fontPath": "dist/glicons.woff2",
9782+
"fontCharacter": "\\f135"
9783+
}
97779784
}
97789785
},
97799786
"menus": {
@@ -17788,38 +17795,38 @@
1778817795
{
1778917796
"id": "welcome-in-trial",
1779017797
"title": "Welcome to GitLens",
17791-
"description": "Hope you're enjoying trial etc...",
17798+
"description": "Thanks for starting your **GitLens Pro** trial.\n\nComplete this walkthrough to experience enhanced PR review tools, deeper code history visualizations, and streamlined collaboration to help boost your productivity.\n\n[Continue the Walkthrough](command:gitlens.openWalkthrough?%7B%22step%22%3A%22visualize-code-history%22%7D)\n\nOnce your trial ends, you’ll return to **GitLens Community** — where you can still leverage features like in-editor blame annotations, hovers, CodeLens, and more. [Upgrade to GitLens Pro](command:gitlens.plus.upgrade) today to continue enjoying the full experience.\n\n[Upgrade to GitLens Pro](command:gitlens.plus.upgrade)",
1779217799
"media": {
1779317800
"markdown": "walkthroughs/welcome/welcome-in-trial.md"
1779417801
},
1779517802
"completionEvents": [
1779617803
"onContext:gitlens:walkthroughState:gettingStarted == true"
1779717804
],
17798-
"when": "false && (gitlens:plus:state == 1 || gitlens:plus:state == 3)"
17805+
"when": "config.gitlens.test.newWalkthrough && (gitlens:plus:state == 1 || gitlens:plus:state == 3)"
1779917806
},
1780017807
{
1780117808
"id": "welcome-paid",
1780217809
"title": "Welcome to GitLens | How to be successful",
17803-
"description": "Here's how to maximize your ux...",
17810+
"description": "As a ***GitLens Pro** user, you have access to powerful tools that accelerate PR reviews, provide deeper code history visualizations, and streamline collaboration across your team.\n\n[Continue the Walkthrough](command:gitlens.openWalkthrough?%7B%22step%22%3A%22visualize-code-history%22%7D)\n\nTo get the most out of your **GitLens Pro** experience, complete the walkthrough and visit our Help Center for in-depth guides.\n\n**[Learn more in the Help Center](https://help.gitkraken.com/gitlens/gitlens-home/)**",
1780417811
"media": {
1780517812
"markdown": "walkthroughs/welcome/welcome-paid.md"
1780617813
},
1780717814
"completionEvents": [
1780817815
"onContext:gitlens:walkthroughState:gettingStarted == true"
1780917816
],
17810-
"when": "false && gitlens:plus:state == 6"
17817+
"when": "config.gitlens.test.newWalkthrough && gitlens:plus:state == 6"
1781117818
},
1781217819
{
1781317820
"id": "welcome-in-trial-expired",
1781417821
"title": "Welcome to GitLens | Community vs. Pro",
17815-
"description": "Welcome back",
17822+
"description": "Thanks for installing GitLens, the #1 most downloaded Git extension in VS Code.\n\nYou’re currently using **GitLens Community**, our free extension that helps you track code changes and who made them, with features like in-editor blame annotations, hovers, CodeLens, and more.\n\n**Unlock more powerful tools - Start a free trial of GitLens Pro.**\n\n[Get Started with GitLens Pro](command:gitlens.plus.upgrade)\n\nWith GitLens Pro, you can accelerate PR reviews, visualize code history in-depth, and enhance collaboration across your team. It’s the perfect upgrade to streamline your VS Code workflow.",
1781617823
"media": {
1781717824
"markdown": "walkthroughs/welcome/welcome-in-trial-expired"
1781817825
},
1781917826
"completionEvents": [
1782017827
"onContext:gitlens:walkthroughState:gettingStarted == true"
1782117828
],
17822-
"when": "false && (gitlens:plus:state == 4 || gitlens:plus:state == 5 || gitlens:plus:state == 2)"
17829+
"when": "config.gitlens.test.newWalkthrough && (gitlens:plus:state == 4 || gitlens:plus:state == 5 || gitlens:plus:state == 2)"
1782317830
},
1782417831
{
1782517832
"id": "get-started-community",
@@ -17831,7 +17838,7 @@
1783117838
"completionEvents": [
1783217839
"onContext:gitlens:walkthroughState:gettingStarted == true"
1783317840
],
17834-
"when": "false && gitlens:plus:state <= 0"
17841+
"when": "config.gitlens.test.newWalkthrough && gitlens:plus:state <= 0"
1783517842
},
1783617843
{
1783717844
"id": "visualize-code-history",
@@ -17843,51 +17850,52 @@
1784317850
"completionEvents": [
1784417851
"onContext:gitlens:walkthroughState:visualizeCodeHistory == true"
1784517852
],
17846-
"when": "false"
17853+
"when": "config.gitlens.test.newWalkthrough"
1784717854
},
1784817855
{
1784917856
"id": "accelerate-pr-reviews",
1785017857
"title": "Accelerate PR Reviews",
17851-
"description": "",
17858+
"description": "$(rocket) **Launchpad - PR Hub**\n\nManage [GitHub](https://github.com/) PRs by status, helping you quickly prioritize tasks in your workflow and identify bottlenecks —all within VS Code.\n\n[View My PRs in Launchpad](command:gitlens.showLaunchpadView)\n\n💡 **Integrate your [Github or host provider](command:gitlens.connectRemoteProvider)** to use Launchpad and accelerate PR reviews\n\n$(folder-opened) **Worktrees - Multi-branch efficiency**\n\nWork on multiple branches simultaneously—hotfixes, new features, or experiments—without disrupting your main workspace.\n\n\n[Add a worktree](command:gitlens.gitCommands.worktree.create)\n$(gitlens-play-button) [Watch a video on Accelerate PR Reviews](http://example.com)",
1785217859
"media": {
1785317860
"markdown": "walkthroughs/welcome/accelerate-pr-reviews.md"
1785417861
},
1785517862
"completionEvents": [
1785617863
"onContext:gitlens:walkthroughState:prReviews == true"
1785717864
],
17858-
"when": "false"
17865+
"when": "config.gitlens.test.newWalkthrough"
1785917866
},
1786017867
{
1786117868
"id": "streamline-collaboration",
1786217869
"title": "Streamline Collaboration",
17863-
"description": "",
17870+
"description": "$(gitlens-cloud-patch) **Cloud Patches - Work on feedback before PRs**\n\nMake your work accessible anytime, anywhere without having to commit to the repo or disrupt CI. Keep up your team’s momentum with Cloud Patches.\n\n[Open Cloud Patches](command:gitlens.views.drafts.focus)\n\n$(gitlens-code-suggestion) **Code Suggest**\n\nTake action on GitHub & GitLab PRs right from GitLens. Review code suggestions, and send suggestions to GitKraken users on your team.\n\n$(gitlens-play-button) [Watch a video on GitLens Collaboration](https://example.com)",
1786417871
"media": {
1786517872
"markdown": "walkthroughs/welcome/streamline-collaboration.md"
1786617873
},
1786717874
"completionEvents": [
1786817875
"onContext:gitlens:walkthroughState:streamlineCollaboration == true"
1786917876
],
17870-
"when": "false"
17877+
"when": "config.gitlens.test.newWalkthrough"
1787117878
},
1787217879
{
1787317880
"id": "improve-workflows-with-integrations",
1787417881
"title": "Improve Workflows With Integrations",
17875-
"description": "",
17882+
"description": "**Integrations**\n\nReduce context switching and increase productivity by connecting to GitHub, GitLab, Azure DevOps, and Bitbucket to sync repos and track issues effortlessly in Launchpad - your PR hub.\n\n[Connect Integrations](command:gitlens.plus.cloudIntegrations.connect)\n\n**Autolinks**\n\nAll integrations provide automatic linking, which enables you to link to external services like Jira, and Trello.\n\n**Customize Autolinks**\n\nConfigure autolinks for custom pattern-matching with other services to easily link external references, such as Jira issues or Zendesk tickets, directly in your commit messages.\n\n**[Configure autolinks](command:gitlens.showSettingsPage!autolinks)**\n\n$(gitlens-play-button) [Watch a video on Integrations](https://example.com)",
1787617883
"media": {
1787717884
"markdown": "walkthroughs/welcome/improve-workflows-with-integrations.md"
1787817885
},
1787917886
"completionEvents": [
1788017887
"onContext:gitlens:walkthroughState:integrations == true"
1788117888
],
17882-
"when": "false"
17889+
"when": "config.gitlens.test.newWalkthrough"
1788317890
},
1788417891
{
1788517892
"id": "get-started",
1788617893
"title": "Welcome & Overview",
1788717894
"description": "Quickly [get started](command:gitlens.showWelcomePage \"Opens GitLens Welcome\") and discover the many powerful GitLens features, or sit back and watch our [tutorial video](https://www.youtube.com/watch?v=UQPb73Zz9qk \"Watch the Getting Started Tutorial video\").\n\n**Side Bar & Panel Overview**\n\n$(gitlens-gitlens-inspect)  **GitLens Inspect** — an x-ray into your code's history. Offers contextual insights & details focused on what you're currently working on.\n\n[Open GitLens Inspect](command:workbench.view.extension.gitlensInspect)\n\n$(gitlens-gitlens)  **GitLens** — quick access to many GitLens features. And the home of our team and collaboration services.\n\n[Open GitLens](command:workbench.view.extension.gitlens)\n\n$(source-control) **Source Control** — packed with additional features for working with, exploring, and managing your repositories.\n\n[Open Source Control](command:workbench.view.scm)\n\n$(layout-panel)  **(Bottom) Panel** — access to the powerful Commit Graph and its dedicated details view.\n\n[Open Commit Graph](command:gitlens.showGraphView)\n💡 While our views are arranged for focus and productivity, you can easily drag them around to suit your needs. Use the [Reset Views Layout](command:workbench.action.quickOpen?%22>GitLens%3A%20Reset%20Views%20Layout%22) command to quickly get back to the default layout.\n💡 **Want more control?** Use the interactive [GitLens Settings](command:gitlens.showSettingsPage \"Opens GitLens Settings\") editor to customize GitLens to meet your needs.",
1788817895
"media": {
1788917896
"markdown": "walkthroughs/welcome/get-started.md"
17890-
}
17897+
},
17898+
"when": "!config.gitlens.test.newWalkthrough"
1789117899
},
1789217900
{
1789317901
"id": "core-features",
@@ -17896,7 +17904,8 @@
1789617904
"media": {
1789717905
"altText": "Illustrations of Inline Blame, Codelens, File Annotations and Revision Navigation",
1789817906
"svg": "walkthroughs/welcome/core-features.svg"
17899-
}
17907+
},
17908+
"when": "!config.gitlens.test.newWalkthrough"
1790017909
},
1790117910
{
1790217911
"id": "pro-features",
@@ -17905,7 +17914,7 @@
1790517914
"media": {
1790617915
"markdown": "walkthroughs/welcome/pro-features.md"
1790717916
},
17908-
"when": "gitlens:plus:state >= 0 && gitlens:plus:state <= 2"
17917+
"when": "!config.gitlens.test.newWalkthrough && gitlens:plus:state >= 0 && gitlens:plus:state <= 2"
1790917918
},
1791017919
{
1791117920
"id": "pro-trial",
@@ -17914,7 +17923,7 @@
1791417923
"media": {
1791517924
"markdown": "walkthroughs/welcome/pro-trial.md"
1791617925
},
17917-
"when": "gitlens:plus:state == 3"
17926+
"when": "!config.gitlens.test.newWalkthrough && gitlens:plus:state == 3"
1791817927
},
1791917928
{
1792017929
"id": "pro-upgrade",
@@ -17923,7 +17932,7 @@
1792317932
"media": {
1792417933
"markdown": "walkthroughs/welcome/pro-upgrade.md"
1792517934
},
17926-
"when": "gitlens:plus:state == 4"
17935+
"when": "!config.gitlens.test.newWalkthrough && gitlens:plus:state == 4"
1792717936
},
1792817937
{
1792917938
"id": "pro-reactivate",
@@ -17932,7 +17941,7 @@
1793217941
"media": {
1793317942
"markdown": "walkthroughs/welcome/pro-reactivate.md"
1793417943
},
17935-
"when": "gitlens:plus:state == 5"
17944+
"when": "!config.gitlens.test.newWalkthrough && gitlens:plus:state == 5"
1793617945
},
1793717946
{
1793817947
"id": "pro-paid",
@@ -17941,7 +17950,7 @@
1794117950
"media": {
1794217951
"markdown": "walkthroughs/welcome/pro-paid.md"
1794317952
},
17944-
"when": "gitlens:plus:state == 6"
17953+
"when": "!config.gitlens.test.newWalkthrough && gitlens:plus:state == 6"
1794517954
},
1794617955
{
1794717956
"id": "visualize",
@@ -17950,7 +17959,8 @@
1795017959
"media": {
1795117960
"altText": "Illustrations of the Commit Graph & Visual File History",
1795217961
"svg": "walkthroughs/welcome/visualize.svg"
17953-
}
17962+
},
17963+
"when": "!config.gitlens.test.newWalkthrough"
1795417964
},
1795517965
{
1795617966
"id": "launchpad",
@@ -17959,7 +17969,8 @@
1795917969
"media": {
1796017970
"altText": "Illustrations of Launchpad",
1796117971
"svg": "walkthroughs/welcome/launchpad-quick.svg"
17962-
}
17972+
},
17973+
"when": "!config.gitlens.test.newWalkthrough"
1796317974
},
1796417975
{
1796517976
"id": "code-collab",
@@ -17968,23 +17979,26 @@
1796817979
"media": {
1796917980
"altText": "Illustrations of Code Suggest & Cloud Patches",
1797017981
"image": "walkthroughs/welcome/code-collab.png"
17971-
}
17982+
},
17983+
"when": "!config.gitlens.test.newWalkthrough"
1797217984
},
1797317985
{
1797417986
"id": "integrations",
1797517987
"title": "Integrate with Git Hosting & Issue Services",
1797617988
"description": "GitLens automatically detects patterns in commit messages to generate autolinks to pull requests and issues for Git hosting services including GitHub, GitLab, Gitea, Gerrit, Google Source, Bitbucket, Azure DevOps, and custom servers.\n\n[Configure autolinks](command:gitlens.showSettingsPage!autolinks) for custom pattern-matching with other services.\n\n**Rich Integrations with GitHub, GitLab, and Jira**\nConnect [GitHub](command:gitlens.connectRemoteProvider), [GitLab](command:gitlens.connectRemoteProvider), and [Jira](command:gitlens.plus.cloudIntegrations.connect?%7B%22integrationIds%22%3A%5B%22jira%22%5D%2C%22source%22%3A%22walkthrough%22%2C%22detail%22%3A%7B%22action%22%3A%22connect%22%2C%22integration%22%3A%22jira%22%7D%7D) integrations to enhance autolinks with more data available via APIs, associate branches and commits with PRs, and review pull requests within VS Code.",
1797717989
"media": {
1797817990
"markdown": "walkthroughs/welcome/integrations.md"
17979-
}
17991+
},
17992+
"when": "!config.gitlens.test.newWalkthrough"
1798017993
},
1798117994
{
1798217995
"id": "more",
1798317996
"title": "And More!",
1798417997
"description": "**Rebase got you down?**\nEasily visualize and configure interactive rebase operations with the intuitive and user-friendly Interactive Rebase Editor\n\n**Trouble remembering Git commands?**\nNow you don't have to with the Git Command Palette — a guided, step-by-step experience to many common Git commands.\n\n[Open Git Command Palette](command:gitlens.gitCommands)\n\n**Terminal your jam?**\nQuickly jump to more details on commits, branches, tags, and more with autolinks in the Integrated Terminal.\n\n**Not sure what you are looking for?**\nOpen the Command Palette and explore the many available commands.\n\n[Open GitLens Commands](command:workbench.action.quickOpen?%22>GitLens%3A%22)",
1798517998
"media": {
1798617999
"markdown": "walkthroughs/welcome/more-features.md"
17987-
}
18000+
},
18001+
"when": "!config.gitlens.test.newWalkthrough"
1798818002
}
1798918003
]
1799018004
}

src/telemetry/walkthroughStateProvider.ts

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ export enum WalkthroughContextKeys {
2020
export class WalkthroughStateProvider implements Disposable {
2121
protected disposables: Disposable[] = [];
2222
private readonly state = new Map<WalkthroughContextKeys, boolean>();
23+
private isInitialized = false;
24+
private _initPromise: Promise<void> | undefined;
25+
2326
/**
2427
* using reversed map (instead of direct map as walkthroughToTracking Record<WalkthroughContextKeys, TrackedUsageKeys[]>)
2528
* makes code less readable, but prevents duplicated usageTracker keys
@@ -28,6 +31,7 @@ export class WalkthroughStateProvider implements Disposable {
2831
[`command:${Commands.PlusStartPreviewTrial}:executed`]: WalkthroughContextKeys.GettingStarted,
2932
[`command:${Commands.PlusReactivateProTrial}:executed`]: WalkthroughContextKeys.GettingStarted,
3033
[`command:${Commands.ShowWelcomePage}:executed`]: WalkthroughContextKeys.GettingStarted,
34+
[`command:${Commands.OpenWalkthrough}:executed`]: WalkthroughContextKeys.GettingStarted,
3135

3236
'graphDetailsView:shown': WalkthroughContextKeys.VisualizeCodeHistory,
3337
'graphView:shown': WalkthroughContextKeys.VisualizeCodeHistory,
@@ -66,11 +70,6 @@ export class WalkthroughStateProvider implements Disposable {
6670
this.state.set(key, false);
6771
}
6872
entries(this.walkthroughByTracking).forEach(([usageKey, walkthroughKey]) => {
69-
console.log('candidate to completeStep', {
70-
usageKey: usageKey,
71-
walkthroughKey: walkthroughKey,
72-
isUsed: this.container.usage.isUsed(usageKey),
73-
});
7473
if (!this.state.get(walkthroughKey) && this.container.usage.isUsed(usageKey)) {
7574
void this.completeStep(walkthroughKey);
7675
}
@@ -90,15 +89,31 @@ export class WalkthroughStateProvider implements Disposable {
9089
}
9190
}
9291

92+
/**
93+
* Walkthrough view is not ready to listen to context changes immediately after opening VSCode with the walkthrough page opened
94+
* As we're not able to check if the walkthrough is ready, we need to add a delay.
95+
* The 1s delay will not be too annoying for user but it's enough to init
96+
*/
97+
private async waitForWalkthroughInitialized() {
98+
if (this.isInitialized) {
99+
return;
100+
}
101+
if (!this._initPromise) {
102+
this._initPromise = wait(1000).then(() => {
103+
this.isInitialized = true;
104+
});
105+
}
106+
await this._initPromise;
107+
}
108+
93109
/**
94110
* Set up the walkthrough step completed.
95111
* According to [VSCode docs](https://code.visualstudio.com/api/references/contribution-points?source=post_page#Completion-events)
96112
* we don't have an ability to reset the flag
97113
*/
98114
private async completeStep(key: WalkthroughContextKeys) {
99-
console.log('completeStep', { key: key });
100115
this.state.set(key, true);
101-
await wait(1000); // wait uncontrolled walkthrough view to be loaded
116+
await this.waitForWalkthroughInitialized();
102117
void setContext(`gitlens:walkthroughState:${key}`, true);
103118
}
104119

0 commit comments

Comments
 (0)