Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registerWalkthrough API comments #125354

Closed
roblourens opened this issue Jun 3, 2021 · 3 comments · Fixed by #130892
Closed

registerWalkthrough API comments #125354

roblourens opened this issue Jun 3, 2021 · 3 comments · Fixed by #130892
Assignees
Labels
api getting-started insiders-released Patch has been released in VS Code Insiders
Milestone

Comments

@roblourens
Copy link
Member

This is a little confusing as a public API. Adding a step inside getingStartedContent was easy, but there is some preprocessing that the service does internally when registering a walkthrough.

  • Seems like I have to pass the steps in twice, in the IGettingStartedWalkthroughDescriptor#content and the second argument
  • 'when' should be optional on the step
  • Could document how completionEvents works
  • The description type is confusing when I want a normal string
  • Setting up media is confusing, could use a helper or some guidance. I copy/pasted and it worked but it feels like I'm repeating myself
@roblourens
Copy link
Member Author

I also get this when reloading the window gettingStarted.ts:775 Could not restore to category notebookProfileWalkthrough as it was not found (my contrib registers too slow?)

and this

Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!
    at DisposableStore.add (lifecycle.ts:177)
    at GettingStartedIndexList._register (lifecycle.ts:207)
    at GettingStartedIndexList.register (gettingStarted.ts:1322)
    at gettingStarted.ts:877

JacksonKearl pushed a commit that referenced this issue Jun 3, 2021
@JacksonKearl JacksonKearl added this to the June 2021 milestone Jun 9, 2021
@JacksonKearl JacksonKearl modified the milestones: June 2021, July 2021 Jul 1, 2021
@JacksonKearl JacksonKearl modified the milestones: July 2021, August 2021 Jul 29, 2021
JacksonKearl pushed a commit that referenced this issue Aug 16, 2021
More still needed but good preogress.
Fixes #123525
Fixes #125354
Fixes #127510
JacksonKearl pushed a commit that referenced this issue Aug 16, 2021
More still needed but good preogress.
Fixes #123525
Fixes #125354
Fixes #127510
@JacksonKearl
Copy link
Contributor

Now:

registerWalkthrough(descriptor: IWalkthrough): void;

export interface IWalkthrough {
	id: string
	title: string
	description: string
	order: number
	source: string
	isFeatured: boolean
	next?: string
	when: ContextKeyExpression
	steps: IWalkthroughStep[]
	icon:
	| { type: 'icon', icon: ThemeIcon }
	| { type: 'image', path: string }
}

export interface IWalkthroughStep {
	id: string
	title: string
	description: LinkedText[]
	category: string
	when: ContextKeyExpression
	order: number
	completionEvents: string[]
	media:
	| { type: 'image', path: { hc: URI, light: URI, dark: URI }, altText: string }
	| { type: 'svg', path: URI, altText: string }
	| { type: 'markdown', path: URI, base: URI, root: URI }
}

@JacksonKearl
Copy link
Contributor

Oh just remembered LinkedText => string, will address.

@JacksonKearl JacksonKearl reopened this Aug 16, 2021
AiverReaver pushed a commit to AiverReaver/vscode that referenced this issue Aug 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Oct 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api getting-started insiders-released Patch has been released in VS Code Insiders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
@roblourens @JacksonKearl and others