Spaces:
Running
Running
Developer Log & Changelog
This document tracks the evolution of the "Introduction to Statistical Methods" interactive lesson.
v7.0: Architectural Simplification & Bug Fix
- Feature: Removed the KaTeX dependency entirely. All mathematical notation is now rendered using standard Unicode characters.
- Rationale: This change was prompted by a module resolution error related to aliased paths (
@/). Instead of a small patch, a larger architectural simplification was chosen to improve long-term maintainability. This eliminates an external dependency, simplifies the rendering logic, and makes the codebase lighter. - Implementation:
- Deleted the
KatexRenderer.tsxandTextWithMath.tsxcomponents. - Refactored
ContentRenderer.tsx,ContentPage.tsx, andQuiz.tsxto render strings directly, usingdangerouslySetInnerHTMLto preserve HTML formatting like<strong>. - Converted all TeX strings in
slides.tsto their Unicode equivalents (e.g.,$$\\hat{p}_1$$is nowp̂₁). - Removed unused KaTeX styles from
appStyles.ts.
- Deleted the
- Documentation: Updated the architecture and rendering protocol documents to reflect the new Unicode-based approach.
v6.0: Architectural Refactor & Cleanup
- Feature: A major architectural refactor focused on code quality, maintainability, and simplification.
- Rationale: To align the codebase with modern frontend best practices, making it more robust, scalable, and elegant. The goal was to clean the codebase, remove unused elements, and simplify data structures without altering pedagogical content.
- Implementation:
- Unified Data Structure: Refactored the
SlideDatainterface inslides.tsto use a single, unifiedcontentarray. Disparate fields likeparagraphs,listItems, andformulaswere replaced by an array of typedContentItemobjects (e.g.,{type: 'paragraph', text: '...'}). - Centralized Rendering Logic: Created a new
ContentRenderer.tsxcomponent. This component is now responsible for dynamically rendering thecontentarray, centralizing the display logic for paragraphs, lists, and formulas. - Component Simplification: Simplified the
ContentPage.tsxcomponent, turning it into a pure layout component that delegates all content rendering to the newContentRenderer. - Code Cleanup: Removed the unused
calculatorLabelsproperty from theSlideDatainterface and streamlined the rendering path inSlideRenderer.tsx.
- Unified Data Structure: Refactored the
- Documentation: Updated
docs/02_architecture.mdanddocs/03_rendering_protocol.mdto reflect the new, cleaner architecture.
v5.0: KaTeX Rendering Engine
- Feature: Migrated all mathematical notation rendering from simple Unicode to the powerful KaTeX library.
- Rationale: To provide professional, accessible, and high-quality mathematical typesetting, significantly improving the application's visual polish and academic credibility.
- Implementation:
- Added KaTeX library via CDN.
- Created a new
KatexRenderer.tsxcomponent to safely render TeX strings. - Created a new
TextWithMath.tsxcomponent to parse inline math (using a$$...$$delimiter) within paragraphs. - Converted all math content in
slides.tsto TeX syntax. - Updated all relevant components to use the new rendering system.
- Documentation: Overhauled
docs/03_rendering_protocol.mdto reflect the new KaTeX standard.
v4.0: Documentation Initiative
- Feature: Added a comprehensive
docs/folder to house all project documentation. - Content: Created new markdown files detailing the project's pedagogical framework (
01_pedagogy.md), technical architecture (02_architecture.md), and a developer log (04_developer_log.md). - Refactor: Migrated the mathematical rendering rules from the root
protocol.mdto a more organizeddocs/03_rendering_protocol.mdand removed the old file. This centralizes all documentation for easier maintenance.
v3.1: Final Synthesis
- Feature: Added a final "Key Takeaways" slide.
- Rationale: To bridge the gap between statistical theory and practical application. This slide explicitly explains how to interpret the confidence interval (especially regarding the value of zero) to make a meaningful, evidence-based conclusion. It serves as the capstone of the lesson.
v3.0: Pedagogy Overhaul
- Feature: The theoretical slides were completely rewritten to be more intuitive and narrative-driven.
- Rationale: The previous slides were too formula-focused. The new content adopts a "scaffolding" approach, introducing concepts with intuitive questions and plain-English explanations before showing the formulas. This builds a stronger conceptual understanding.
- Change: Replaced a dry review of formulas with a logical story that flows from a core question, through a "game plan," to a final synthesis.
v2.0: Active Learning Transformation
- Feature: Replaced the simple calculator with a multi-step Interactive Worksheet.
- Rationale: The original calculator did the work for the student. The new worksheet requires active participation, forcing students to apply the formulas themselves to better internalize the material.
- Change: The
Calculator.tsxcomponent was completely refactored to include input fields for each step of the calculation, a "Check My Work" button for immediate feedback, and a "Reset" function. The slide content was updated to introduce this new interactive element.
v1.1: Code Cleanup and Standardization
- Refactor: Removed all caching logic and associated files (
common/folder,useKatexCache.ts). - Rationale: To simplify the codebase and remove unused functionality.
- Standardization: Enforced a strict Unicode-only policy for all mathematical symbols. Replaced all hyphen-minuses (
-) in mathematical contexts with the proper Unicode minus sign (−, U+2212) for correctness and consistency. - Cleanup: Removed obsolete React v17 script tags from
index.html.
v1.0: Initial Implementation
- Feature: A functional slide-based learning module created from academic requirements.
- Components: Included a title page, content pages with formulas, a basic calculator, and a quiz.
- Tech: Built with React and TypeScript.