mirror of
https://github.com/harvard-edge/cs249r_book.git
synced 2026-03-11 17:49:25 -05:00
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.
This commit is contained in:
17
binder
17
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:'
|
||||
|
||||
Reference in New Issue
Block a user