Skip to content

1.16 part 6/18: Games: shelf, bar, rooms and the shared kits - #177

Closed
epheterson wants to merge 1 commit into
line/1.16.0-05-reader-offlinefrom
line/1.16.0-06-games-shell
Closed

epheterson wants to merge 1 commit into
line/1.16.0-05-reader-offlinefrom
line/1.16.0-06-games-shell

Conversation

@epheterson

@epheterson epheterson commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Part 6 of 18 of Zimi 1.16.0: Games: shelf, bar, rooms and the shared kits. Base: line/1.16.0-05-reader-offline (part 5); the diff shows only this part's files. The PR carries the not-a-release label and the version stays 1.15.7, so merging it cuts no release. Merge in order (1 to 17, then 18) with a merge commit, not a squash.

What this is

The ZimiGames shelf, the shared bar and menu, the new Rooms, and the shared kits that every game page loads. It also lists the 25 games whose pages land in parts 7 and 8, and makes the shelf's card (zimi/gamelinks.py) follow Zimi's language. Later parts build on this shell.

What changes

  • shell.js: Rooms are defined once (All, Kids, Arcade, Night, Solo), each with a name key, a filter over games.json, a favorites list and a light and a dark token set. The room is kept in the page hash (#lang=fr&room=kids), so Back and a bookmark return to it, and a game opened from a tile carries it.
  • shell.js: fillKiwixViewer sizes the game's frame to the bottom of the window inside a real kiwix-serve viewer, which leaves a white strip when its toolbar slides away.
  • shell.js: followRed follows the shell's Red night theme (zimi_app_theme; absent in Kiwix); a long stat goes on a second line; a card sound is added; the haptic buzz waits for a tap; the How to play pane has one shape for every game.
  • shelf.js and recent.js: the shelf opens on the table, then World favorites, then a Featured row (featuredPicks: a seeded pick by day, half from the newest third of games.json), then the rest. A room filters each row and drops an empty one. recent.js retries games.json and draws the table and World favorites without waiting for it.
  • recent.js: mouseRow (chevrons and a sideways wheel) and mouseDrag (press and drag, with the click that ends a drag swallowed) make the rows usable with a mouse.
  • games.json: 25 rows added, each with added: "1.16". build_games_shelf.js and games_tile_art.js draw their tile art.
  • games.css: styles for rooms, the table and the mouse rows; board.css, boardui.css, play.css, passkit.css and roundkit.css carry small matching edits.
  • handoff.js: the Players rows remember the chosen seat kinds at once (chooseKind); the live game takes them at the next deal.
  • text.js and text/<lang>.json (ten languages): the games' string table behind T(); the JSON is reindented, so nearly every line shows as changed. thumbs/*.svg: shelf art for the 25 new games and redrawn art for card games.
  • gamelinks.py: _card and day_card take a language and use the games' own title, why and blurb strings where they exist; almanac_3d_links and almanac_view give an article its Almanac 3D view address from a closed Q-ID set read once from static/earth.
  • zimihome.js is deleted; index.html adds a util.js script tag and carries the new tile sprites; zimi.txt renames the ZIM's title to "Zimi Games".

How to review

  • Start with shell.js (ROOMS, roomCss, roomOfPage, followRed, fillKiwixViewer): a room only swaps custom properties and no game's CSS names a room. Then recent.js (mouseDrag, featuredPicks, rowsWithRetry) and gamelinks.py (almanac_3d_links).
  • Risk: mouseDrag must not swallow a real click or break touch; rowsWithRetry must stop after its tries; almanac_view runs on the article-link request path (http.py) and does a Q-ID lookup per call.
  • Skip: the inline sprite and tile SVG in index.html, the tile bodies in build_games_shelf.js, text/*.json, thumbs/*.svg and the games.json rows are data. The shelf tiles are made by scripts/build_games_shelf.js.
  • The served Games ZIM between parts 6 and 10 is the previous build; the source folder is ahead of it. The built ZIM lands once, in a commit of its own on top of part 10.
  • Rides here: tests/test_ownzims.py asserts on the ZIM title "Zimi Games"; its freshness check now runs only when ZIMI_OWN_ZIMS_FRESH is set (CI sets it for a PR into main). The Almanac page still loads zimihome.js until part 12.

Tests

  • Rooms: test_games_rooms_theme.py holds every room's text pairs to WCAG AA from the token values; test_games_rooms_theme_browser.py (browser) drives the rooms, hash and Back.
  • Shelf rows: test_games_rows_mouse_browser.py, test_games_one_grid.py, test_games_menu_grid.py, test_games_catalog_polish.py, and the node test_games_recent.cjs cover the mouse rows, the Featured row and the table.
  • Bar and sheets: test_games_bar_stable.py, test_games_bar_title_browser.py, test_games_dock_browser.py, test_games_finished_reload_browser.py, test_games_pa_menu.py.
  • Language: test_games_follow_language.py and test_games_text_vars.py (every {placeholder} has a value at its call site).
  • Persistence and links: test_games_persist_browser.py, test_games_learn_more.py, test_games_library_more.py, test_games_markers_browser.py.
  • Most of these files are browser tests and run in the whole matrix, not this PR's quick tier.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@epheterson epheterson added the not-a-release Ships nothing; CI skips the version check label Nov 23, 2026
@sourcery-ai

sourcery-ai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Sorry @epheterson, your pull request is larger than the review limit of 150,000 diff characters

@epheterson epheterson mentioned this pull request Nov 23, 2026
@epheterson
epheterson force-pushed the line/1.16.0-05-reader-offline branch from 8d887d4 to f2b5371 Compare November 23, 2026 10:07
@epheterson
epheterson force-pushed the line/1.16.0-06-games-shell branch from a62cf60 to 466db92 Compare November 23, 2026 10:07
@epheterson
epheterson force-pushed the line/1.16.0-05-reader-offline branch from f2b5371 to a580fe5 Compare November 23, 2026 10:51
@epheterson
epheterson force-pushed the line/1.16.0-06-games-shell branch from 466db92 to 5ecfc10 Compare November 23, 2026 10:51
@epheterson
epheterson force-pushed the line/1.16.0-05-reader-offline branch from a580fe5 to 7099487 Compare November 23, 2026 16:37
@epheterson
epheterson force-pushed the line/1.16.0-06-games-shell branch from 5ecfc10 to 5d1459a Compare November 23, 2026 16:37
@epheterson
epheterson force-pushed the line/1.16.0-05-reader-offline branch from 7099487 to f6877ee Compare November 23, 2026 16:44
@epheterson
epheterson force-pushed the line/1.16.0-06-games-shell branch from 5d1459a to 77c8a8e Compare November 23, 2026 16:44
@epheterson

Copy link
Copy Markdown
Owner Author

Reviewed here; included in the release PR #189.

@epheterson epheterson closed this Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

not-a-release Ships nothing; CI skips the version check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant