화면 정리: 한눈에 들어오게 (홈 게임 타일·종류 탭, 방 안 상단 막대 한 줄, 대기실·결과·설정 간소화)

"한 화면에 정보가 너무 많아 한눈에 들어오지 않는다" 피드백. NN/g 점진적 공개, 토스 "한 화면 한 가지",
BGA 화면 지침, Hick의 법칙을 참고해 docs/07 §1에 원칙 8번으로 정리하고 화면에 적용했다.

- 홈·게임 목록: 게임 카드를 아이콘·이름·"2명 · 5~15분" 타일로 줄이고(설명·난이도는 게임 소개에만),
  휴대폰 3열. [전체][판·주사위][카드·패][여럿이 파티] 탭. 휴대폰 홈 세로 길이 약 1/4.
  휴대폰에서 [방 만들기]는 한 줄, [코드로 참여]·[컴퓨터와 연습]은 나란히.
- 방 안: 사이트 상단 메뉴를 숨기고 방 막대 한 줄만(--site-h 변수, 방 안에서는 0).
- 대기실: 초대 카드는 빈자리가 있을 때만, 버튼은 [링크 복사][공유하기/초대글 복사] 두 개
  (QR은 빈자리 칸 "+ 빈자리 · 📷 QR로 초대"). PC 대기실의 규칙 전문 카드와 "바꾸면 바로 적용돼요" 제거.
  게스트 경고는 시작 버튼 아래 한 줄로.
- 채팅 빠른 반응은 한 줄(넘치면 옆으로).
- 결과 창: 진한 버튼은 [한 판 더] 하나, [판 보기][▶ 다시 보기]는 한 줄.
- 설정(/me): 항목 이름과 선택지를 한 줄에.
- E2E: 다시 보기 링크 이름, 컴퓨터 상대의 "게임 중 홈으로"는 앱 안 이동으로.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-09 00:16:10 +09:00
parent 19c163f4d2
commit b81b4f60be
15 changed files with 225 additions and 70 deletions

View File

@@ -1,24 +1,43 @@
import { useState } from 'react';
import { Link } from 'react-router';
import type { CatalogEntry } from '@bg/shared/lite';
import { GAME_ICON } from '../lib/catalog-ui';
import { GAME_GROUPS, GAME_ICON } from '../lib/catalog-ui';
export function GameGrid({ games, columns = 'repeat(auto-fill, minmax(200px, 1fr))' }: { games: CatalogEntry[]; columns?: string }) {
/**
* Game picker (docs/07 §3.3): small tiles with icon, name and one meta line. The one-line blurb and
* difficulty live on the game page, so 26 games fit on a phone in a few screens. A tab row narrows the list.
*/
export function GameGrid({ games }: { games: CatalogEntry[] }) {
const [group, setGroup] = useState<string>('all');
const groups = GAME_GROUPS.filter((g) => games.some((x) => g.ids.includes(x.id)));
const shown = group === 'all' ? games : games.filter((g) => GAME_GROUPS.find((x) => x.key === group)?.ids.includes(g.id));
return (
<div style={{ display: 'grid', gridTemplateColumns: columns, gap: 16 }}>
{games.map((g) => (
<Link key={g.id} to={`/g/${g.id}`} className="card game-card" style={{ textDecoration: 'none', color: 'inherit', display: 'flex', flexDirection: 'column', gap: 8, padding: 20 }}>
<span style={{ fontSize: '3rem', lineHeight: 1 }} aria-hidden>
{GAME_ICON[g.id] ?? '🎲'}
</span>
<strong style={{ fontSize: '1.25rem' }}>{g.nameKo}</strong>
<span className="muted">{g.blurb}</span>
<span className="row small" style={{ gap: 6, marginTop: 'auto' }}>
<span className="badge">{g.minPlayers === g.maxPlayers ? `${g.minPlayers}명` : `${g.minPlayers}~${g.maxPlayers}명`}</span>
<span className="badge">{g.minutes}분</span>
<span className="badge">{g.level}</span>
</span>
</Link>
))}
<div className="stack" style={{ gap: 14 }}>
{groups.length > 1 && (
<div className="segmented game-tabs" role="group" aria-label="게임 종류">
<button type="button" aria-pressed={group === 'all'} onClick={() => setGroup('all')}>
전체
</button>
{groups.map((g) => (
<button key={g.key} type="button" aria-pressed={group === g.key} onClick={() => setGroup(g.key)}>
{g.label}
</button>
))}
</div>
)}
<div className="game-grid">
{shown.map((g) => (
<Link key={g.id} to={`/g/${g.id}`} className="card game-card">
<span className="game-card-icon" aria-hidden>
{GAME_ICON[g.id] ?? '🎲'}
</span>
<strong className="game-card-name">{g.nameKo}</strong>
<span className="game-card-meta">
{g.minPlayers === g.maxPlayers ? `${g.minPlayers}명` : `${g.minPlayers}~${g.maxPlayers}명`} · {g.minutes}분
</span>
</Link>
))}
</div>
</div>
);
}

View File

@@ -72,8 +72,9 @@ export function NicknameForm({
}
/** Guests are deleted with their records a day after they leave the site (docs/05 §4). */
export function GuestWarning() {
export function GuestWarning({ short }: { short?: boolean }) {
const discord = useSession((s) => s.discordEnabled);
if (short) return <p className="guest-warning small" role="note">⚠️ 게스트 기록은 하루 동안 안 들어오면 지워져요.</p>;
return (
<p className="guest-warning small" role="note">
⚠️ 게스트는 기록이 오래 저장되지 않아요. 사이트에 들어오지 않은 채 하루가 지나면 계정과 기록이 모두 지워져요.