Skip to content

Commit 2877a52

Browse files
style: make stream ui consistent with analysis
1 parent cb444d1 commit 2877a52

2 files changed

Lines changed: 29 additions & 12 deletions

File tree

src/components/Analysis/StreamAnalysis.tsx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -278,29 +278,35 @@ export const StreamAnalysis: React.FC<Props> = ({
278278
exit="exit"
279279
style={{ willChange: 'transform, opacity' }}
280280
>
281-
<div className="flex h-full w-[90%] flex-row gap-2">
281+
<div className="flex h-full w-[90%] flex-row gap-3">
282282
<motion.div
283283
id="navigation"
284-
className="desktop-left-column-container flex flex-col gap-2 overflow-hidden"
284+
className="desktop-left-column-container flex flex-col overflow-hidden"
285285
variants={itemVariants}
286286
style={{ willChange: 'transform, opacity' }}
287287
>
288-
<GameInfo
289-
title="Analysis"
290-
icon="live_tv"
291-
type="analysis"
292-
streamState={streamState}
293-
>
294-
<NestedGameInfo />
295-
</GameInfo>
296-
<div className="flex h-1/2 w-full flex-1 flex-col gap-2">
297-
<div className="flex h-full flex-col overflow-y-scroll">
288+
<div className="flex h-full w-full flex-col overflow-hidden rounded-md border border-glassBorder bg-glass backdrop-blur-md">
289+
{/* Header */}
290+
<GameInfo
291+
title="Analysis"
292+
icon="live_tv"
293+
type="analysis"
294+
streamState={streamState}
295+
embedded
296+
>
297+
<NestedGameInfo />
298+
</GameInfo>
299+
{/* Moves + controller */}
300+
<div className="red-scrollbar flex h-full flex-1 flex-col overflow-y-auto">
301+
<div className="h-3 border-b border-glassBorder" />
298302
<MovesContainer
299303
game={game}
300304
termination={game.termination}
301305
showAnnotations={true}
302306
disableKeyboardNavigation={false}
303307
disableMoveClicking={false}
308+
embedded
309+
heightClass="h-40"
304310
/>
305311
<BoardController
306312
gameTree={analysisController.gameTree}
@@ -314,6 +320,7 @@ export const StreamAnalysis: React.FC<Props> = ({
314320
goToRootNode={analysisController.goToRootNode}
315321
disableKeyboardNavigation={false}
316322
disableNavigation={false}
323+
embedded
317324
/>
318325
</div>
319326
</div>
@@ -503,6 +510,7 @@ export const StreamAnalysis: React.FC<Props> = ({
503510
goToRootNode={analysisController.goToRootNode}
504511
disableKeyboardNavigation={false}
505512
disableNavigation={false}
513+
embedded
506514
/>
507515
</div>
508516
<div className="relative bottom-0 h-48 max-h-48 flex-1 overflow-auto overflow-y-hidden">

src/pages/analysis/stream/[gameId].tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,15 @@ const StreamAnalysisPage: NextPage = () => {
172172
/>
173173
</Head>
174174

175+
{/* Radial gradient backdrop to match new design language */}
176+
<div
177+
className="pointer-events-none absolute inset-0"
178+
style={{
179+
background:
180+
'radial-gradient(ellipse 75% 60% at center top, rgba(239, 68, 68, 0.08) 0%, transparent 60%)',
181+
}}
182+
/>
183+
175184
<AnimatePresence>
176185
{analysisController &&
177186
(analysisController.maia.status === 'no-cache' ||

0 commit comments

Comments
 (0)