Anki/ts/deck-options
Michael Eliachevitch 2580399552
Button to set desired FSRS retention to optimal/calculated (#2685)
* Draft set optimal/calculated retention button

Temporarily save the calculated optimal retention and display it with a button
that sets the desired retention above to this value.Don't show button until
attention had been calculated. Disable button when optimal and desired
attention are equal.

I find this nicer than the current alert-popup solution, as it avoids a popup
and gives a choice to the user to accept the calculated retention or not, while
also persisting the calculated retention on the screen for a bit.

TODO: What's still missing is that the `optimalRetention` variable is global and
persists when I change presets. When changing presets the variable should reset to
`undefined`, which would also makes the button disappear. Ideally it should also
disappear when changing the FSRS parameters. So probably it should be made part
of some deck options state and subscribe to some events. But with that I might
need some help. Also I thought whether that variable should go into the deck
options schema but tbh it's not something we want to persist between sessions,
users should recalculate it.

* Add me to contributors for tests so pass

* Add formatting ant type fixes to make tests pass

* Minor fixes (dae)

* Remove the period
2023-09-27 16:12:49 +10:00
..
Addons.svelte
AdvancedOptions.svelte
AudioOptions.svelte
BuryOptions.svelte
CardStateCustomizer.svelte
choices.ts
ConfigSelector.svelte
DailyLimits.svelte
deck-options-base.scss Add scss formatter 2023-07-03 09:44:38 +10:00
DeckOptionsPage.svelte
DisplayOrder.svelte
FsrsOptions.svelte Button to set desired FSRS retention to optimal/calculated (#2685) 2023-09-27 16:12:49 +10:00
HtmlAddon.svelte
icons.ts
index.ts
LapseOptions.svelte
lib.test.ts
lib.ts
NewOptions.svelte
SaveButton.svelte Experiment with disabling prettier whitespace sensitivity 2023-06-01 11:11:26 +10:00
SpinBoxFloatRow.svelte
SpinBoxRow.svelte
steps.test.ts
steps.ts
StepsInput.svelte
StepsInputRow.svelte
TabbedValue.svelte
TextInputModal.svelte
TimerOptions.svelte
tsconfig.json
Warning.svelte
WeightsInput.svelte
WeightsInputRow.svelte