Group templates by filter rather than filtering it out#4826
Open
Group templates by filter rather than filtering it out#4826
Conversation
added 2 commits
January 7, 2026 14:25
Member
Author
motm32
approved these changes
Jan 8, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors template filtering to use a grouping approach instead of filtering templates out. Templates are now assigned a templateFilter property (Verified, Core, or All) and displayed using VS Code's grouping feature, rather than filtering them based on a user setting. This change fixes a bug with displaying Python v2 triggers.
Changes:
- Removed
TemplateFilterparameter fromgetFunctionTemplatesmethod and all its call sites - Added
templateFilterproperty toFunctionTemplateBaseinterface to categorize templates - Refactored
CentralTemplateProvider.getFunctionTemplatesto assign templateFilter to all templates instead of filtering - Updated
FunctionListStepto use grouping instead of filter selection, enablingenableGroupingon quick pick - Removed template filter change UI and related settings updates
- Deprecated
templateFilterSettingin package.json with explanation message - Updated sorting logic to always prioritize HttpTrigger/TimerTrigger templates
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/templates/IFunctionTemplate.ts | Added optional templateFilter property to categorize templates |
| src/templates/CentralTemplateProvider.ts | Refactored to assign templateFilter to templates instead of filtering them out |
| src/templates/dotnet/parseDotnetTemplates.ts | Set templateFilter to All for dotnet templates |
| src/commands/createFunction/FunctionListStep.ts | Removed filter selection UI, added grouping support, updated sorting |
| src/constants.ts | Removed templateFilterSetting constant |
| src/vsCodeConfig/verifyVSCodeConfigOnActivate.ts | Removed TemplateFilter parameter from getFunctionTemplates call |
| package.json | Deprecated templateFilter setting with explanation message |
| test/*.ts | Updated test calls to remove TemplateFilter parameter |
Comments suppressed due to low confidence (2)
src/commands/createFunction/FunctionListStep.ts:140
- The "No templates found" warning option (lines 134-140) doesn't have a group property set, similar to the OpenAPI option. For consistency with other non-template options ("Skip for now" and "Reload templates"), consider adding
group: ' 'to ensure it's displayed in a separate group from actual templates.
if (templates.length === 0) {
picks.push({
label: localize('noTemplates', '$(warning) No templates found'),
suppressPersistence: true,
data: <IFunctionTemplate | TemplatePromptResult><unknown>undefined,
onPicked: () => { /* do nothing */ }
})
src/commands/createFunction/FunctionListStep.ts:140
- Avoid automated semicolon insertion (91% of all statements in the enclosing function have an explicit semicolon).
})
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Contributor
|
@nturinski I've opened a new pull request, #4884, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <[email protected]>
* Initial plan * Fix sortTemplates bug by removing outer scope variable dependency Co-authored-by: nturinski <[email protected]> * Fix duplicate httptrigger regex pattern in getPriority Co-authored-by: nturinski <[email protected]> * Update src/commands/createFunction/FunctionListStep.ts --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: nturinski <[email protected]> Co-authored-by: Nathan <[email protected]>
MicroFish91
approved these changes
Jan 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This caused a bug when displaying Python v2 triggers.
99% sure it's because of this: https://github.com/microsoft/vscode-azurefunctions/compare/nat/groupTemplateFilters?expand=1#diff-c46886397fa9d35fb1038f5209fb64795b7591a3dc76ebfe658fcdee63c344c1R92
Will fix this and merge after release