Repository navigation
Investigate upgrading to the latest charmbracelet/huh release (v0.7.0) #10852
Copy link
Copy link
Closed
Labels
accessibilitycoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsdependenciesPull requests that update a dependency filePull requests that update a dependency file
Description
Activity
- addedcoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsdependenciesPull requests that update a dependency filePull requests that update a dependency file
on Apr 23, 2025 With the changes coming in from
huh, there are a few places where we commented out the echo mode code for future use - we can uncomment those lines and test out the behavior:cli/internal/prompter/prompter.go
Lines 138 to 147 in c0f993a
func (p *accessiblePrompter) Password(prompt string) (string, error) { var result string // EchoMode(huh.EchoModePassword) doesn't have any effect in accessible mode. form := p.newForm( huh.NewGroup( huh.NewInput(). Title(prompt). Value(&result), ), ) cli/internal/prompter/prompter.go
Lines 172 to 193 in c0f993a
func (p *accessiblePrompter) AuthToken() (string, error) { var result string form := p.newForm( huh.NewGroup( huh.NewInput(). Title("Paste your authentication token:"). // Note: if this validation fails, the prompt loops. Validate(func(input string) error { if input == "" { return fmt.Errorf("token is required") } return nil }). Value(&result), // This doesn't have any effect in accessible mode. // EchoMode(huh.EchoModePassword), ), ) err := form.Run() return result, err } Changes in GitHub CLI user experience
Note
WIP
Inputprompts leave cursor on same line as prompt-
huhv0.7.0$ GH_ACCESSIBLE_PROMPTER=1 GH_SPINNER_DISABLED=1 bin/gh issue create Creating issue in cli/cli Title (required) () This is just a title Choose a template 1. 🐛 Bug report 2. 📣 Feedback 3. 🎨 Submit a design proposal 4. ⭐ Submit a request 5. Open a blank issue Input a number between 1 and 5: -
huhv0.6.0$ GH_ACCESSIBLE_PROMPTER=1 GH_SPINNER_DISABLED=1 gh issue create Creating issue in cli/cli Title (required) () Input: This is just a title Input: This is just a title Choose a template 1. 🐛 Bug report 2. 📣 Feedback 3. 🎨 Submit a design proposal 4. ⭐ Submit a request 5. Open a blank issue Choose:
SelectandMultiSelectprompts contain actionable instructionsIn
v2.71.0, the accessible select and multiselect prompt simply statedChoosewhereas the newv0.7.0release ofhuhhas provided a more actionable prompt. Additionally, the0option to confirm selection now appears within the list of options rather than being a note on the prompt.-
huhv0.7.0$ GH_ACCESSIBLE_PROMPTER=1 GH_SPINNER_DISABLED=1 bin/gh issue create Creating issue in cli/cli Title (required) () This is just a title Choose a template 1. 🐛 Bug report 2. 📣 Feedback 3. 🎨 Submit a design proposal 4. ⭐ Submit a request 5. Open a blank issue Input a number between 1 and 5: 5 Body 1. Launch vim 2. Skip Input a number between 1 and 2: 2 What's next? 1. Submit 2. Continue in browser 3. Add metadata 4. Cancel Input a number between 1 and 4: 3 What would you like to add? Select up to 4 options. 1. Assignees 2. Labels 3. Projects 4. Milestone 0. Confirm selection Input a number between 0 and 4:
-
huhv0.6.0$ GH_ACCESSIBLE_PROMPTER=1 GH_SPINNER_DISABLED=1 gh issue create Creating issue in cli/cli Title (required) () Input: This is just a title Input: This is just a title Choose a template 1. 🐛 Bug report 2. 📣 Feedback 3. 🎨 Submit a design proposal 4. ⭐ Submit a request 5. Open a blank issue Choose: 5 Chose: Open a blank issue Body 1. Launch vim 2. Skip Choose: 2 Chose: Skip What's next? 1. Submit 2. Continue in browser 3. Add metadata 4. Cancel Choose: 3 Chose: Add metadata What would you like to add? 1. Assignees 2. Labels 3. Projects 4. Milestone Select up to 4 options. 0 to continue. Select:
-
Metadata
Metadata
Assignees
Labels
accessibilitycoreThis issue is not accepting PRs from outside contributorsThis issue is not accepting PRs from outside contributorsdependenciesPull requests that update a dependency filePull requests that update a dependency file
In order to upgrade
ghdependency oncharmbracelet/huhto the latest version (v0.7.0, as of now), we have to investigate the changes made to the module and make sure the accessibility support inghis not impacted.Expected Output
cli/cliorcharmbracelet/huh, if required.huhto 0.7.0 if feasible