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

[UX Improvement] azd template list - filtering #2732

Closed
1 task done
lechnerc77 opened this issue Sep 10, 2023 · 5 comments
Closed
1 task done

[UX Improvement] azd template list - filtering #2732

lechnerc77 opened this issue Sep 10, 2023 · 5 comments
Assignees
Labels
customer-reported identify a customer issue question
Milestone

Comments

@lechnerc77
Copy link
Contributor

Output from azd version

azd version 1.3.0 (commit 6605c57)

Describe the request

This is more a feature request/proposal to improve the usability. With release 1.3.0 the azd template list command fetches all templates from the awesome azd gallery. Depending on the project setup I just want to have a sepcific type of template available like only TypeScript templates that refer to Azure Container Apps. This information might be part of the title or text available in the output of azd template list but walking through it and finding the right templates might be cumbersome.

It would be a nice addition to the config option to add some tag filtering infor to the configuration of the source. Currently this is:

{
  "template": {
    "sources": {
      "awesome-azd": {
        "key": "awesome-azd",
        "location": "https://aka.ms/awesome-azd/templates.json",
        "name": "Awesome AZD",
        "type": "awesome-azd"
      }
    }
  }
}

which could be like

{
  "template": {
    "sources": {
      "awesome-azd": {
        "key": "awesome-azd",
        "location": "https://aka.ms/awesome-azd/templates.json",
        "name": "Awesome AZD",
        "type": "awesome-azd"
        "filterTags": ["typescript", "aca"] 
      }
    }
  }
}

The logic would probably be additive so filter by tag1 AND tag2 to avoid unncessary complexity. The intention would be to narrow down the list and not represent complex queries.

This could also benefit in the sceanrio of custom template sources. Thinking about a company that has such an internal list, but all projects in the org unit A want to use web app templates only, this would allow a preconfigured selection for the teams working in the irg unit.

Additional context

The information about the tags is available at https://azure.github.io/awesome-azd/templates.json

@jongio jongio changed the title [UX Improvement] azd tenplate list - filtering [UX Improvement] azd template list - filtering Sep 11, 2023
@savannahostrowski savannahostrowski added this to the Germanium milestone Sep 11, 2023
@vhvb1989
Copy link
Member

@lechnerc77 , you can type the filter when the template-list is displayed. The filter is applied right away.

@lechnerc77
Copy link
Contributor Author

@vhvb1989 yes I saw that his is possible, but as far as I saw this is restricted to the text that is visible and not to any metadata of the projects.
To give more context: As a company I am offering different templates as blueprints for my projects. In general, the guidance is that development takes place via Typescript or .NET. Team A of that company decided to go exclusively for TypeScript. Of course the teams are using azd but team A wants to configure that the list provided by azd init to the templates that are relevant for them (Typescript based ones) right from the start without any dev needing to manually filter.

@vhvb1989
Copy link
Member

@lechnerc77 , have you tried running

azd template source remove awesome-azd
azd template source add <url>

where <url> is some json file you have uploaded to some public CDN or FTP server. In this file, you can create your own list of templates and that's what azd would show.

Your json file should look like: https://github.com/Azure/azure-dev/blob/main/cli/azd/resources/templates.json

Also, as soon as you remove the awesome-azd, the default templates (todo-templates) are also removed.

@lechnerc77
Copy link
Contributor Author

@vhvb1989 thanks for pointing this out. I was aware of the option but did not try it out yet.

So the best practise to realize the intended setup is to create a dedicated configuration as pointed out in the JSON and to wire that up with the azd configuration. That makes sense. I think the procedure you described would be a great addition to the azddocumentation as best practice for this functionality. If you anyway have that on your list, we can close this issue.

@rajeshkamal5050
Copy link

rajeshkamal5050 commented Mar 22, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
customer-reported identify a customer issue question
Projects
None yet
Development

No branches or pull requests

5 participants