From 68b97e946bb5f29377cc671f2001300a576acd0f Mon Sep 17 00:00:00 2001 From: Vincent <13386908+vinnyNC@users.noreply.github.com> Date: Mon, 29 Sep 2025 21:02:33 -0400 Subject: [PATCH] Complete 3.3.1: Mobile Layout Optimization - Implemented mobile-first redesign with touch-friendly navigation and responsive chat overlay behavior. --- UI_UPDATE.MD | 10 +++++--- assets/js/ui-controls.js | 23 ++++++++++++----- static/css/layout.css | 55 ++++++++++++++++++++++++++++++++++++---- 3 files changed, 73 insertions(+), 15 deletions(-) diff --git a/UI_UPDATE.MD b/UI_UPDATE.MD index 070cc94..42df371 100644 --- a/UI_UPDATE.MD +++ b/UI_UPDATE.MD @@ -338,10 +338,12 @@ Always come back and update UI_UPDATE.MD once complete with task and task item. ### Sub-task 3.3: Mobile-First Redesign -#### 3.3.1: Mobile Layout Optimization -- [ ] Redesign mobile interface prioritizing content -- [ ] Implement touch-friendly navigation -- [ ] Create mobile-specific component layouts +#### 3.3.1: Mobile Layout Optimization - COMPLETED 9/29/2025 +- [x] Redesign mobile interface prioritizing content +- [x] Implement touch-friendly navigation +- [x] Create mobile-specific component layouts + +**Notes:** Implemented comprehensive mobile-first responsive design. Updated layout.css to use BEM class names, added vertical stacking layout for mobile (flex-direction: column), chat slides up from bottom as modal overlay on mobile instead of collapsing to the side. Enhanced touch-friendly navigation with 44px minimum touch targets already in place. Updated ui-controls.js to handle mobile chat overlay behavior. Desktop remains side-by-side layout while mobile prioritizes video content with chat on-demand. #### 3.3.2: Touch Interaction Optimization - [ ] Ensure 44px minimum touch targets diff --git a/assets/js/ui-controls.js b/assets/js/ui-controls.js index 9161393..6280ea1 100644 --- a/assets/js/ui-controls.js +++ b/assets/js/ui-controls.js @@ -51,16 +51,27 @@ if (!chatSection || !videoSection || !toggleBtn) return; + const isMobile = window.innerWidth <= AppConfig.ui.mobileBreakpoint; AppState.chatCollapsed = !AppState.chatCollapsed; if (AppState.chatCollapsed) { - chatSection.classList.add('collapsed'); - videoSection.classList.add('expanded'); - toggleBtn.textContent = 'Show Chat'; + if (isMobile) { + chatSection.classList.remove('mobile-visible'); + toggleBtn.textContent = 'Show Chat'; + } else { + chatSection.classList.add('collapsed'); + videoSection.classList.add('expanded'); + toggleBtn.textContent = 'Show Chat'; + } } else { - chatSection.classList.remove('collapsed'); - videoSection.classList.remove('expanded'); - toggleBtn.textContent = 'Hide Chat'; + if (isMobile) { + chatSection.classList.add('mobile-visible'); + toggleBtn.textContent = 'Hide Chat'; + } else { + chatSection.classList.remove('collapsed'); + videoSection.classList.remove('expanded'); + toggleBtn.textContent = 'Hide Chat'; + } // Clear unread count when reopening AppState.unreadCount = 0; updateNotificationBadge(); diff --git a/static/css/layout.css b/static/css/layout.css index 4fdd66d..5ed05f0 100644 --- a/static/css/layout.css +++ b/static/css/layout.css @@ -4,18 +4,49 @@ THEATER CONTAINER - Main layout wrapper ================================================================= */ -.theater-container { +.theater { display: flex; height: 100vh; position: relative; transition: all var(--transition-slow); } +/* Mobile-first responsive layout */ +@media (max-width: calc(var(--breakpoint-md) - 1px)) { + .theater { + flex-direction: column; + } + + /* On mobile, theater layout stacks vertically */ + .theater__video-section { + height: 100vh; + order: 1; + } + + .theater__chat-section { + display: none; /* Hidden by default on mobile, shown when toggled */ + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100vh; + z-index: var(--z-modal, 1000); + order: 2; + transform: translateY(100%); /* Start below screen */ + transition: transform var(--transition-base); + } + + .theater__chat-section.mobile-visible { + display: flex; + transform: translateY(0); + } +} + /* ================================================================= VIDEO SECTION - Left side containing video player ================================================================= */ -.video-section { +.theater__video-section { flex: 1; background: #000; position: relative; @@ -24,7 +55,7 @@ transition: all var(--transition-slow); } -.video-section.expanded { +.theater__video-section.expanded { flex: 1; width: 100%; } @@ -44,7 +75,7 @@ CHAT SECTION - Right side chat panel ================================================================= */ -.chat-section { +.theater__chat-section { width: 350px; background: var(--bg-dark); color: var(--text-primary); @@ -56,9 +87,23 @@ border-left: 1px solid var(--border-color); } -.chat-section.collapsed { +.theater__chat-section.collapsed { transform: translateX(100%); position: absolute; right: 0; height: 100%; } + +/* Desktop responsive adjustments */ +@media (min-width: var(--breakpoint-lg)) { + .theater__chat-section { + width: 400px; + } +} + +/* Tablet adjustments */ +@media (min-width: calc(var(--breakpoint-md))) and (max-width: calc(var(--breakpoint-lg) - 1px)) { + .theater__chat-section { + width: 320px; + } +}