diff --git a/web/src/routes/online/+page.svelte b/web/src/routes/online/+page.svelte index 47d0ae8..d67c541 100644 --- a/web/src/routes/online/+page.svelte +++ b/web/src/routes/online/+page.svelte @@ -96,11 +96,19 @@ // Lifted out of ChatPanel so the pill in GameBoard's top row — reachable // above the chain rather than below it — can unfold the panel and read its // count without the two components knowing about each other beyond this. - let chatFolded = $state(true); + // Open in the lobby, where talking is what people are there to do, and + // folded the moment a game starts, so the board is not pushed off a phone + // screen by the conversation under it. A lobby that starts folded would + // hide the input behind a badge before anyone has said anything. + let chatFolded = $state(false); let chatUnread = $state(0); /** @type {HTMLElement | undefined} */ let talkPane = $state(); + $effect(() => { + if (game.state.phase === 'playing') chatFolded = true; + }); + function openChat() { chatFolded = false; talkPane?.scrollIntoView({ behavior: scrollBehavior(), block: 'start' }); @@ -442,9 +450,9 @@ + Collapsible on any narrow screen, lobby included, so chat arriving + in a lobby whose panel the player folded still shows a count; it + starts open there and folds itself when a game begins. -->