Refactor New Game to several smaller elements #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Setup: Updated repository
.giteapointer to this issue for traceability. This ensures all subsequent refactor commits will reference the correct issue.Commit:
892c01d188Next: Start extracting components from
src/components/NewGame.tsxintosrc/components/new-game/in small, reviewable steps.Step 1: Extracted
PlayerSelectModalinto its own module.Changes:
src/components/new-game/PlayerSelectModal.tsxsrc/components/NewGame.tsxto import modalCommit:
8aac1d476aImpact: Purely structural; no behavioral changes. Proceeding to extract wizard steps incrementally.
Step 2: Extracted
Player1Stepinto its own module and wired imports.Changes:
src/components/new-game/Player1Step.tsxsrc/components/NewGame.tsxto importPlayer1StepCommit:
f8b461e189Impact: Structural refactor only; no behavior changes. Next: extract Player2Step and Player3Step.
Step 3: Extracted
Player2StepandPlayer3Stepinto separate modules and updated imports.Changes:
src/components/new-game/Player2Step.tsxsrc/components/new-game/Player3Step.tsxsrc/components/NewGame.tsxto import bothCommit:
af0ffe8517Impact: Structural refactor; no behavior changes. Next: extract GameTypeStep and RaceToStep.
Step 4: Extracted
GameTypeStepandRaceToStepinto separate modules.Changes:
src/components/new-game/GameTypeStep.tsxsrc/components/new-game/RaceToStep.tsxsrc/components/NewGame.tsxto import bothCommit:
d6ea0125dfImpact: Structural refactor only; no behavior changes. Next: extract BreakRuleStep and BreakOrderStep.
Step 5: Extracted
BreakRuleStepandBreakOrderStepinto separate modules.Changes:
src/components/new-game/BreakRuleStep.tsxsrc/components/new-game/BreakOrderStep.tsxsrc/components/NewGame.tsxto import bothCommit:
2b17027801Impact: Structural refactor; no behavior changes. Next: finalize exports/imports and lint.
Refactor complete: Split
NewGameinto modular step components.Summary of changes:
src/components/new-game/NewGame.tsxnow imports and re-exports these componentsCommits:
892c01d188– .gitea -> issue #308aac1d476a– extract PlayerSelectModalf8b461e189– extract Player1Stepaf0ffe8517– extract Player2/3 Stepsd6ea0125df– extract GameType/RaceTo Steps2b17027801– extract BreakRule/BreakOrder StepsIf you want, I can add an
index.tsbarrel innew-game/for cleaner imports, or proceed to refactor state orchestration into a dedicated container/hook.Future enhancement notes (not implemented yet):
src/components/new-game/index.tsimport { Player1Step, RaceToStep } from '.../new-game'useNewGameWizardhook (or container)Context: Refactor New Game to several smaller elements #30
Committed changes to default Break rule and selected styling.
64fedd3024Summary:
This commit references and closes this issue (Fixes #30).
Committed UI update to highlight selected players in
BreakOrderStep.tsx(mirrors selection UX fromBreakRuleStep.tsx).Commit:
9175d505c2selectedstyling to first/second player buttons for clear visual feedback.Refs #30
Added Docker Compose configuration file (
compose.yml) for deployment.Commit: f8d895ab21ac5267f6371f97addd98c0c966c01d
Changes:
compose.ymlwith nginx service configurationscore.bsc-gp.de./distdirectoryThe service is now ready for containerized deployment with reverse proxy support.