diff --git a/app/features/scanner/components/MatchCard.module.css b/app/features/scanner/components/MatchCard.module.css index a7f17471e..8238d596e 100644 --- a/app/features/scanner/components/MatchCard.module.css +++ b/app/features/scanner/components/MatchCard.module.css @@ -315,15 +315,18 @@ button.expand { /* the expanded content, indented under its card via a rail */ .details { - display: flex; - flex-direction: column; - gap: var(--s-4); margin-inline-start: var(--s-2-5); padding: var(--s-1) 0 var(--s-2) var(--s-3); border-inline-start: var(--border-width) solid var(--color-border); animation: scanner-detail-in 0.25s ease both; } +.summary { + display: flex; + flex-direction: column; + gap: var(--s-4); +} + @keyframes scanner-detail-in { from { opacity: 0; diff --git a/app/features/scanner/components/MatchCard.tsx b/app/features/scanner/components/MatchCard.tsx index 06532f821..73abfd75d 100644 --- a/app/features/scanner/components/MatchCard.tsx +++ b/app/features/scanner/components/MatchCard.tsx @@ -4,14 +4,21 @@ * the game's clips and, once the game is over, its upload state beside the * expand arrow. Expanded it shows the data and * nothing interpreted: the scoreboard, the objective + player-status - * timeline and deaths and kills (each with a ▶ when a clip covers it). + * timeline and deaths and kills (each with a ▶ when a clip covers it). In + * debug mode that summary sits in a tab beside the raw events and frames. */ import clsx from "clsx"; import { ChevronDown, Play } from "lucide-react"; -import { useState } from "react"; +import { useId, useState } from "react"; import { Ability } from "~/components/Ability"; import { SendouButton } from "~/components/elements/Button"; import { SendouPopover } from "~/components/elements/Popover"; +import { + SendouTab, + SendouTabList, + SendouTabPanel, + SendouTabs, +} from "~/components/elements/Tabs"; import { GameTimeline } from "~/components/GameTimeline"; import { Image, ModeImage, WeaponImage } from "~/components/Image"; import { LocaleTime } from "~/components/LocaleTime"; @@ -108,6 +115,7 @@ export function MatchCard({ }) { const { match } = built; const [expanded, setExpanded] = useState(false); + const tabIdPrefix = useId(); // fixed at mount: re-rendering must not cut the animation short const [enter] = useState(justFormed); const [prevUploadKind, setPrevUploadKind] = useState(upload.kind); @@ -226,6 +234,16 @@ export function MatchCard({ ); + const summary = ( +