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

[GTM-836]Rework Init workflow #4377

Merged
merged 14 commits into from
Nov 22, 2024
Merged

[GTM-836]Rework Init workflow #4377

merged 14 commits into from
Nov 22, 2024

Conversation

ElijahAhianyo
Copy link
Collaborator

@ElijahAhianyo ElijahAhianyo commented Nov 13, 2024

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): 
  • Blank template will initialize the app using the default template.
  • The ai option redirects the user to flexgen where the app is initialized based on the generation. This option is the same as running reflex init --ai
  • The third option now requests for a template name which you can find when you navigate to https://reflex.dev/tempates. The template name is on the template card which you can copy. When an invalid template is used, The user is prompted to enter a valid one
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 

@ElijahAhianyo ElijahAhianyo changed the title [WIP]Rework Init workflow [GTM-836]Rework Init workflow Nov 13, 2024
Copy link

linear bot commented Nov 13, 2024

@ElijahAhianyo ElijahAhianyo marked this pull request as ready for review November 13, 2024 17:59
Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

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

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.

@ElijahAhianyo
Copy link
Collaborator Author

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

picklelo
picklelo previously approved these changes Nov 19, 2024
Copy link
Contributor

@picklelo picklelo left a comment

Choose a reason for hiding this comment

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

works well for me (we should merge the reflex-web PR along with this)

Copy link
Collaborator

@masenf masenf left a comment

Choose a reason for hiding this comment

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

it would be cool if the success message for ai runs shows the generation hash, right now it says

(VENV-dev311) masen@asmbp21 repro-init-flow % reflex init
──────────────────────────────────────────────────────── Initializing repro_init_flow ────────────────────────────────────────────────────────
[16:11:47] Initializing the web directory.                                                                                      console.py:104

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): 1
Info: Complete the workflow in the browser to continue.
[16:15:23] Initializing the app directory.                                                                                      console.py:104
Success: Initialized repro_init_flow using the blank template

@masenf masenf merged commit 5702a18 into main Nov 22, 2024
32 checks passed
@masenf masenf deleted the elijah/init-rework branch November 22, 2024 00:58
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.

3 participants