-
Notifications
You must be signed in to change notification settings - Fork 0
adding grade's passage documentation to the app #1
Copy link
Copy link
Open
Description
Track: Curriculum Integration
Overview
This feature integrates the HEMA curriculum documents (extracted as images from PDFs) into the application. It allows users to browse and read the "Passage de Grade" requirements directly within the tool, replacing the main training area when active.
Functional Requirements
- Sidebar Navigation: Add a new "Curriculum" tab or section to the settings sidebar.
- Grade & Document Selection: Users can select the Grade Level (e.g., Niveau 1.1) and specific documents from the sidebar.
- Document Visualisation: When a document is selected, the central training circle is replaced by the document viewer (displaying the extracted JPEG pages).
- Page Navigation:
- Visual Buttons: "Previous" and "Next" buttons in the UI.
- Keyboard Shortcuts: Use Left and Right arrow keys to flip pages.
- Training Interruption: Opening the curriculum view automatically pauses any active training sequence (
SequenceState.running = false).
UI Design
- Main View Replacement: The document page (JPEG) should scale to fill the primary training area (the left side of the screen) while maintaining its aspect ratio.
- Sidebar Integration: Navigation controls for grades, documents, and page numbers integrated into the right-hand settings panel.
Acceptance Criteria
- Users can browse all grade levels found in
assets/Grades Escrime. - Selecting a document successfully loads and displays the first page.
- Page navigation (Prev/Next) works via UI buttons and keyboard arrows.
- Opening the curriculum pauses the trainer.
- Transitioning back to "Training" restores the training circle.
Out of Scope
- Native PDF/DOCX rendering (using extracted images instead).
- Video playback for curriculum videos (only documents are integrated in this track).
- Full-screen modal overlay (using main area replacement instead).
Implementation Plan: Curriculum Integration
Phase 1: Data Structures and State
- Task: Define
CurriculumStateresource insrc/resources.rsto track visibility, selected grade/document, and current page. - Task: Create a static
CurriculumManifestinsrc/constants.rsmapping theassets/Grades Escrimefolder structure. - Task: Implement TDD for
CurriculumStateinitialization and basic state transitions insrc/resources_test.rs. - Task: Conductor - User Manual Verification 'Phase 1: Data Structures and State' (Protocol in workflow.md)
Phase 2: Sidebar UI Integration
- Task: Add a "Curriculum" tab/button to the settings sidebar in
src/ui/settings.rs. - Task: Implement logic to toggle
CurriculumState.is_visibleand pause training when opened. - Task: Add dropdowns/buttons for selecting Grade and Document within the sidebar.
- Task: Write tests for sidebar interaction and state synchronization in
src/ui/setup_test.rsor a newsrc/ui/settings_test.rs. - Task: Conductor - User Manual Verification 'Phase 2: Sidebar UI Integration' (Protocol in workflow.md)
Phase 3: Main View Replacement & Navigation
- Task: Create
src/ui/curriculum.rsto handle the document viewer UI logic. - Task: Implement a system to swap the Training Circle with the Document Image when curriculum is active.
- Task: Add "Previous" and "Next" page navigation buttons to the sidebar or a bottom overlay.
- Task: Map Left/Right arrow keys to page navigation in
src/logic.rsorsrc/ui/systems.rs. - Task: Write tests for page navigation logic and image loading in a new
src/ui/curriculum_test.rs. - Task: Conductor - User Manual Verification 'Phase 3: Main View Replacement & Navigation' (Protocol in workflow.md)
Phase 4: Dynamic Asset Loading
- Task: Implement a system to dynamically load all
page-XX.jpghandles for a selected document intoCurriculumState.pages. - Task: Ensure smooth transitions between pages with proper asset handle management.
- Task: Verify that switching back to "Training" correctly restores the training circle and sequence logic.
- Task: Conductor - User Manual Verification 'Phase 4: Dynamic Asset Loading' (Protocol in workflow.md)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels