show surrounding text context on manual pause and fix programmatic pause loop#14
Open
fran-jag wants to merge 3 commits intothomaskolmans:mainfrom
Open
show surrounding text context on manual pause and fix programmatic pause loop#14fran-jag wants to merge 3 commits intothomaskolmans:mainfrom
fran-jag wants to merge 3 commits intothomaskolmans:mainfrom
Conversation
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.
Description
This PR enhances the reading experience by providing surrounding text context whenever the user
manually pauses the reader. It also includes a fix for the "Pause every N words" feature
and adds a new setting to toggle the context view.
Key Changes
60 words of context (previous and next) around the current word.
word while providing broader situational awareness.
readable "paragraph" feel during breaks.
interface.
to "flash/stuck" because the pause trigger was checked before the word index was incremented.
the reading rhythm for automated breaks.
paused context is active to prevent word duplication on screen.
layout.
Technical Details
src/App.svelte: Introduced isManualPause state to distinguish between user-triggered pausesand automated ones. Updated derived states for contextBefore and contextAfter.
src/lib/components/RSVPDisplay.svelte: Updated CSS and template logic to handle flexiblecontainer heights and multi-line text wrapping when showContext is active.
src/lib/components/Settings.svelte: Expanded the UI to include the new toggle.Testing Performed