feat: Complete tablet UI overhaul with popup menu system and help bubble

Major Changes:
- 🪟 Popup Menu System: Converted slide-down navigation to draggable, minimizable popup window
- ❓ Help Bubble: Added contextual help system for admin dashboard (accessible via ? bubble)
- 🎨 Universal Theme Engine: All elements now properly match selected theme across all panels
- 📱 Enhanced Tablet Support: Comprehensive touch gestures, handwriting recognition, and Apple Pencil optimization
- 🖊️ Unified Write Mode: Combined handwriting and keyboard input with large canvas interface

Technical Implementation:
- Draggable popup with minimize/restore functionality and boundary constraints
- Dynamic theme switching using CSS variables throughout all components
- Help system with modal overlay and keyboard shortcuts (ESC to close)
- Responsive design optimizations for mobile, tablet, and desktop
- Comprehensive CSS overrides to eliminate hardcoded colors
- JavaScript fixes for canvas stroke colors and input styling

UI/UX Improvements:
- Clean admin dashboard without instruction clutter
- Professional popup interface with smooth animations
- Better contrast and readability across all themes (default, playground, chalkboard, galaxy, nature)
- Improved accessibility with proper focus management
- Enhanced mobile responsiveness with touch-optimized controls

Files Modified:
- Menu system: tablet-menu.js, tablet-menu.css
- Theme engine: styles.css, themes integration
- Admin interface: index.html, ui.js
- Input systems: game.js, unified-write.js, handwriting.js
- Authentication: auth.js with tablet menu cleanup
This commit is contained in:
nmemmert committed 2025-10-02 14:26:04 -04:00
1 parent 0b9d46fed1
commit 8d37038177
24 files changed
+9506 -126

No files matched your search

