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

[Tab completion] support of template parameters matching for list and search #4061

Closed
Tracked by #4887
vlada-shubina opened this issue Oct 25, 2021 · 4 comments
Closed
Tracked by #4887
Assignees
Labels
triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Milestone

Comments

@vlada-shubina
Copy link
Member

vlada-shubina commented Oct 25, 2021

Currently we support template parameter filtering for list and search, but the feature is not documented and syntax is not friendly.
Discuss it in scope migration to new parser.

Tests to be reenabled if implemented:

Integration tests

DotnetNewList.CanFilterByChoiceParameter
DotnetNewList.CanFilterByNonChoiceParameter
DotnetNewList.IgnoresValueForNonChoiceParameter
DotnetNewList.CanFilterByChoiceParameterWithValue
DotnetNewList.CannotListTemplatesWithUnknownParameter
DotnetNewList.CannotListTemplatesWithUnknownValueForChoiceParameter
DotnetNewList.CannotListTemplatesForInvalidFilters
DotnetNewSearch.CanFilterByChoiceParameter
DotnetNewSearch.CanFilterByNonChoiceParameter
DotnetNewSearch.IgnoresValueForNonChoiceParameter
DotnetNewSearch.CanFilterByChoiceParameterWithValue
DotnetNewSearch.CannotSearchTemplatesWithUnknownParameter
TemplateDiscoveryTests.CanReadCliData
TemplateDiscoveryTests.CanReadCliDataFromDiff

Unit tests

TemplateSearchCoordinatorTests.CacheSearchCliSymbolNameFilterTest
TemplateSearchCoordinatorTests.CacheSearchCliSymbolNameMismatchFilterTest

@vlada-shubina
Copy link
Member Author

We agreed that in scope of #2191 we will NOT implement support for the existing behavior:

dotnet new --list --framework - list all templates which have --framework option
dotnet new --list --framework net5.0 - list all templates which have --framework option with value net5.0
dotnet new --search --framework - search for all templates which have --framework option
dotnet new --search --framework net5.0 - search for all templates which have --framework option with value net5.0

however we might implement it with new syntax to be agreed.
The idea might be dotnet new --list --has-option framework or similar.

@baronfel
Copy link
Member

I suggest the following syntax:

dotnet new list --has-symbol OPTION_NAME[=OPTION_VALUE]

If only OPTION_NAME is specified, the semantic is 'the option specified is present in the template'
If OPTION_NAME=OPTION_VALUE is specified, the semantic is 'the option specified is present in the template AND accepts OPTION_VALUE as a valid value'

I think we want to stick with the symbol nomenclature here, since symbol is what we call these things in the template.json. It's not the most clear term to the general user, though.

@baronfel baronfel added triaged The issue was evaluated by the triage team, placed on correct area, next action defined. and removed need-pm-discussion Need agreement from PM that the issue aligns to targeted stories for any of the next 2 releases labels Apr 18, 2022
@baronfel baronfel removed their assignment Apr 18, 2022
@baronfel baronfel added this to the Backlog milestone Apr 18, 2022
@vlada-shubina
Copy link
Member Author

@baronfel term "symbol" means any of: parameter, generated, computed, derived. Only parameters can be entered by user.
Therefore not sure about using symbol here.

@vlada-shubina vlada-shubina added triaged The issue was evaluated by the triage team, placed on correct area, next action defined. and removed triaged The issue was evaluated by the triage team, placed on correct area, next action defined. labels Apr 19, 2022
@vlada-shubina vlada-shubina mentioned this issue Jun 23, 2022
26 tasks
@vlada-shubina vlada-shubina mentioned this issue Nov 3, 2022
2 tasks
@YuliiaKovalova
Copy link
Member

Close due to no demand.

@YuliiaKovalova YuliiaKovalova closed this as not planned Won't fix, can't repro, duplicate, stale May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triaged The issue was evaluated by the triage team, placed on correct area, next action defined.
Projects
None yet
Development

No branches or pull requests

3 participants