feat(ui): add tab navigation system for desktop and mobile

Desktop (2 tabs):
- Status tab: User Stats + Info Box + Character Thoughts
- Inventory tab: Inventory system (dedicated space)

Mobile (3 tabs):
- Stats tab: User Stats only
- Info tab: Info Box + Character Thoughts
- Inventory tab: Inventory only

Features:
- Created desktop.js module for desktop tab management
- Updated mobile.js to use 3-tab structure (more breathing room on small screens)
- Added CSS styling for desktop tabs (hover states, active indicators)
- Implemented viewport transition handlers (desktop ↔ mobile)
- Tabs replace dividers (cleaner visual separation)
- Character thoughts can now expand to fill vertical space

This resolves the cramped 4-section panel issue by organizing content into logical tabs on both desktop and mobile.
This commit is contained in:
Lucas 'Paperboy' Rose-Winters
2025-10-17 16:18:47 +11:00
parent abd3ade30e
commit f560bb543b
4 changed files with 260 additions and 24 deletions
+9
View File
@@ -100,6 +100,10 @@ import {
setupMobileKeyboardHandling,
setupContentEditableScrolling
} from './src/systems/ui/mobile.js';
import {
setupDesktopTabs,
removeDesktopTabs
} from './src/systems/ui/desktop.js';
// Feature modules
import { setupPlotButtons, sendPlotProgression } from './src/systems/features/plotProgression.js';
@@ -368,6 +372,11 @@ async function initUI() {
// Setup mobile toggle button
setupMobileToggle();
// Setup desktop tabs (only on desktop viewport)
if (window.innerWidth > 1000) {
setupDesktopTabs();
}
// Setup collapse/expand toggle button
setupCollapseToggle();