Skip to content

feat: reading torah view#3184

Open
akiva10b wants to merge 1 commit intomasterfrom
reading-buddy
Open

feat: reading torah view#3184
akiva10b wants to merge 1 commit intomasterfrom
reading-buddy

Conversation

@akiva10b
Copy link
Copy Markdown
Contributor

This pull request introduces a new "Reading Mode" feature for kriya (practice) that enables word-level highlighting and speech-driven progression through Hebrew text. It includes a toggle in the display options, new context and provider logic for tracking reading state, and UI changes to highlight words as they are read aloud. The main changes are grouped below:

Reading Mode Core Functionality:

  • Added a new ReadingModeProvider context (static/js/useReadingMode.js) that tracks segment registration, manages a flat list of Hebrew words, and updates the current word index based on speech recognition input. This enables real-time word-level highlighting as users read aloud.
  • Created a ReadingModeText component (static/js/ReadingModeText.jsx) that renders Hebrew text word-by-word, applying visual state ("unread", "current", "read") for each word based on reading progress.

UI Integration and Display:

  • Integrated the Reading Mode toggle into the ReaderDisplayOptionsMenu, showing it when Hebrew text with nikud is available, and connected it to the new context. [1] [2] [3]
  • Updated ReaderPanel to wrap text columns with the ReadingModeProvider and pass the reading mode state and highlighted refs. [1] [2] [3] [4]
  • Modified TextRange and TextSegment to render Hebrew text using ReadingModeText when reading mode is active, and to ensure updates when the reading mode setting changes. [1] [2] [3] [4] [5] [6]

Styling:

  • Added new CSS classes for word-level highlighting in reading mode, including theme-specific styles for current, unread, and sepia/dark modes.

These changes collectively enable an interactive, speech-driven kriya reading experience with clear visual feedback for users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant