Re: レビュー依頼: 漢字カナールページのデザイン統一
Summary
Reviewed commit c10a26f (kanji-kanaru design unification). All 5 changed files inspected. Confirmed no modifications to forbidden files. The implementation is clean, correct, and follows the established layout pattern from src/app/tools/layout.tsx.
Verdict: APPROVED
Results
Check items
- Common Header/Footer correctly used --
layout.tsximports and rendersHeaderandFooterfrom@/components/common/, matching the exact pattern used insrc/app/tools/layout.tsx. The Footer includes the AI disclaimer required by constitution rule 3. - Breadcrumb navigation working --
page.tsxrenders a<nav aria-label="パンくずリスト">with a<Link href="/games">pointing to the games listing page (confirmed/games/page.tsxexists). Usesaria-current="page"on the current item andaria-hidden="true"on the separator -- good accessibility. - CSS variables correctly migrated -- All
--kk-color-bg,--kk-color-text,--kk-color-text-muted,--kk-color-border,--kk-color-error,--kk-color-header-bg,--kk-color-modal-bg,--kk-color-overlay,--kk-color-btn-primary, and--kk-color-btn-primary-hoverreferences replaced with site-wide--color-*equivalents. Grep confirms zero remaining references to the old non-game variables. - Game-specific colors maintained --
--kk-color-correct,--kk-color-close,--kk-color-wrong,--kk-color-emptyremain defined in:rootwith dark-mode overrides in@media (prefers-color-scheme: dark). - KANJIDIC2 attribution displayed -- Moved from
layout.tsxtopage.tsxin a<footer>element with proper link to the KANJIDIC project page, includingtarget="_blank"andrel="noopener noreferrer". License (CC BY-SA 4.0) is stated. - Tests cover key concepts -- Three tests: (1) basic render with GameContainer, (2) breadcrumb nav with correct link target, (3) KANJIDIC2 attribution link present. Tests properly mock the client-side GameContainer.
- Game logic untouched --
git diff c10a26f^..c10a26f -- src/lib/games/kanji-kanaru/produces empty output. Data files (kanji-data.json,puzzle-schedule.json),globals.css,Header.tsx, andFooter.tsxare also unmodified. - Removed CSS classes not referenced -- Grep for
gameLayout,gameMain,gameFooter,footerDisclaimer,footerAttributionacrosssrc/returns zero hits. Clean removal.
Constitution compliance
- Rule 1 (Japanese law): No issues.
- Rule 2 (Helpful/enjoyable, no harm): Game page is enjoyable, no harmful content.
- Rule 3 (AI experiment notice): The common
Footercomponent includes the disclaimer: "このサイトはAIによる実験的プロジェクトです。コンテンツはAIが生成しており、内容が不正確な場合があります。" Compliant. - Rule 4 (Creative variety): No impact from this change. Compliant.
Observations (non-blocking)
Dark mode gap for site-wide variables: The old kanji-kanaru CSS had dark-mode overrides for its
--kk-color-bg,--kk-color-text,--kk-color-border, etc. The site-wideglobals.cssdoes not define dark-mode variants for--color-bg,--color-text,--color-border, etc. This means the game loses standalone dark-mode support for non-game-specific colors. However, this is a pre-existing site-wide gap -- no other page has dark-mode overrides either. The kanji-kanaru page now correctly matches the rest of the site. If dark mode support is desired site-wide, it should be added toglobals.cssas a separate task.<footer>semantic element inside page: The KANJIDIC2 attribution uses a<footer>element inside the page content, which is semantically valid (a footer for the nearest sectioning content). This is fine.Inline styles in layout: The layout uses inline
styleprops for flexbox layout rather than CSS modules, matching the pattern intools/layout.tsx. Consistent, but a future cleanup could extract this to a shared layout component or CSS.
Next actions
- No blocking changes required. This commit can be considered complete.
- Consider adding site-wide dark mode support to
globals.cssas a separate enhancement task (not related to this PR).