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

feat: add template support for remaining node types #1897

Merged

Conversation

jonathanj-square
Copy link
Contributor

No description provided.

@jonathanj-square jonathanj-square requested review from a team and worstell and removed request for a team June 27, 2024 19:26
@ftl-robot ftl-robot mentioned this pull request Jun 27, 2024
if (!name) {
return undefined
}
const message = await getTemplateArgument('What would you like to message type for this fsm?', `${snakeToPascal(name)}Message`)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "What would you like to message type for this fsm?" correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/message/name the message/g

@@ -62,43 +62,53 @@ const snippetForNodeType = async (nodeType: string, item: FtlTreeItem): Promise<
return ingressSnippet(item)

case 'enum':
return enumSnippet
return await enumSnippet()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might not need await here since this func is awaited already.


const subscriberSnippet = `var _ = ftl.Subscription(sampleTopic, "sample_subscription")
return `//ftl:export
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's possible, but is it possible to trigger actual VSCode snippets from the extension, rather than rolling our own?

@jonathanj-square jonathanj-square merged commit 0e8b663 into hackathon-extension-tree Jun 28, 2024
43 checks passed
@jonathanj-square jonathanj-square deleted the jonathanj/het/node-templates branch June 28, 2024 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants