Skip to content

feat: Add auto create step in UI#10

Merged
sunnyguduru merged 16 commits intomainfrom
sunny/sc-236003/create-stubbed-out-screen-to-auto-create
Mar 13, 2024
Merged

feat: Add auto create step in UI#10
sunnyguduru merged 16 commits intomainfrom
sunny/sc-236003/create-stubbed-out-screen-to-auto-create

Conversation

@sunnyguduru
Copy link
Copy Markdown

@sunnyguduru sunnyguduru commented Mar 12, 2024

Auto Create is now the initial step.
The steps are the following:

  • Auto Create (can skip to display selected values)
  • Project Select
  • Environment Select
  • Flag Select
  • Display selected values

Screenshot:
CleanShot 2024-03-13 at 15 01 54

Video:
https://share.cleanshot.com/bdhRcswf

@shortcut-integration
Copy link
Copy Markdown

Comment thread internal/setup/flags.go
Comment thread internal/setup/wizard.go
Comment thread internal/setup/wizard.go Outdated
@sunnyguduru sunnyguduru changed the title Bubble Tea: Add Fork Step feat: Add fork step in UI Mar 12, 2024
Comment thread internal/setup/fork.go Outdated
Comment thread internal/setup/fork.go Outdated
Comment thread internal/setup/fork.go Outdated
Comment thread internal/setup/fork.go Outdated
Comment thread internal/setup/wizard.go Outdated
Comment thread internal/setup/wizard.go Outdated
k3llymariee and others added 14 commits March 13, 2024 14:23
* ci: add publish action to release-please workflow

* feat: add required go-versions

* remove unnecessary setup steps, go-versions
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix: uncomment conditional for release-ldcli
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix: Update release-please.yml to dry-run: false
This reverts commit ea3c089.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
`ldcli projects list` returns list of projects in JSON
@sunnyguduru sunnyguduru changed the title feat: Add fork step in UI feat: Add auto create step in UI Mar 13, 2024
@sunnyguduru sunnyguduru requested a review from dbolson March 13, 2024 22:02
Comment thread internal/setup/wizard.go
}

return fmt.Sprintf("\nstep %d of %d\n"+m.steps[m.currStep-1].View(), m.currStep, len(m.steps))
return fmt.Sprintf("\nstep %d of %d\n"+m.steps[m.currStep].View(), m.currStep+1, len(m.steps))
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Got a little confused here. But basically we're rendering the current step's view. While showing what step we're on in the header out of the total number of steps.
Was able to use currStep instead of currStep-1 since I got rid of the initial step.

Comment thread internal/setup/wizard.go
m.currStep += 1
case projectsStep:
projModel, _ := m.steps[m.currStep-1].Update(msg)
projModel, _ := m.steps[projectsStep].Update(msg)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I think it makes sense to just directly use projectsStep here. Since the case is already ensuring we're on projectsStep. Same for the other cases

Comment thread internal/setup/autoCreate.go Outdated
func NewAutoCreate() autoCreateModel {
choices := []choice{
{
Key: "yes",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We probably only need the name here and the check later on could be for "Yes" instead of "yes".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Works for me

Comment thread internal/setup/wizard.go Outdated
@@ -0,0 +1,116 @@
package setup
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you rename the file auto_create.go to be more idiomatic?

@sunnyguduru sunnyguduru merged commit fb2fb5c into main Mar 13, 2024
@sunnyguduru sunnyguduru deleted the sunny/sc-236003/create-stubbed-out-screen-to-auto-create branch March 13, 2024 23:14
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