From a7e98013f7df9a356906f0acfefb62fb105a73ca Mon Sep 17 00:00:00 2001 From: Vijay Janapa Reddi Date: Fri, 1 Aug 2025 17:32:01 -0400 Subject: [PATCH] Improves user input prompts for clarity Updates prompts to use uppercase 'Y' as the default affirmative response, improving clarity for users. The changes ensures consistency and better UX across various prompts related to merging, release creation, AI release notes, changelog updates and git config. --- binder | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/binder b/binder index 194535329..c63971316 100755 --- a/binder +++ b/binder @@ -1098,7 +1098,7 @@ class BookBinder: if current_branch == "dev": console.print("[yellow]⚠️ You're on dev branch[/yellow]") console.print("[blue]Should I merge dev into main?[/blue]") - console.print("[bold]Merge dev to main? (y/n) [y]: [/bold]", end="") + console.print("[bold]Merge dev to main? (Y/n) [Y]: [/bold]", end="") choice = input().strip().lower() if not choice: choice = 'y' @@ -1182,7 +1182,7 @@ class BookBinder: console.print(f"[blue]Current version:[/blue] {current_version}") console.print(f"[blue]Suggested version:[/blue] {suggested_patch}") - console.print(f"[blue]Change type:[/blue] {change_type}") + console.print(f"[blue]Change type:[/blue] {change_type.upper()}") # Ask about version type console.print("\n[blue]📦 Version Strategy:[/blue]") @@ -1190,7 +1190,7 @@ class BookBinder: console.print(" • [dim]minor[/dim] - New features, chapters (1.0.0 → 1.1.0)") console.print(" • [dim]major[/dim] - Breaking changes (1.0.0 → 2.0.0)") - console.print(f"[bold]Version type (patch/minor/major) [{change_type}]: [/bold]", end="") + console.print(f"[bold]Version type (patch/minor/major) [{change_type.upper()}]: [/bold]", end="") version_choice = input().strip().lower() if not version_choice: version_choice = change_type @@ -1207,7 +1207,7 @@ class BookBinder: # Ask about release creation console.print("\n[blue]📦 Create GitHub release?[/blue]") - console.print("[bold]Create release? (y/n) [y]: [/bold]", end="") + console.print("[bold]Create release? (Y/n) [Y]: [/bold]", end="") release_choice = input().strip().lower() if not release_choice: release_choice = 'y' @@ -1222,7 +1222,8 @@ class BookBinder: ai_default_text = "y" if ai_default else "n" console.print("\n[blue]🤖 AI Release Notes (requires Ollama):[/blue]") - console.print(f"[bold]Use AI for release notes? (y/n) [{ai_default_text}]: [/bold]", end="") + ai_default_display = "Y" if ai_default else "n" + console.print(f"[bold]Use AI for release notes? (Y/n) [{ai_default_display}]: [/bold]", end="") ai_choice = input().strip().lower() if not ai_choice: ai_choice = ai_default_text @@ -1230,7 +1231,7 @@ class BookBinder: # Ask about changelog update console.print("\n[blue]📝 Update changelog?[/blue]") - console.print("[bold]Update changelog? (y/n) [y]: [/bold]", end="") + console.print("[bold]Update changelog? (Y/n) [Y]: [/bold]", end="") changelog_choice = input().strip().lower() if not changelog_choice: changelog_choice = 'y' @@ -2113,7 +2114,7 @@ Format as markdown with clear sections.""" console.print(f" Email: {current_email}") console.print("\n[blue]Would you like to update your Git configuration?[/blue]") - console.print("[bold]Update Git config? (y/n) [n]: [/bold]", end="") + console.print("[bold]Update Git config? (y/N) [N]: [/bold]", end="") update_choice = input().strip().lower() if not update_choice: update_choice = 'n' @@ -2161,7 +2162,7 @@ Format as markdown with clear sections.""" }, { 'key': 'binder.auto-open', - 'prompt': 'Auto-open browser after builds? (y/n)', + 'prompt': 'Auto-open browser after builds? (Y/n)', 'default': 'y', 'options': ['y', 'n'], 'description': '🌐 Browser Preferences:'