Skip to content

Commit 83789af

Browse files
adn8naiagentclaude
andcommitted
1.3.1: Live banner width fix and medium screen layout improvements
- Live session banner on home page now matches round card width (max-w-3xl) - Track map, lap analysis panel, and leaderboard no longer overflow on tablet-sized screens when lap analysis is open - Pinned race control stacks below telemetry on medium screens when lap analysis is open, remains side-by-side on desktop Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9f8d431 commit 83789af

File tree

4 files changed

+18
-9
lines changed

4 files changed

+18
-9
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All notable changes to F1 Timing Replay will be documented in this file.
44

5+
## 1.3.1
6+
7+
### Fixes
8+
- **Live session banner width** — live session card on the home page now matches the width of the round cards
9+
- **Medium screen layout** — track map, lap analysis panel, and leaderboard no longer overflow on tablet-sized screens when lap analysis is open
10+
11+
---
12+
513
## 1.3.0
614

715
### New Features

frontend/src/app/replay/[year]/[round]/page.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ export default function ReplayPage() {
5555
const [pipActive, setPipActive] = useState(false);
5656
const [fullscreen, setFullscreen] = useState(false);
5757
const [isMobile, setIsMobile] = useState(false);
58+
const [isMediumScreen, setIsMediumScreen] = useState(false);
5859
const [mobileTrackOpen, setMobileTrackOpen] = useState(true);
5960
const [mobileLeaderboardOpen, setMobileLeaderboardOpen] = useState(true);
6061
const [mobileTelemetryOpen, setMobileTelemetryOpen] = useState(false);
@@ -82,7 +83,7 @@ export default function ReplayPage() {
8283
const [isIOS, setIsIOS] = useState(false);
8384

8485
useEffect(() => {
85-
function check() { setIsMobile(window.innerWidth < 640); }
86+
function check() { setIsMobile(window.innerWidth < 640); setIsMediumScreen(window.innerWidth >= 640 && window.innerWidth < 1400); }
8687
check();
8788
window.addEventListener("resize", check);
8889
setIsIOS(/iPad|iPhone|iPod/.test(navigator.userAgent) || (navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1));
@@ -345,7 +346,7 @@ export default function ReplayPage() {
345346
</div>
346347

347348
{/* Track section */}
348-
<div className={`sm:flex-1 ${!isMobile && showTelemetry && selectedDrivers.length > 2 ? `flex ${effectiveTelemetryPosition === "left" ? "flex-row" : "flex-col"} min-h-0` : "relative"}`}>
349+
<div className={`sm:flex-1 min-w-0 ${!isMobile && showTelemetry && selectedDrivers.length > 2 ? `flex ${effectiveTelemetryPosition === "left" ? "flex-row" : "flex-col"} min-h-0` : "relative"}`}>
349350
{/* Mobile section header */}
350351
{isMobile && (
351352
<button
@@ -663,7 +664,7 @@ export default function ReplayPage() {
663664
className={`flex-shrink-0 ${
664665
effectiveTelemetryPosition === "left"
665666
? "h-full bg-f1-card border-r border-f1-border order-first px-3 py-2 overflow-y-auto overflow-x-hidden"
666-
: "border-t border-f1-border py-1 flex overflow-hidden"
667+
: `border-t border-f1-border py-1 flex ${lapAnalysisOpen && isMediumScreen ? "flex-col overflow-y-auto" : "overflow-hidden"}`
667668
}`}
668669
style={effectiveTelemetryPosition === "left" && rcPinned && telemetryWidth > 0 ? { width: telemetryWidth + 24 } : undefined}
669670
>
@@ -699,7 +700,7 @@ export default function ReplayPage() {
699700
{/* Race Control in panel: show button or pinned messages */}
700701
{!rcPinned && (
701702
<div className={`flex items-center justify-center ${
702-
effectiveTelemetryPosition === "bottom"
703+
effectiveTelemetryPosition === "bottom" && !(lapAnalysisOpen && isMediumScreen)
703704
? "border-l border-f1-border px-4"
704705
: "border-t border-f1-border py-2 mt-2"
705706
}`}>
@@ -714,7 +715,7 @@ export default function ReplayPage() {
714715
{rcPinned && (
715716
<div
716717
className={`bg-f1-card ${
717-
effectiveTelemetryPosition === "bottom"
718+
effectiveTelemetryPosition === "bottom" && !(lapAnalysisOpen && isMediumScreen)
718719
? "border-l border-f1-border px-3 pt-1 flex-1 overflow-hidden flex flex-col"
719720
: "border-t border-f1-border px-3 py-2 mt-2"
720721
}`}
@@ -787,10 +788,10 @@ export default function ReplayPage() {
787788

788789
{/* Leaderboard section (with optional lap analysis panel on desktop) */}
789790
{settings.showLeaderboard && (
790-
<div className={`flex-shrink-0 flex ${isMobile ? "" : "border-l"} border-f1-border`} style={{ width: isMobile ? "100%" : undefined }}>
791+
<div className={`${lapAnalysisOpen ? "flex-shrink" : "flex-shrink-0"} flex ${isMobile ? "" : "border-l"} border-f1-border overflow-hidden`} style={{ width: isMobile ? "100%" : undefined }}>
791792
{/* Lap Analysis Panel - desktop only, left of leaderboard */}
792793
{!isMobile && isRace && lapAnalysisOpen && lapsResponse?.laps && (
793-
<div className="w-[300px] h-full border-r border-f1-border overflow-hidden flex-shrink-0">
794+
<div className="w-[280px] h-full border-r border-f1-border overflow-hidden flex-shrink-0">
794795
<LapAnalysisPanel laps={lapsResponse.laps} drivers={drivers} currentLap={replay.frame?.lap || 0} onClose={() => setLapAnalysisOpen(false)} />
795796
</div>
796797
)}

frontend/src/components/SessionPicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ export default function SessionPicker() {
390390
<>
391391
{/* Live session banner — only show on the year that has the live session */}
392392
{liveSession && liveSession.year === year && (
393-
<div className="mb-8">
393+
<div className="mb-8 max-w-3xl mx-auto">
394394
<a
395395
href={`/live/${liveSession.year}/${liveSession.round_number}?type=${liveSession.session_type}`}
396396
onClick={() => setNavigating(true)}

frontend/tsconfig.tsbuildinfo

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)