Repository navigation
Convert setup screen to a 3-step wizard, drop progression-notation text - #11
Conversation
Splits the flat setup form into three sequential screens (MIDI, then genre/scale, then key/level/unlock), reusing the existing showScreen()/ data-back-to idiom for both directions -- Next buttons just add two more entries to the existing menuButtonTargets map, Back buttons reuse the .backButton mechanism unchanged. Also removes renderProgressionPreview() and the #progressionPreview element entirely, per the brief: no progression notation shown in setup. Guide copy per step: steps 1-2 are the owner's verbatim chat text; step 3 is drafted here to match the plain/factual tone of #howToPlayScreen and should be treated as owner-review-pending, not final. Closes Men-in-Black-5/ideas#156
|
reviewer: approved. Traced the re-narrowing path independently: Note for the owner separately from the code review: step 3's guide copy is drafted, not yours verbatim -- worth a read before/after this merges since the issue explicitly called it out as pending your edit. |
Closes Men-in-Black-5/ideas#156 (from #155).
What
Splits
#setupScreen's flat form into three sequential steps, reusing the existingshowScreen()/data-back-toidiom in both directions:setupScreen) — device select + the existing#midiUnsupportederror, plus guide copy.setupStep2Screen) — genre/scale selects, plus guide copy. Key moved here from step 2.setupStep3Screen) — key/level selects, the unchanged unlock form, guide copy, then Start Game.Next buttons are just two more entries in the existing
menuButtonTargetsmap (buttonId →showScreen(targetId)); Back buttons reuse the existing.backButton/data-back-tomechanism verbatim, no new JS pattern for either direction.Also removes
renderProgressionPreview(), its call sites, and the#progressionPreviewelement/CSS entirely — no progression notation shown anywhere in setup now.populateGenreSelect/populateScaleSelect/populateKeySelectand the genre→scale→key narrowing logic are untouched; going back and changing an earlier step still correctly re-narrows later ones on the way forward (verified below). Unlock form and Start Game behavior/validation messages are unchanged.Guide copy
#howToPlayScreen. Flagging for owner review/edit — not treated as final.Testing
npx tsc --noEmit— clean.npx vitest run— 171 passed (15 files), including updatedtest/setup-screen.test.ts(removed therenderProgressionPreviewtests, trimmed the now-unusedprogressionPreview/previewfixture).npm run build— clean,dist/app.jsincluded in this PR (matches how the repo already tracks it).chromium+ puppeteer-core, screenshots attached below): clicked through all 3 steps, confirmed guide copy per step, confirmed#progressionPreviewis gone from the DOM, changed genre on step 2 → confirmed scale/key narrowed correctly both forward and after Back → change → Forward again (classical genre correctly re-narrowed to its own scale/key set), and confirmed "Back to Menu" from any step reaches the main menu.(Screenshots taken locally; happy to attach directly if useful — headless MIDI access is naturally blocked so Start Game shows disabled in the captures, that's expected sandbox behavior, not a regression.)