feat(rithmomachia): guide defaults to docked right on open

Change guide opening behavior:
- Created handleOpenGuide() function
- Sets guideDocked=true and guideDockSide='right' when opening
- Guide now opens docked to the right side by default
- No need to drag and dock manually on first open
- Provides better initial UX with guide immediately in workspace

User can still undock or drag to left side if preferred.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock 2025-11-02 12:24:22 -06:00
parent 9fd54067ce
commit 11f674d542
1 changed files with 10 additions and 2 deletions

View File

@ -94,6 +94,14 @@ export function RithmomachiaGame() {
return badges
}, [whitePlayerId, blackPlayerId])
const handleOpenGuide = () => {
console.log('[RithmomachiaGame] handleOpenGuide called')
setIsGuideOpen(true)
setGuideDocked(true) // Default to docked on right
setGuideDockSide('right')
console.log('[RithmomachiaGame] Guide opened in docked right position')
}
const handleDock = (side: 'left' | 'right') => {
console.log('[RithmomachiaGame] handleDock called', { side })
setGuideDockSide(side)
@ -144,8 +152,8 @@ export function RithmomachiaGame() {
height: '100%',
})}
>
{state.gamePhase === 'setup' && <SetupPhase onOpenGuide={() => setIsGuideOpen(true)} />}
{state.gamePhase === 'playing' && <PlayingPhase onOpenGuide={() => setIsGuideOpen(true)} />}
{state.gamePhase === 'setup' && <SetupPhase onOpenGuide={handleOpenGuide} />}
{state.gamePhase === 'playing' && <PlayingPhase onOpenGuide={handleOpenGuide} />}
{state.gamePhase === 'results' && <ResultsPhase />}
</main>
</div>