reflex-dev / reflex

🕸️ Web apps in pure Python 🐍
https://reflex.dev
Apache License 2.0
20.42k stars 1.18k forks source link

[GTM-836]Rework Init workflow #4377

Closed ElijahAhianyo closed 3 days ago

ElijahAhianyo commented 1 week ago

Changing the reflex init workflow to below:

reflex init now gives 3 options:

Get started with a template:
(0) blank (https://blank-template.reflex.run) - A blank Reflex app.
(1) ai - Generate a template using AI [Experimental]
(2) choose templates - Choose an existing template.
$ Which template would you like to use? (0): 
Visit https://reflex.dev/templates for the complete list of templates.
$ Enter a valid template name: invalid-template-name
Invalid template name. Please try again.
Visit https://reflex.dev/templates for the complete list of templates.
$ Enter a valid template name: 

You should also be able to pass in the template's name directly using the template flag

$ reflex init --template sales 
linear[bot] commented 1 week ago

GTM-836 Init Command Rework

ElijahAhianyo commented 1 week ago

Flow is working pretty well for me.

I'm wondering if we shouldn't show the urls for flexgen / templates and instead if they press (1) we do the ai workflow (this is already done). and if they press (2) then we open the templates page for them.

redirecting users to the templates page was my initial intuition, however I felt redirecting users to the templates immediately wont be so obvious what they need to do on the page. It wont be an issue if they've done it multiple times, but for the first time, it could introduce some friction as opposed to explicitly stating they need to go on the page where they can get the names. Aside that concern, it shouldn't be an issue to redirect them