Added 10 new self-authored animal images (Cat, Horse, Elephant… #2
Loading…
Reference in a new issue
No description provided.
Delete branch "osf/178-more-puzzle-images-animals"
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?
What was done
src/components/ImagePicker.tsx).src/index.css).src/debug/DebugImages.tsx).src/components/ImagePicker.test.ts).src/index.css).How to review
main:git fetch && git checkout osf/178-more-puzzle-images-animals && git diff --stat origin/main...HEAD— you should see 10 new SVGs undersrc/assets/, the picker and debug-view registrations, and small CSS and test additions.npm install && npm test && npm run typecheck && npm run lint && npm run build— all four should pass (45 tests, no type, lint, or build errors).npm run devand open the printed URL (defaulthttp://localhost:5173) — the setup screen should show 24 named gallery images including the 10 animals, with gallery, preview, difficulty options, and start control all fitting without scrolling at 1280×800 and 1440×900.?debug=imageappended — all 24 assets should report ok at 1600×1200, and each animal should render recognizably as its animal.src/components/ImagePicker.tsxandsrc/index.cssfirst — the gallery registration and the grid and contrast styles are the core of the change.Code review
Reviewed the 10 new animal SVGs, the gallery/debug registrations, the CSS grid change, and the two new tests against the change's spec. All assets are 1600x1200, recognizable as their animals with distinct palettes and consistent flat-vector style, and both spec scenarios (gallery includes the animals; selecting one shows it in the preview) are covered by passing tests. I removed an out-of-scope window.__app debug harness from App.tsx (the proposal promises no API changes and no committed test uses it) and, from layout math, tightened gallery spacing and setup padding so the 25-tile setup screen fits 1280x800 without scrolling. Narrowed test run (3 files, 3 tests) passes and typecheck is clean.
Fixed before the commit
src/App.tsx:38: App.tsx added a global window.__app test/judge harness (state(), selectImage, setGrid, start) shipped in the production bundle. The proposal explicitly says 'no API changes', the spec delta and tasks do not ask for it, and no committed test references it (grep found it only in App.tsx). Reverted App.tsx to its pre-change state: original imports, no global Window declaration, no latest ref or effect. Typecheck and the app-shell test still pass.src/index.css:125: With the 5-column gallery, layout math put the setup screen at ~818px tall at 1280x800 (header ~90px + section heading ~32px + 5 rows of ~118px tiles + 64px of .setup padding), overflowing the 800px viewport by ~18px and breaking the existing 'setup screen fits viewport' requirement the proposal commits to keeping. Made the thumbnails slightly more compact (gallery gap 10px to 8px, .gallery-item padding 6px to 5px) and tightened .setup padding (24px/40px to 20px/28px), saving ~34px so the screen is estimated to fit at ~784px with ~16px of headroom; the visual check at 1280x800 and 1440x900 is the final arbiter.Tests
All 2 scenarios of
more-puzzle-images-animals-add-10-more-p-xgy8dghave a tagged test.The test lint recorded nothing in the run's tests.
Braid run
more-puzzle-images-animals-add-10-more-p-xgy8dg(34 steps).forgejo/workflows,.gitea/workflowsor.github/workflows); what only CI tests went unverifiedOpened by Braid.