From 6f2f6d444cc5043dc530ba9454e632d414b9c343 Mon Sep 17 00:00:00 2001 From: Thomas Hallock Date: Mon, 10 Nov 2025 16:15:40 -0600 Subject: [PATCH] fix: add mode descriptions and remove double borders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address two issues with the tab-style mode selector: 1. Add back helpful description text - Each mode now shows its description below the tabs - Description updates based on active tab - Preserves the helpful context from the old button layout 2. Remove double borders - Remove wrapper div that added extra background/padding - Let mode-specific controls use their own styling - Eliminates visual layering conflicts - Creates cleaner, more native tab-to-content flow Mode descriptions: - 🎯 Smart: "Research-backed progressive difficulty with adaptive scaffolding per problem" - 🎛️ Manual: "Full control over display options with uniform scaffolding across all problems" - 🎓 Mastery: "Skill-based progression with automatic review mixing for pedagogical practice" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../addition/components/ConfigPanel.tsx | 39 ++--- .../addition/components/ModeSelector.tsx | 148 ++++++++++-------- 2 files changed, 99 insertions(+), 88 deletions(-) diff --git a/apps/web/src/app/create/worksheets/addition/components/ConfigPanel.tsx b/apps/web/src/app/create/worksheets/addition/components/ConfigPanel.tsx index 79061a92..2c57e74d 100644 --- a/apps/web/src/app/create/worksheets/addition/components/ConfigPanel.tsx +++ b/apps/web/src/app/create/worksheets/addition/components/ConfigPanel.tsx @@ -105,39 +105,28 @@ export function ConfigPanel({ formState, onChange, isDark = false }: ConfigPanel isDark={isDark} /> - {/* Mode Selector Tabs */} + {/* Mode Selector Tabs with description */} - {/* Mode-specific controls as tab content */} -
- {/* Smart Mode Controls */} - {(!formState.mode || formState.mode === 'smart') && ( - - )} + {/* Mode-specific controls - no wrapper, let controls style themselves */} + {/* Smart Mode Controls */} + {(!formState.mode || formState.mode === 'smart') && ( + + )} - {/* Manual Mode Controls */} - {formState.mode === 'manual' && ( - - )} + {/* Manual Mode Controls */} + {formState.mode === 'manual' && ( + + )} - {/* Mastery Mode Controls */} - {formState.mode === 'mastery' && ( - - )} -
+ {/* Mastery Mode Controls */} + {formState.mode === 'mastery' && ( + + )} ) } diff --git a/apps/web/src/app/create/worksheets/addition/components/ModeSelector.tsx b/apps/web/src/app/create/worksheets/addition/components/ModeSelector.tsx index 94dfe7c4..14e5ea3f 100644 --- a/apps/web/src/app/create/worksheets/addition/components/ModeSelector.tsx +++ b/apps/web/src/app/create/worksheets/addition/components/ModeSelector.tsx @@ -18,93 +18,115 @@ export function ModeSelector({ currentMode, onChange, isDark = false }: ModeSele id: 'smart' as const, emoji: '🎯', label: 'Smart Difficulty', + description: 'Research-backed progressive difficulty with adaptive scaffolding per problem', }, { id: 'manual' as const, emoji: '🎛️', label: 'Manual Control', + description: 'Full control over display options with uniform scaffolding across all problems', }, { id: 'mastery' as const, emoji: '🎓', label: 'Mastery Progression', + description: 'Skill-based progression with automatic review mixing for pedagogical practice', }, ] + const currentModeData = modes.find((m) => m.id === currentMode) + return ( -
- {modes.map((mode) => { - const isActive = currentMode === mode.id - return ( - - ) - })} + ? 'gray.400' + : 'gray.600', + cursor: 'pointer', + transition: 'all 0.2s', + fontSize: '0.95rem', + fontWeight: isActive ? '700' : '500', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + gap: '0.5rem', + borderTopLeftRadius: '8px', + borderTopRightRadius: '8px', + _hover: { + backgroundColor: isActive + ? isDark + ? 'gray.700' + : 'white' + : isDark + ? 'gray.700' + : 'gray.100', + borderBottomColor: isActive ? 'blue.500' : isDark ? 'gray.500' : 'gray.400', + color: isActive + ? isDark + ? 'blue.300' + : 'blue.600' + : isDark + ? 'gray.300' + : 'gray.700', + }, + })} + > + {mode.emoji} + {mode.label} + + ) + })} +
+ + {/* Description of active mode */} + {currentModeData && ( +

+ {currentModeData.description} +

+ )} ) }