From 076d6ced3621a1fc766bfec89ec450b908de37a8 Mon Sep 17 00:00:00 2001 From: Frank Schwenk Date: Fri, 7 Nov 2025 14:23:03 +0100 Subject: [PATCH] Implement fixed viewport with internal scrolling Restructure app layout to prevent whole-page scrolling. The viewport is now locked at 100vh with overflow:hidden, and individual content areas scroll internally. Architecture changes: - Lock html/body at 100% height with overflow:hidden - Fix Layout component to 100vh, Screen to 100% height - Enable internal scrolling for content areas with flex:1 + overflow-y:auto New game wizard improvements: - Split forms into three sections: form-header (fixed), form-content (scrollable), form-footer (fixed with arrow navigation) - Fixes issue where many player names pushed navigation arrows off-screen - Applied to Player1Step, Player2Step, Player3Step, GameTypeStep Game list improvements: - Filter buttons stay fixed at top - Games container scrolls internally with overflow-y:auto - "Neues Spiel" button wrapped with flex-shrink:0 Game detail improvements: - Game controls stay visible while content scrolls Additional changes: - Add Playwright test artifact exclusions to .gitignore - Add Docker build instructions to README.md - Remove unnecessary setSelectionRange calls from player input steps Benefits: - No accidental page scrolling - Cleaner mobile UX (no address bar show/hide issues) - Navigation controls always visible - Predictable, contained scrolling behavior --- .gitignore | 5 ++ README.md | 6 ++ src/components/BscScoreApp.astro | 3 +- src/components/GameDetail.module.css | 19 +++++- src/components/GameList.module.css | 11 +++- src/components/GameList.tsx | 14 ++-- src/components/NewGame.module.css | 28 +++++++- src/components/new-game/GameTypeStep.tsx | 50 +++++++++------ src/components/new-game/Player1Step.tsx | 77 +++++++++++----------- src/components/new-game/Player2Step.tsx | 72 +++++++++++---------- src/components/new-game/Player3Step.tsx | 78 ++++++++++++----------- src/components/screens/GameListScreen.tsx | 20 +++--- src/components/ui/Layout.module.css | 11 +++- src/styles/index.css | 6 +- 14 files changed, 247 insertions(+), 153 deletions(-) diff --git a/.gitignore b/.gitignore index c1c2679..72afa6c 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,8 @@ pnpm-debug.log* .gitea dev/.gitea + +# Playwright test artifacts +playwright-report/ +test-results/ +playwright/.cache/ diff --git a/README.md b/README.md index fcd01c9..edc5635 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,12 @@ npm run test:record # Record browser interactions with Playwright npm run test:e2e # Run all recorded browser automation scripts ``` +### Building with Docker +```bash +# Build for production using Docker +docker run -it -v $(pwd):/app -w /app --rm node:latest npx astro build +``` + ## 🧪 Testing The project uses **Playwright** for browser automation and recording. This allows you to record interactions once and replay them anytime, making it easy to test repetitive workflows. diff --git a/src/components/BscScoreApp.astro b/src/components/BscScoreApp.astro index c1770af..0897f72 100644 --- a/src/components/BscScoreApp.astro +++ b/src/components/BscScoreApp.astro @@ -10,8 +10,9 @@