From 12f1ad0834249c5dbae2f271c856613fa7e1ac75 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:05:03 +0000 Subject: [PATCH 1/3] Initial plan From 8b85f4cf27a15d036ac6e8572337fa2dc0aa2a89 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 28 Jan 2026 09:10:16 +0000 Subject: [PATCH 2/3] Fix HUD responsive sizing and canvas container layout for mobile Co-authored-by: pethers <1726836+pethers@users.noreply.github.com> --- src/App.css | 118 ++++++++++++++++++------------------------ src/App.tsx | 146 +++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 155 insertions(+), 109 deletions(-) diff --git a/src/App.css b/src/App.css index 9bf3235..fb945c0 100644 --- a/src/App.css +++ b/src/App.css @@ -1,10 +1,4 @@ -#root { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; -} - +/* Animation for logo effects */ .logo { height: 6em; padding: 1.5em; @@ -41,55 +35,6 @@ color: #888; } -.app-container { - max-width: 1280px; - margin: 0 auto; - padding: 2rem; - text-align: center; - display: flex; - flex-direction: column; - align-items: center; - gap: 1rem; - width: 100%; - height: 100vh; - margin: 0; - padding: 0; - box-sizing: border-box; - background-color: #0d1117; - color: white; - overflow: hidden; -} - -.app-container h1 { - font-size: 2.5em; - line-height: 1.1; - margin: 0; - color: #646cff; - margin: 10px 0; - font-size: 24px; -} - -.app-container canvas { - border: 2px solid #646cff; - border-radius: 8px; - box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); - display: block; - width: 100% !important; - height: calc(100vh - 100px) !important; - max-height: none; - max-width: none; - border: none; -} - -.instructions { - color: #888; - font-style: italic; - margin: 0; - margin: 8px 0; - font-size: 14px; - color: #8b949e; -} - /* Ensure fullscreen across different devices */ html, body, @@ -99,6 +44,7 @@ body, margin: 0; padding: 0; overflow: hidden; + position: fixed; } body, @@ -114,31 +60,36 @@ html { .app-container { width: 100%; height: 100vh; + height: 100dvh; /* Use dynamic viewport height for mobile browsers */ display: flex; flex-direction: column; align-items: center; color: white; + position: relative; + overflow: hidden; } .app-container h1 { - margin: 10px 0; - font-size: 24px; + margin: 5px 0; + font-size: 20px; color: #646cff; + flex-shrink: 0; } .app-container canvas { display: block; width: 100% !important; - height: calc(100vh - 100px) !important; + height: 100% !important; max-height: none !important; max-width: none !important; cursor: crosshair; } .instructions { - margin: 8px 0; - font-size: 14px; + margin: 5px 0; + font-size: 12px; color: #8b949e; + flex-shrink: 0; } /* Animation for pulse effect */ @@ -163,13 +114,46 @@ html { } } -@media (max-width: 900px) { - .app-container { - padding: 1rem; +/* Mobile-specific adjustments */ +@media (max-width: 768px) { + .app-container h1 { + font-size: 16px; + margin: 3px 0; + } + + .instructions { + font-size: 10px; + margin: 3px 0; + } +} + +/* Portrait mode specific adjustments */ +@media (max-width: 768px) and (orientation: portrait) { + .app-container h1 { + font-size: 14px; + margin: 2px 0; + } + + .instructions { + display: none; /* Hide instructions in portrait mode to save space */ + } +} + +/* Landscape mode specific adjustments */ +@media (max-width: 900px) and (orientation: landscape) { + .app-container h1 { + font-size: 16px; + } +} + +/* Very small screens */ +@media (max-height: 600px) { + .app-container h1 { + font-size: 14px; + margin: 2px 0; } - .app-container canvas { - max-width: 100%; - height: auto; + .instructions { + display: none; } } diff --git a/src/App.tsx b/src/App.tsx index fbf399a..cbb949f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -23,16 +23,20 @@ const OVERLAY_STYLES = { const INSTRUCTIONS_STYLES = { ...OVERLAY_STYLES, - bottom: "80px", + bottom: "10px", left: "50%", transform: "translateX(-50%)", - fontSize: "16px", + fontSize: "14px", textAlign: "center" as const, + maxWidth: "90%", + whiteSpace: "nowrap" as const, + overflow: "hidden", + textOverflow: "ellipsis", }; const AUDIO_STATUS_STYLES = { position: "absolute" as const, - bottom: "40px", + bottom: "35px", left: "50%", transform: "translateX(-50%)", zIndex: 10, @@ -40,7 +44,11 @@ const AUDIO_STATUS_STYLES = { padding: "6px 12px", borderRadius: "8px", color: "#00ff88", - fontSize: "12px", + fontSize: "11px", + maxWidth: "90%", + whiteSpace: "nowrap" as const, + overflow: "hidden", + textOverflow: "ellipsis", }; const VOLUME_CONTROL_STYLES = { @@ -522,44 +530,78 @@ function App(): JSX.Element { return (