+184 -16
View File
@@ -35,6 +35,9 @@ body {
line-height: 1.6;
min-height: 100vh;
padding: 2rem 1rem;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
}
/* Container and layout */
@@ -46,7 +49,7 @@ body {
/* Typography */
h1 {
font-size: 3rem;
font-size: clamp(2.5rem, 6vw, 4rem);
font-weight: 700;
text-align: center;
margin-bottom: 2rem;
@@ -74,27 +77,36 @@ h3 {
input, textarea, select {
width: 100%;
max-width: 320px;
padding: 0.75rem 1rem;
margin: 0.5rem;
padding: 1rem 1.25rem;
margin: 0.75rem;
border: 2px solid var(--border);
border-radius: var(--radius);
font-size: 1rem;
font-size: 1.125rem;
font-family: inherit;
background: var(--bg-primary);
color: var(--text-primary);
transition: var(--transition);
min-height: 48px; /* Tablet-friendly touch target */
touch-action: manipulation; /* Prevent zoom on focus */
}
/* Special styling for game input */
#userInput {
font-size: 1.2rem;
max-width: 400px;
font-size: 1.5rem;
max-width: 500px;
text-align: center;
background-color: white !important;
color: var(--text-primary) !important;
font-weight: 500;
letter-spacing: 0.5px;
caret-color: var(--primary);
min-height: 60px;
padding: 1.25rem !important;
border: 3px solid var(--primary) !important;
border-radius: 12px !important;
margin: 1.5rem auto !important;
display: block;
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
}
input:focus, textarea:focus, select:focus {
@@ -113,14 +125,15 @@ textarea {
button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
padding: 0.75rem 1.5rem;
margin: 0.25rem;
padding: 1rem 2rem;
margin: 0.5rem;
background: var(--primary);
color: #ffffff !important;
border: none;
border-radius: var(--radius);
font-size: 1rem;
border-radius: 12px;
font-size: 1.125rem;
font-weight: 600;
font-family: inherit;
cursor: pointer;
@@ -128,7 +141,10 @@ button {
box-shadow: var(--shadow);
text-decoration: none;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
min-height: 44px;
min-height: 50px;
min-width: 120px;
touch-action: manipulation;
user-select: none;
}
button:hover {
@@ -460,16 +476,23 @@ button:disabled {
/* Game elements */
#wordBox, .word-box, #typingPrompt {
font-size: 3rem;
font-size: clamp(2.5rem, 8vw, 4rem);
font-weight: 700;
text-align: center;
padding: 3rem 2rem;
margin: 2rem 0;
margin: 2rem auto;
max-width: 700px;
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--secondary) 100%);
border: 2px solid var(--border);
border-radius: var(--radius);
border: 3px solid var(--primary);
border-radius: 20px;
color: var(--primary);
box-shadow: var(--shadow-lg);
min-height: 120px;
display: flex;
align-items: center;
justify-content: center;
letter-spacing: 2px;
word-break: break-word;
}
/* Word feedback styles */
@@ -578,11 +601,47 @@ button:disabled {
/* Student controls specific styling */
.student-controls button {
min-height: 60px !important;
font-size: 1.1rem !important;
font-size: 1.25rem !important;
font-weight: 600 !important;
text-shadow: none !important;
border: 2px solid rgba(255, 255, 255, 0.2) !important;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
padding: 1.5rem 2rem !important;
}
/* Activity options for tablet */
.activity-option {
background: var(--bg-primary) !important;
border-radius: 16px !important;
padding: 2rem !important;
text-align: center !important;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
transition: all 0.2s ease !important;
cursor: pointer !important;
border: 2px solid var(--border) !important;
min-height: 200px !important;
display: flex !important;
flex-direction: column !important;
justify-content: space-between !important;
}
.activity-option:hover, .activity-option:active {
transform: translateY(-4px) !important;
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
border-color: var(--primary) !important;
}
.activity-option h3 {
font-size: 1.5rem !important;
margin: 0.5rem 0 !important;
color: var(--text-primary) !important;
}
.activity-option p {
font-size: 1rem !important;
color: var(--text-secondary) !important;
margin-bottom: 1rem !important;
line-height: 1.4 !important;
}
.student-controls .btn-success {
@@ -688,3 +747,112 @@ button[id*="debug"],
[data-debug="true"] {
display: none !important;
}
/* Tablet and handwriting enhancements */
/* Input mode toggle styles */
.input-mode-toggle {
display: flex !important;
background: var(--secondary) !important;
border-radius: 12px !important;
padding: 0.5rem !important;
margin: 1.5rem auto !important;
max-width: 350px !important;
position: relative !important;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.1) !important;
}
.input-mode-toggle button {
flex: 1 !important;
padding: 1rem 1.5rem !important;
border: none !important;
background: transparent !important;
color: var(--text-secondary) !important;
font-weight: 600 !important;
border-radius: 8px !important;
cursor: pointer !important;
transition: all 0.2s ease !important;
font-size: 1.125rem !important;
min-height: 50px !important;
margin: 0 !important;
box-shadow: none !important;
text-shadow: none !important;
}
.input-mode-toggle button.active {
background: var(--bg-primary) !important;
color: var(--primary) !important;
box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
transform: none !important;
}
.input-mode-toggle button:not(.active):hover {
color: var(--text-primary) !important;
background: rgba(255,255,255,0.5) !important;
}
/* Handwriting container styles */
.handwriting-container {
background: var(--bg-primary) !important;
border-radius: 16px !important;
padding: 2rem !important;
margin: 2rem auto !important;
box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
border: 2px solid var(--border) !important;
max-width: 700px !important;
text-align: center !important;
}
.handwriting-container h4 {
color: var(--text-primary) !important;
font-size: 1.25rem !important;
margin-bottom: 1.5rem !important;
}
#handwritingCanvas {
border: 3px solid var(--primary) !important;
border-radius: 12px !important;
background: white !important;
cursor: crosshair !important;
display: block !important;
margin: 1rem auto !important;
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1) !important;
touch-action: none !important;
max-width: 100% !important;
width: 100% !important;
max-width: 600px !important;
height: 250px !important;
}
/* Canvas controls */
.canvas-controls {
display: flex !important;
justify-content: center !important;
gap: 1rem !important;
margin: 1rem 0 !important;
flex-wrap: wrap !important;
}
.canvas-controls button {
padding: 1rem 2rem !important;
font-size: 1.125rem !important;
min-height: 50px !important;
min-width: 120px !important;
border-radius: 12px !important;
font-weight: 600 !important;
margin: 0.25rem !important;
}
.clear-btn {
background: var(--error) !important;
color: white !important;
}
.recognize-btn {
background: var(--success) !important;
color: white !important;
}
.undo-btn {
background: var(--warning) !important;
color: white !important;
}