feat: add placeholder to app name prompt in create command#370
feat: add placeholder to app name prompt in create command#370
Conversation
Show the randomly generated app name as placeholder text in the input field instead of printing a separate hint line. This provides a cleaner UX where users see the default name inline and can press Enter to accept.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #370 +/- ##
==========================================
- Coverage 65.27% 65.24% -0.03%
==========================================
Files 216 216
Lines 17991 17994 +3
==========================================
- Hits 11743 11741 -2
- Misses 5159 5162 +3
- Partials 1089 1091 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
mwbrooks
left a comment
There was a problem hiding this comment.
Comments for the kinda reviewers!
| type InputPromptConfig struct { | ||
| Required bool // Whether the input must be non-empty | ||
| Required bool // Whether the input must be non-empty | ||
| Placeholder string // Placeholder text shown when input is empty |
There was a problem hiding this comment.
note: Using Survey's built-in placeholder option
| func buildInputForm(message string, cfg InputPromptConfig, input *string) *huh.Form { | ||
| field := huh.NewInput(). | ||
| Title(message). | ||
| Placeholder(cfg.Placeholder). |
There was a problem hiding this comment.
note: Using Charm's built-in placeholder option. I chose the Placeholder name to align with huh rather than survey
There was a problem hiding this comment.
🍀 praise: Nice call! This ought bring good patterns onward!
| func buildInputForm(message string, cfg InputPromptConfig, input *string) *huh.Form { | ||
| field := huh.NewInput(). | ||
| Title(message). | ||
| Placeholder(cfg.Placeholder). |
There was a problem hiding this comment.
🍀 praise: Nice call! This ought bring good patterns onward!
|
Woo woo, appreciate the rolling reviews @zimeg! 🤾🏻 This is a nice little UX improvement to land. I'm excited for it! |
Changelog
Summary
This pull request updated the
createcommand's app name prompt to show the randomly generated app name as placeholder text.Screenshots
Survey:
Charm:
Preview
Survey:
2026-03-06-create-placeholder-survey.mov
Charm:
2026-03-06-create-placeholder-charm.mov
Requirements