Fix: make timer visibility a user preference (exercises and reader)#998
Open
mircealungu wants to merge 1 commit intomasterfrom
Open
Fix: make timer visibility a user preference (exercises and reader)#998mircealungu wants to merge 1 commit intomasterfrom
mircealungu wants to merge 1 commit intomasterfrom
Conversation
Closes #965 - ExerciseSession: only show DigitalTimer when show_reading_timer preference is true (hidden by default) - ExerciseTypePreferences: add checkbox to toggle timer visibility, saved as 'show_reading_timer' preference to the API The reading timer toggle already existed in the reader toolbar (ToolbarButtons.js). This change ensures the preference is persisted server-side (requires API change in zeeguu/api) and that exercises also respect the preference.
✅ Deploy Preview for voluble-nougat-015dd1 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Member
Author
|
@claude show_reading_timer - we're using this preference for both exercises and reading. also, the exercises > audio preferences is a bad placement for "show timer" |
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
Closes #965
Timers in exercises and the reader are now hidden by default and controlled by a persistent user preference. Requires the API change in zeeguu/api#auto-fix/issue-965.
What was already there
useUserPreferences.jsalready definedshow_reading_timerandshowReadingTimer/updateShowReadingTimerArticleReader.jsalready conditionally rendersDigitalTimerbased onshowReadingTimerToolbarButtons.jsalready has an inline toggle in the reader toolbarWhat was missing (this PR fixes)
Commit 1 — core fix:
ExerciseSession.js: wrapDigitalTimerin{userPreferences?.["show_reading_timer"] === "true" && ...}so exercises also respect the preference (was always visible before)ExerciseTypePreferences.js: add a "Show activity timer in reader and exercises" checkbox that loads the preference on mount and saves it viaapi.saveUserPreferencesThe timer is off by default — users who want it can enable it in Settings → Exercises → Audio & Pronunciation.
To discuss this fix, find this session at https://claude.ai/code