🎨 Enhance Rich interface with professional panels and step headers

This commit is contained in:
Vijay Janapa Reddi
2025-08-01 14:34:43 -04:00
parent 1c314666cd
commit d6f68a4bbe

68
binder
View File

@@ -969,10 +969,22 @@ class BookBinder:
def publish(self):
"""Publish the book (build + deploy) - Step by step process"""
console.print("\n" + "="*60)
console.print("[bold red]🚀 PUBLISHING WORKFLOW[/bold red]")
console.print("[red]This will publish the book to production![/red]")
console.print("="*60 + "\n")
# Create prominent warning banner
warning_panel = Panel(
"[bold red]🚀 PUBLISHING WORKFLOW[/bold red]\n\n"
"[red]This will publish the book to production![/red]\n\n"
"[yellow]⚠️ This action will:[/yellow]\n"
" • Merge dev → main branch\n"
" • Build HTML and PDF versions\n"
" • Create a GitHub release\n"
" • Deploy to production\n"
" • Update the live website",
title="[bold red]⚠️ PRODUCTION DEPLOYMENT[/bold red]",
border_style="red",
padding=(1, 2)
)
console.print(warning_panel)
console.print()
console.print("[bold blue]🚀 MLSysBook Publishing Wizard[/bold blue]")
console.print("[dim]I'll guide you through publishing step by step[/dim]\n")
@@ -1703,29 +1715,65 @@ Format as markdown with clear sections."""
console.print("[dim]I'll help you configure everything you need[/dim]\n")
# Step 1: Check current environment
console.print("[blue]📋 Step 1: Environment Check[/blue]")
step1_panel = Panel(
"[bold blue]🔍 Checking your environment...[/bold blue]",
title="📋 Step 1: Environment Check",
border_style="blue",
padding=(0, 1)
)
console.print(step1_panel)
self._check_environment()
# Step 2: System dependencies
console.print("\n[blue]📋 Step 2: System Dependencies[/blue]")
step2_panel = Panel(
"[bold blue]🔧 Checking system dependencies...[/bold blue]",
title="📋 Step 2: System Dependencies",
border_style="blue",
padding=(0, 1)
)
console.print(step2_panel)
if not self._check_system_dependencies():
console.print("[red]❌ System dependency check failed[/red]")
return
# Step 3: Install/configure tools
console.print("\n[blue]📋 Step 3: Tool Installation[/blue]")
step3_panel = Panel(
"[bold blue]📦 Installing tools and packages...[/bold blue]",
title="📋 Step 3: Tool Installation",
border_style="blue",
padding=(0, 1)
)
console.print(step3_panel)
self._install_tools()
# Step 4: Configure Git
console.print("\n[blue]📋 Step 4: Git Configuration[/blue]")
step4_panel = Panel(
"[bold blue]🔧 Configuring Git...[/bold blue]",
title="📋 Step 4: Git Configuration",
border_style="blue",
padding=(0, 1)
)
console.print(step4_panel)
self._configure_git()
# Step 5: Environment preferences
console.print("\n[blue]📋 Step 5: Environment Preferences[/blue]")
step5_panel = Panel(
"[bold blue]⚙️ Configuring preferences...[/bold blue]",
title="📋 Step 5: Environment Preferences",
border_style="blue",
padding=(0, 1)
)
console.print(step5_panel)
self._configure_preferences()
# Step 6: Test setup
console.print("\n[blue]📋 Step 6: Test Setup[/blue]")
step6_panel = Panel(
"[bold blue]🧪 Testing setup...[/bold blue]",
title="📋 Step 6: Test Setup",
border_style="blue",
padding=(0, 1)
)
console.print(step6_panel)
self._test_setup()
console.print("\n[green]✅ Environment setup completed![/green]")