Skip to content

Save clock tool's last used time preference#3405

Open
dev-shady wants to merge 5 commits into
lichess-org:mainfrom
dev-shady:clockToolLastTimeSave
Open

Save clock tool's last used time preference#3405
dev-shady wants to merge 5 commits into
lichess-org:mainfrom
dev-shady:clockToolLastTimeSave

Conversation

@dev-shady

@dev-shady dev-shady commented Jun 29, 2026

Copy link
Copy Markdown

Closes #3394

  1. Created a new clock tool preferences file as there wasn't already.
  2. Earlier 10sec was the fixed value used so kept same as the default config value.
  3. The UI is rendered by the state driven by ClockToolController. hence let it read the default value from preferences in build().
  4. updateOptions and updateOptionsCustom of ClockToolController are the only two methods that update the clock tool state, so updated them to write to the prefs as well.

Note: There are two separate ingresses (inputs) for time change for the two clocks and one ingress for common change. Check attached video for clarity . But right now I have only kept a single field to drive default values of both through it. Meaning you can change one clock to be say 10 mins and other clock to be 5 mins and play but right now, only the last updated value will be used as the default value. We can keep separate defaults for the two clocks as well but need confirmation on the UX before doing it.

Video:

Recording_2026-06-29-08-47-53_1.mp4

@dev-shady

Copy link
Copy Markdown
Author

@veloce need your review and inputs.

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.

[Feature Requests] clock tool: remember last time selection

1 participant