Skip to content

refactor(project): replace multi-select with individual Yes/No prompts#910

Merged
Soner (shyim) merged 3 commits intomainfrom
refactor/project-create-yesno-prompts
Mar 16, 2026
Merged

refactor(project): replace multi-select with individual Yes/No prompts#910
Soner (shyim) merged 3 commits intomainfrom
refactor/project-create-yesno-prompts

Conversation

@shyim
Copy link
Copy Markdown
Member

Summary

  • Replace the single multi-select for optional features (Docker, Git, AMQP, OpenSearch) with separate Yes/No select fields for each option
  • Add tui.NewYesNo() helper in internal/tui/form.go
  • Simplify flag mapping logic by removing the intermediate selectedOptions slice

Test plan

  • Run go build to verify compilation
  • Run go test ./... to verify no regressions
  • Manually test shopware-cli project create to confirm each Yes/No prompt works correctly

Replace the single multi-select for optional features (Docker, Git, AMQP,
OpenSearch) with separate Yes/No select fields for each option. This
improves UX clarity and simplifies the logic for mapping selections to
flags. Add a tui.NewYesNo() helper in internal/tui/form.go.
Copilot AI review requested due to automatic review settings March 16, 2026 08:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the interactive project create TUI flow by replacing the previous “optional features” multi-select with separate Yes/No prompts per feature, and adds a shared helper for consistent Yes/No selects.

Changes:

  • Add tui.NewYesNo() helper to build a standard Yes/No select field.
  • Replace the optional-features multi-select (Docker/Git/AMQP/OpenSearch) with individual Yes/No prompts.
  • Remove the intermediate selectedOptions slice and map prompt values directly into flags/vars.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
internal/tui/form.go Introduces a reusable Yes/No select helper used by interactive commands.
cmd/project/project_create.go Reworks the interactive form to use individual Yes/No prompts and simplifies mapping into useDocker/initGit/withAMQP/withElasticsearch.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread cmd/project/project_create.go Outdated
Comment thread internal/tui/form.go Outdated
Comment thread cmd/project/project_create.go Outdated
@shyim Soner (shyim) merged commit 8180e07 into main Mar 16, 2026
3 checks passed
@shyim Soner (shyim) deleted the refactor/project-create-yesno-prompts branch March 16, 2026 09:30
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