Skip to content

Fix: make timer visibility a user preference (exercises and reader)#998

Open
mircealungu wants to merge 1 commit intomasterfrom
auto-fix/issue-965
Open

Fix: make timer visibility a user preference (exercises and reader)#998
mircealungu wants to merge 1 commit intomasterfrom
auto-fix/issue-965

Conversation

@mircealungu
Copy link
Copy Markdown
Member

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.js already defined show_reading_timer and showReadingTimer/updateShowReadingTimer
  • ArticleReader.js already conditionally renders DigitalTimer based on showReadingTimer
  • ToolbarButtons.js already has an inline toggle in the reader toolbar

What was missing (this PR fixes)

Commit 1 — core fix:

  • ExerciseSession.js: wrap DigitalTimer in {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 via api.saveUserPreferences

The 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

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.
@netlify
Copy link
Copy Markdown

netlify bot commented Mar 30, 2026

Deploy Preview for voluble-nougat-015dd1 ready!

Name Link
🔨 Latest commit d3c8f10
🔍 Latest deploy log https://app.netlify.com/projects/voluble-nougat-015dd1/deploys/69ca4ef46dea53000850e566
😎 Deploy Preview https://deploy-preview-998--voluble-nougat-015dd1.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@mircealungu
Copy link
Copy Markdown
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"

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.

timers being shown in exercises and reader should be a preference setting somehwere.

2 participants