Repository navigation
Implement "Paper & Ink" printer UI theme with animated paper roll - #29
Merged
Merged
Conversation
The whole UI is rebuilt around one metaphor: the screen is a printer with an unlimited tractor-feed paper spool. Cards are printed — each line of content is a line feed, each new card a page feed past a dashed perforation, and undo visibly rewinds the roll. Ratings stamp the card in ink before it feeds away, the session summary prints as a till receipt with dot leaders and a stamped headline, the child start screen is the day's job ticket, and the calendar becomes printed month sheets that page-feed on month change. - new cardbrick/paperroll.py: headless-testable spool geometry — a deque of pre-rendered line surfaces, eased scroll offset, staggered line-feed release, page bookkeeping for rewind, and pruning so the "unlimited" roll never grows unbounded. Cheaper than the old code, which re-rendered every text surface every frame. - Paper & Ink palette (warm paper, ink, pencil, one vermillion accent) under the existing constant names; sprocket strips whose punched holes ride with the roll; button hints move onto a dark chassis bar. - menus/parent screens: selection is a vermillion margin marker plus ink underline instead of the "> " colour-swap cursor. - golden rule: every feed is interruptible — any input snaps it to its end state first — and a new reduced_motion setting disables feeds. - tests/test_paperroll.py covers feed/stagger/finish/rewind/prune. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018GvLQKKGsRbsYdcrTZfGQ4
# Conflicts: # cardbrick-py/cardbrick/app.py
- Ignore .DS_Store files throughout the repo - Ignore local .apkg deck files under cardbrick-py - Ignore local cardbrick-py/mise.toml tool config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Redesigns the entire visual theme from a dark modern interface to a "Paper & Ink" metaphor where the screen is a printer with an unlimited paper spool. Content is "printed" with animated line feeds, page feeds past perforations, and rewind animations for undo. Introduces the
PaperRollclass to manage the printing animation system.Key Changes
New
PaperRollclass (paperroll.py): Manages a one-dimensional spool of pre-rendered content with eased animations. Supports:Color palette overhaul: Replaced dark theme with warm paper tones:
Review screen refactored: Content is now pre-rendered and fed to the roll instead of drawn every frame:
Child start screen: Now uses animated paper roll with a printed "job ticket" showing the day's practice goals, deck/category info, and sprint status
Menu system updated: Deck and category selection screens use new
_menu_row()helper with consistent stylingNew helper methods:
_new_roll(): Creates a PaperRoll instance_paper(): Fills background with paper color and draws sprocket strips_draw_roll(): Renders the visible portion of the roll_page_header(): Prints a page title and subtitle_menu_row(): Renders a menu item with selection highlight_stub_surface(): Creates a receipt-style header with left/right text_rule_surface(): Renders a horizontal divider line_stamp_surface(): Creates an ink-stamp effect for ratings_render_highlight_line(): Renders text with word highlighting (for vocab examples)Settings: Added
reduced_motionsetting to disable animationsTests: Comprehensive headless tests for PaperRoll geometry and animation logic
Implementation Details
https://claude.ai/code/session_018GvLQKKGsRbsYdcrTZfGQ4