diff --git a/src/components/Analysis/AnalysisGameList.tsx b/src/components/Analysis/AnalysisGameList.tsx index 66611a4c..ab7619af 100644 --- a/src/components/Analysis/AnalysisGameList.tsx +++ b/src/components/Analysis/AnalysisGameList.tsx @@ -48,6 +48,7 @@ interface AnalysisGameListProps { onCustomAnalysis?: () => void onGameSelected?: () => void // Called when a game is selected (for mobile popup closing) refreshTrigger?: number // Used to trigger refresh when custom analysis is added + embedded?: boolean // Render without outer card container } export const AnalysisGameList: React.FC = ({ @@ -56,6 +57,7 @@ export const AnalysisGameList: React.FC = ({ onGameSelected, refreshTrigger, loadNewWorldChampionshipGame, + embedded = false, }) => { const router = useRouter() const { analysisLichessList, analysisTournamentList } = @@ -584,10 +586,14 @@ export const AnalysisGameList: React.FC = ({ return analysisTournamentList ? (
-
+
= ({
+ {selected === 'custom' && onCustomAnalysis && ( +
+ +
+ )} + {/* H&B Subsections */} {selected === 'hb' && ( -
+
@@ -703,12 +725,12 @@ export const AnalysisGameList: React.FC = ({ return (
-

+

{selected === 'play' || selected === 'hb' || selected === 'favorites' @@ -732,13 +754,13 @@ export const AnalysisGameList: React.FC = ({ className="flex flex-1 cursor-pointer items-center justify-between overflow-hidden py-1" >

-

+

{displayName}

{selected === 'favorites' && (game.type === 'hand' || game.type === 'brain') && ( - + {game.type === 'hand' ? 'hand_gesture' : 'neurology'} @@ -753,7 +775,7 @@ export const AnalysisGameList: React.FC = ({ e.stopPropagation() handleFavoriteGame(game) }} - className="flex items-center justify-center text-secondary transition hover:text-primary" + className="flex items-center justify-center text-white/70 transition hover:text-white" title="Edit favourite" > @@ -798,7 +820,7 @@ export const AnalysisGameList: React.FC = ({ )} -

+

{game.result .replace('1/2', '½') .replace('1/2', '½')} @@ -818,7 +840,7 @@ export const AnalysisGameList: React.FC = ({ disabled={currentPage === 1} className="flex items-center justify-center text-secondary hover:text-primary disabled:opacity-50" > - + first_page @@ -827,11 +849,11 @@ export const AnalysisGameList: React.FC = ({ disabled={currentPage === 1} className="flex items-center justify-center text-secondary hover:text-primary disabled:opacity-50" > - + arrow_back_ios - + Page {currentPage} of {totalPages} @@ -848,7 +870,7 @@ export const AnalysisGameList: React.FC = ({ disabled={currentPage === totalPages} className="flex items-center justify-center text-secondary hover:text-primary disabled:opacity-50" > - + last_page @@ -862,7 +884,7 @@ export const AnalysisGameList: React.FC = ({ getCurrentGames().length === 0 && !loading && (

-

+

{selected === 'favorites' ? ' ⭐ Hit the star to favourite games...' : 'Play more games... ^. .^₎⟆'} @@ -870,19 +892,7 @@ export const AnalysisGameList: React.FC = ({

)}
- {onCustomAnalysis && ( - - )} + {/* Removed bottom "Analyze Custom" button; now shown only under Custom tab */}
setSelected(name)} - className={`relative flex items-center justify-center md:py-1 ${selected === name ? 'bg-human-4/30' : 'bg-background-1/80 hover:bg-background-2'} ${name === 'favorites' ? 'px-3' : ''}`} + className={`relative flex items-center justify-center md:py-1 ${selected === name ? 'bg-white/10' : 'bg-white/5 hover:bg-white/10'} ${name === 'favorites' ? 'px-3' : ''}`} >

{label}

@@ -927,7 +937,7 @@ function Header({ {selected === name && ( )} diff --git a/src/components/Analysis/AnalysisSidebar.tsx b/src/components/Analysis/AnalysisSidebar.tsx index b3eacca7..7a8b25af 100644 --- a/src/components/Analysis/AnalysisSidebar.tsx +++ b/src/components/Analysis/AnalysisSidebar.tsx @@ -77,93 +77,102 @@ export const AnalysisSidebar: React.FC = ({ - {/* Analysis Toggle Bar */} -
-
- analytics -

Analysis

-
- -
- {/* Large screens : 2-row layout */} -
+
{/* Combined Highlight + MovesByRating container */} -
-
-
- +
+
+ {/* Merged header with toggle */} +
+
+ + analytics + +

Analysis

+
+
-
- +
+
+ +
+
+ +
{!analysisEnabled && ( -
-
- +
+
+ lock -

Analysis Disabled

-

+

Analysis Disabled

+

Enable analysis to see move evaluations

@@ -172,7 +181,7 @@ export const AnalysisSidebar: React.FC = ({
{/* MoveMap + BlunderMeter container */} -
+
= ({ } /> {!analysisEnabled && ( -
-
- +
+
+ lock -

Analysis Disabled

-

+

Analysis Disabled

+

Enable analysis to see position evaluation

@@ -213,10 +228,34 @@ export const AnalysisSidebar: React.FC = ({
{/* Smaller screens: 3-row layout */} -
+
{/* Row 1: Combined Highlight + BlunderMeter container */} -
-
+
+ {/* Merged header with toggle (mobile/smaller screens) */} +
+
+ + analytics + +

Analysis

+
+ +
+
= ({ currentNode={controller.currentNode ?? undefined} />
-
+
= ({
{!analysisEnabled && ( -
-
- +
+
+ lock -

Analysis Disabled

-

+

Analysis Disabled

+

Enable analysis to see move evaluations

@@ -307,13 +352,19 @@ export const AnalysisSidebar: React.FC = ({ />
{!analysisEnabled && ( -
-
- +
+
+ lock -

Analysis Disabled

-

+

Analysis Disabled

+

Enable analysis to see position evaluation

@@ -332,13 +383,19 @@ export const AnalysisSidebar: React.FC = ({ />
{!analysisEnabled && ( -
-
- +
+
+ lock -

Analysis Disabled

-

+

Analysis Disabled

+

Enable analysis to see move evaluations

diff --git a/src/components/Analysis/BlunderMeter.tsx b/src/components/Analysis/BlunderMeter.tsx index 00636ce7..38fa2cb0 100644 --- a/src/components/Analysis/BlunderMeter.tsx +++ b/src/components/Analysis/BlunderMeter.tsx @@ -64,7 +64,7 @@ const DesktopBlunderMeter: React.FC = ({ return (

Blunder Meter

@@ -119,7 +119,7 @@ const MobileBlunderMeter: React.FC = ({ return (

Blunder Meter

diff --git a/src/components/Analysis/BroadcastAnalysis.tsx b/src/components/Analysis/BroadcastAnalysis.tsx index 7822b8b3..6da62abb 100644 --- a/src/components/Analysis/BroadcastAnalysis.tsx +++ b/src/components/Analysis/BroadcastAnalysis.tsx @@ -267,35 +267,43 @@ export const BroadcastAnalysis: React.FC = ({ exit="exit" style={{ willChange: 'transform, opacity' }} > -
+
- - - -
-
-
- -
-
- + + + +
+
+
+
+
+
+
+ = ({ goToRootNode={analysisController.goToRootNode} disableKeyboardNavigation={false} disableNavigation={false} + embedded />
@@ -489,6 +498,7 @@ export const BroadcastAnalysis: React.FC = ({ goToRootNode={analysisController.goToRootNode} disableKeyboardNavigation={false} disableNavigation={false} + embedded />
diff --git a/src/components/Analysis/BroadcastGameList.tsx b/src/components/Analysis/BroadcastGameList.tsx index 5881c1ee..ba285744 100644 --- a/src/components/Analysis/BroadcastGameList.tsx +++ b/src/components/Analysis/BroadcastGameList.tsx @@ -5,11 +5,13 @@ import { BroadcastStreamController, BroadcastGame } from 'src/types' interface BroadcastGameListProps { broadcastController: BroadcastStreamController onGameSelected?: () => void + embedded?: boolean } export const BroadcastGameList: React.FC = ({ broadcastController, onGameSelected, + embedded = false, }) => { const [selectedRoundId, setSelectedRoundId] = useState( broadcastController.currentRound?.id || '', @@ -61,10 +63,28 @@ export const BroadcastGameList: React.FC = ({ } return ( -
-
+
+
-

+

{broadcastController.currentBroadcast?.tour.name || 'Live Broadcast'}

@@ -76,7 +96,7 @@ export const BroadcastGameList: React.FC = ({ id="round-selector" value={selectedRoundId} onChange={(e) => handleRoundChange(e.target.value)} - className="w-full rounded bg-background-2 px-2 py-1 text-xs text-primary focus:outline-none focus:ring-1 focus:ring-human-4" + className="w-full rounded-md border border-glassBorder bg-glass px-2 py-1 text-xs text-white/90 backdrop-blur-sm focus:outline-none focus:ring-1 focus:ring-human-4" > {broadcastController.currentBroadcast.rounds.map((round) => (