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

App create: Ask for framework before fetching templates #4897

Conversation

xdoardo
Copy link
Contributor

@xdoardo xdoardo commented Jun 25, 2024

(attaching images as this is pretty much a design patch)

In order to speed up the CLI reducing the size of the data requested to the backend and to provide a better UX, we wanted to introduce a new mechanism to present available templates to users. Before, we presented a list of all the available templates to the user:

Screenshot 2024-06-25 at 16 40 11

With this patch, the user first selects the framework they want and, after that, the actual template from the matching ones.

Screenshot 2024-06-25 at 16 40 51 Screenshot 2024-06-25 at 16 41 14

@xdoardo xdoardo requested a review from syrusakbary as a code owner June 25, 2024 14:43
@xdoardo xdoardo requested a review from ayys June 25, 2024 14:49
@syrusakbary
Copy link
Member

I'm not that sure of doing it via framework instead of language as we indicated on the original issue (there will be many frameworks that we support, so language seems like a better initial filter). Any insights on why this was done this way?

@xdoardo
Copy link
Contributor Author

xdoardo commented Jun 25, 2024

It works both ways, as maybe a language supports many framework for heterogeneous needs. But, in any case, the code is structured in a way such that if we want to filter by language first, the change is trivial. The only missing bit is from the backend (cc: @ayys), that should support calls to retrieve all languages and get templates filtered by language.

@theduke
Copy link
Contributor

theduke commented Jun 25, 2024

I dont quite get why we select by framework first, because the framework list could just grow huge again eventually.

Making the first step selecting the language seems much more sensible?

@xdoardo
Copy link
Contributor Author

xdoardo commented Jun 25, 2024

Alright, agreed on filtering by language. Waiting for the backend API to implement it that way.

@ayys
Copy link
Member

ayys commented Jun 26, 2024

nit: should there also be a option for when I want to view templates from another category/language/framework?

@xdoardo
Copy link
Contributor Author

xdoardo commented Jun 26, 2024

Latest commit changes it to display languages first.

Copy link
Member

@ayys ayys left a comment

Choose a reason for hiding this comment

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

discussed with @xdoardo and lgtm 🚀

@xdoardo xdoardo merged commit 383ac6c into main Jun 28, 2024
62 checks passed
@xdoardo xdoardo deleted the run-322-templates-ask-for-language-first-php-static-server-python-js branch June 28, 2024 08:43
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.

4 participants