Commit graph

10488 commits

Author SHA1 Message Date
Jarrett Ye
742b7a7daa Fix first_rating_count & learn_cost (#2688)
* fix first_rating_count & learn_cost

* Update CONTRIBUTORS

* cargo clippy --fix

* cargo fmt
2023-09-27 18:31:40 +10:00
Damien Elmes
b6039b583f Update translations 2023-09-27 16:37:37 +10:00
Damien Elmes
0530027ec9 Tweak some wordings 2023-09-27 16:37:03 +10:00
Damien Elmes
f1e8f171d4 x% complete 2023-09-27 16:24:25 +10:00
Damien Elmes
170d0c737d Use revlog to determine days_elapsed when studying/for card info
Currently prop searches and the retrievability column will continue to
derive the days from the card only, as it's difficulty to integrate revlog
upgrade lookups into those code paths, especially in a performant way.
One possible way we could solve this in the future is to store last_review_day
in the card data, so we can know it even if the due date has been shifted.
Check DB could fill it in for existing cards.
2023-09-27 16:17:47 +10:00
Damien Elmes
68d4878d55 Fix days_since_last_review() when used in filtered deck 2023-09-27 16:17:47 +10:00
Michael Eliachevitch
e6088c46e3 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
Abdo
97bd06dc49 Implement "stop timer on answer" as a preset option (#2686)
* Implement "stop timer on answer" as a preset option

* Hide timer setting on AnkiMobile (dae)
2023-09-27 16:10:14 +10:00
Damien Elmes
c9b35c4fc6 Update FSRS; fix handling of invalid revlogs
State is now inferred from SM-2 data when the revlog is not suitable
2023-09-27 13:13:10 +10:00
Damien Elmes
a82021cb05 Fix invalid utf-8 in tags 2023-09-27 10:06:31 +10:00
Damien Elmes
676c5bb3ce Fix optimal retention caps 2023-09-26 14:17:55 +10:00
Damien Elmes
02d6420893 Fix weight computation progress not showing 2023-09-26 14:02:12 +10:00
Michael Eliachevitch
e226f74e42 More sensible lower FSRS progress indicator precision (#2684)
It's very helpful having a sub-permille precision in a progress
indicator, percent-precision or at most a tenth of a percent should be
sufficient for any indicator.

But in particular the compute-retention progress has 10 steps, i.e. the progress
increases in 10%-intervals (10%, 20%, ...), it *cannot* have sub-decimal
progress-percentages, see 2d5b19b494/src/optimal_retention.rs (L365-L368). So there integer percents should be
enough, everything else is misleading.

The compute-weights progress is currently (as of beta-2) not showing up at all.
Maybe if the bug is fixed it can show sub-percent percentages, so for know I changed that
to 0.1% precision. But I think integer percentages should be fine here as well,
so upon request I can fix that.

Also see my comment on this problem in https://forums.ankiweb.net/t/anki-23-10-beta/34912/39.
2023-09-26 14:01:05 +10:00
Abdo
da4d6f547c Match IO extensions in a case-insensitive manner (#2683) 2023-09-26 13:14:59 +10:00
Abdo
babce8ec8c Fix wrong mask position after merging groups (#2682) 2023-09-26 13:14:13 +10:00
Damien Elmes
3a6dd627d7 Allow desired retention to be set to 0.7
https://github.com/open-spaced-repetition/fsrs-rs/issues/79#issuecomment-1733779005
2023-09-26 13:03:49 +10:00
Damien Elmes
189b4f51d6 Fix changes_since_open() 2023-09-26 11:02:16 +10:00
Damien Elmes
a5fff918ec Don't show multiple cancel buttons 2023-09-25 16:40:11 +10:00
Damien Elmes
35bcfa8679 Fix cancel signal being ignored if sent quickly 2023-09-25 16:32:12 +10:00
Damien Elmes
7f787a0e62 Prohibit weight generation when reps < 1000 2023-09-25 16:17:00 +10:00
Damien Elmes
e9f6d181ed Allow cards with no learning history when not training 2023-09-25 15:57:35 +10:00
Damien Elmes
790644de66 UI tweaks
https://forums.ankiweb.net/t/anki-23-10-beta-1/34912/19
2023-09-25 15:54:18 +10:00
Damien Elmes
620a55c6e5 Support retrievability calculation for (re)learning cards 2023-09-25 14:58:39 +10:00
Damien Elmes
105addfa0d Fix extract_fsrs_retrievabilty()
- Need to use fuzzed interval to accurately determine elapsed days
- saturating_sub on an i32 is not useful
2023-09-25 14:40:44 +10:00
Damien Elmes
098fad213c Cap optimal retention simulation to 10 years 2023-09-25 14:34:26 +10:00
Damien Elmes
0fa67a717f Expose deck-then-random option in UI 2023-09-25 11:12:28 +10:00
Damien Elmes
681d561a98 Expose memory state computation to Python
Closes #2676
2023-09-25 11:05:47 +10:00
Damien Elmes
6d3685ce65 Include v2 scheduler in "no longer supported" message 2023-09-25 09:39:59 +10:00
Damien Elmes
c6df1e5fe7 Fix entire collection being used to calculate weights 2023-09-24 19:42:50 +10:00
Damien Elmes
84cf4349a3 QtQml was also required 2023-09-24 16:42:26 +10:00
Damien Elmes
3bc97a1beb Update Qt for Mac bundle 2023-09-24 16:24:11 +10:00
Damien Elmes
d3b8092b51 Update translations 2023-09-24 14:31:12 +10:00
Damien Elmes
dc6aeafeff Strip out v1/v2 code 2023-09-24 14:27:40 +10:00
Damien Elmes
921416a263 Enable new exporter by default 2023-09-24 13:10:16 +10:00
Damien Elmes
48f643485c Use memory state to calculate relative overdueness 2023-09-24 13:07:11 +10:00
Damien Elmes
bdeca36234 When calculating retrievability, use stability instead of fuzzed interval 2023-09-24 12:53:05 +10:00
Damien Elmes
fc83f8d3cc Support fetching new cards by deck then random note
https://forums.ankiweb.net/t/feature-request-option-for-new-card-gather-order-that-prioritizes-subdecks-closer-to-top-but-gathers-cards-randomly-from-each-subdeck/23178
2023-09-24 11:54:10 +10:00
Damien Elmes
d2a00948ef Use FSRS difficulty when sorting by ease 2023-09-23 16:20:36 +10:00
Damien Elmes
57941e499a Allow extracting desired retention 2023-09-23 16:11:35 +10:00
Damien Elmes
af171c96d7 Gate graph display on fsrs status 2023-09-23 15:59:02 +10:00
Damien Elmes
0b84905c85 Avoid excessive floating point precision when serializing 2023-09-23 15:50:10 +10:00
Damien Elmes
3d59a0eebe Store desired retention in card data
If we want to be able to factor the desired retention into a sort based
on relative overdueness, having the values accessible on the card makes
things easier.
2023-09-23 15:42:42 +10:00
Damien Elmes
0f899efea7 Convert FSRS to a global option
Allowing some decks to be FSRS and some SM-2 will lead to confusing
behavior when sorting on SM-2 or FSRS-specific fields, or when moving
cards between decks.
2023-09-23 14:41:55 +10:00
Damien Elmes
d98a7e7551 Add warning about all clients needing to support FSRS 2023-09-23 14:05:28 +10:00
Damien Elmes
f0802da152 Update FSRS 2023-09-23 14:05:28 +10:00
Abdo
6f0d76d647 Support Qt.TextFormat.MarkdownText in aqt.utils (#2675) 2023-09-23 14:04:25 +10:00
Abdo
a3c7a07a96 Add an option to stop the timer on answer (#2673)
* Add an option to stop the timer on answer

* Fix tab order
2023-09-23 14:01:03 +10:00
Damien Elmes
318a729ef3 Clear internal field after pasting
https://forums.ankiweb.net/t/copy-paste-of-screenshots-dont-work-once-i-copy-the-text-on-the-anki-app/34839
2023-09-22 13:05:52 +10:00
Abdo
df8b439200 Skip template checks in Fields screen (#2670) 2023-09-20 16:09:54 +10:00
Abdo
1d07731549 Fix error when closing Find Duplicates screen early (#2669) 2023-09-20 16:03:46 +10:00