Commit Graph

1875 Commits

Author SHA1 Message Date
Damien Elmes
ae6a03942f Check video tags in media check
https://forums.ankiweb.net/t/video-tag-does-not-recognize-the-source-file-in-check-media/36850/2
2023-11-08 14:00:41 +10:00
Damien Elmes
82aaa913a6 Change color of info box depending on retention; increase limit to 0.99
Closes #2803
2023-11-07 13:05:43 +10:00
Damien Elmes
9268dce707 Expose fuzz delta for FSRS add-on 2023-11-06 12:27:53 +10:00
Damien Elmes
59acde45a1 Remove redundant FSRS revlog code
Closes https://github.com/open-spaced-repetition/fsrs-rs/issues/113
2023-11-06 09:44:07 +10:00
Damien Elmes
fb05e430c0 Handle stability < 0.5 in stability graph 2023-11-05 13:44:39 +10:00
Gustaf-C
e071fb471b
Allow creation of empty filtered decks (#2788)
* Add new button to UI

* Add bool to allow creating empty filtered in back end

* Implement logic into front end for passing on bool

* Hide option on old decks

* Show option again if any settings are changed

* Revert "Show option again if any settings are changed"

This reverts commit 094acd9c65936823fa206594da5c1f3e4eb09248.

* Revert "Hide option on old decks"

This reverts commit d20a9a240b4fd85d080e8cc52d94318416ca753f.

* Update string

* Update ftl/core/decks.ftl

---------

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2023-11-05 12:23:14 +10:00
Damien Elmes
987c1825a6 Fix panic when enabling FSRS with add-on-rescheduled cards
https://forums.ankiweb.net/t/error-upon-fsrs-activation-on-anki-23-10/36488
2023-11-03 10:07:47 +10:00
RumovZ
feaaaa230a
Time out after 60s when checking URLs (#2785) 2023-11-01 07:46:49 +10:00
Damien Elmes
eda564ed59 Fix D/R graphs excluding values of 1.0
Closes #2783
2023-10-29 07:45:10 +10:00
Damien Elmes
f934bc2cf3 Fix sm2_retention getting reset on downgrade/sync 2023-10-28 14:45:24 +10:00
Damien Elmes
3ebc6ac68a Expose method to check for v2 as well 2023-10-27 02:47:04 +10:00
Damien Elmes
633d246306 Don't lock collection while generating TTS 2023-10-26 11:45:17 +10:00
Damien Elmes
ceb8a4ac20 Revert "Use scheduling flag instead of checking revlog when importing decks (#2730)"
This reverts commit e1e0f2e1bd.

The previous change breaks the assumption on this line:

                DeckKind::Filtered(_) => unreachable!(),

This will likely need a bigger refactor to handle this properly, and separate
out importing of deck configs from other scheduling data.
2023-10-26 11:23:24 +10:00
Damien Elmes
35be9a70da Add public method to determine if v3 is enabled 2023-10-25 11:41:05 +10:00
Abdo
14940a617b
Fix IO groups breaking upon editing (#2766)
* Fix IO groups breaking upon editing

* Emit change signal after group/ungroup
2023-10-23 09:43:31 +10:00
Damien Elmes
9bbc6c9405 Add image occlusion to stock notetypes 2023-10-22 11:00:39 +10:00
Aristotelis
26b2ac4ee3
Add ordinals to IO clozes (#2763)
Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-22 10:52:22 +10:00
Damien Elmes
3bfd828503 Fix browser query not matching stats
- Round instead of floor when binning
- Account for rounding in search

https://forums.ankiweb.net/t/anki-23-10-release-candidate/35967/4
2023-10-21 12:00:43 +10:00
Damien Elmes
7942487593 "Notetype" -> "Note Type" in browser column
While we may want to update things in the other direction in the future
(https://github.com/ankitects/anki/pull/1456#issuecomment-951767922),
this is more consistent with the existing other strings

Closes #2754
2023-10-21 11:35:30 +10:00
Gustaf-C
4b6aadfe62
Tweak browser column labels to card type, note type (#2751)
* Tweak browser column labels to card type, note type

* Apply suggestions from code review
2023-10-20 12:46:09 +10:00
Aristotelis
c828a2eb6f
Add APIs for IO card rendering (#2739)
* Refactor: Add index to shapes package

* Add shape draw callback API to setupImageCloze

* Expose IO drawing API, switch away from image cloze naming

We currently use "image occlusion" in most places, but some references to "image cloze" still remain. For consistency's sake and to make it easier to quickly find IO-related code, this commit replaces all remaining references to "image cloze", only maintaining those required for backwards compatibility with existing note types.

* Add cloze ordinal to shapes

* Do not mutate original shapes during (de)normalization

Mutating shapes would be a recipe for trouble when combined with IO API use by external consumers.

(makeNormal(makeAbsolute(makeNormal())) is not idempotent,
and keeping track of the original state would introduce
additional complexity with no discernible performance benefit
or otherwise.)

* Tweak IO API, allowing modifications to ShapeProperties

* Tweak drawShape parameters

* Switch method order

For consistency with previous implementation

* Run Rust formatters

* Simplify position (de)normalization

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-20 09:36:46 +10:00
Sam Waechter
0e24532439
Trim extra colons on conversion to NativeDeckName (#2748)
This fixes issue #2692. Leading/trailing colons are remove along with whitespace so " : : :foo:bar: : : " becomes "foo:bar"
2023-10-19 13:42:57 +10:00
Abdo
bba67fdab4
Fix misleading warning when changing notetype from/to cloze (#2744) 2023-10-18 16:50:32 +10:00
Damien Elmes
39bf2f2160 Update to latest fsrs 2023-10-18 09:03:23 +10:00
Damien Elmes
72e57456ce Fix stuttering in FSRS progress display 2023-10-14 14:03:20 +10:00
Abdo
5cde4b6941
Remove v1/v2 support from the backend (#2727)
* Remove v1/v2 support from deck list

* Remove v1/v2 support from most routines and show error

* Remove scheduler_version from preferences

* Fix formatting

* Remove v1/v2 conditionals from Python code

* Fix legacy importer

* Remove legacy hooks

* Add missing scheduler checks

* Remove V2 logic from deck options screen

* Remove the review_did_undo hook

* Restore ability to open old options with shift (dae)
2023-10-14 10:50:59 +10:00
Damien Elmes
e1e0f2e1bd
Use scheduling flag instead of checking revlog when importing decks (#2730)
Closes #2714
2023-10-14 10:30:20 +10:00
Damien Elmes
003cdfd2ec Use sm2 retention when deriving memory state
Closes #2702
2023-10-13 10:37:35 +10:00
Abdo
9e147c6335
Add text tool to image occlusion (#2705)
* Add text tool to IO

* Remove unnecessary parentheses

* Fix text objects always grouped

* Remove log

* Fix text objects hidden on back side

* Implement text scaling

* Add inverse text outline

* Warn about IO notes with only text objects

This will result in a different error message than the case where no
objects are added at all though, and the user can bypass the warning.
Maybe this is better to avoid discarding the user's work if they have
spent some time adding text.

* Add isValidType

* Use matches!

* Lock aspect ratio of text objects

* Reword misleading comment

The confusion probably comes from the Fabric docs, which apparently need updating: http://fabricjs.com/docs/fabric.Canvas.html#uniformScaling

* Do not count text objects when calculating current index

* Make text objects respond to size changes

* Fix uniform scaling not working when editing

* Use Arial font

* Escape colons and unify parsing

* Handle scale factor when restricting shape to view

* Use 'cloned'

* Add text background

* Tweak drawShape's params
2023-10-12 13:40:11 +10:00
Abdo
c052be9e25
Add a backend method to extract static media references (#2716)
* Add a backend method to extract static media references

* Extract into Notetype.gather_media_names()
2023-10-11 14:10:02 +10:00
Damien Elmes
961d7dfd72 Rust 1.73 2023-10-09 19:22:43 +10:00
Damien Elmes
f741b4af91 Fix 'PanicException: command requires weights to be set' 2023-10-09 18:39:18 +10:00
Damien Elmes
0e6104a96b Fix 'Expression tree is too large' when user has many decks
+ Allow 'did:' searches to match multiple decks at once
2023-10-09 18:39:18 +10:00
Damien Elmes
67acdc3034 Apply tag fix from Abdo
https://forums.ankiweb.net/t/drag-and-drop-tag-groups-crashes-anki/35505/3
2023-10-09 13:55:37 +11:00
RumovZ
23f29a6ecc
Invalid sorting (#2709)
* Rollback if toggling state fails

Previously, if the search triggered by a state toggle failed, the switch
and the model would move to the new state, while the table would remain
in the previous state.

* Fix reversed sort orders of FSRS columns

* Add sep. default sort orders for notes and cards

* Add test for consistent default sort orders

* Add launch config for debugging in VSC

* Extend launch config for macOS and Linux
2023-10-07 06:36:15 +00:00
RumovZ
ba43c7fdc1
Merge all conflicting notetypes (#2707)
* Refactor import apkg tests

* Merge conflicting notetypes regardless of id match

Original ids are a new thing, and we need to handle previous remappings.
This is done separately from the conflict resolution for notetypes with
matching ids, because 1) we need to look at the notes to determine
conflicts, and 2) we don't want to change the notetype of *all* existing
notes with the conflicting notetype. The main reason is that for 2
existing notes with the same noteype, their incoming counterparts could
have *different* notetypes. So to get rid of all conflicts, they must be
resolved on a note-by-note basis.

* Delete merged, now unused notetypes
2023-10-05 06:18:10 +00:00
Damien Elmes
6c1d7a6703 Use 0 when there are no relearning steps; ensure not NaN 2023-10-05 09:55:05 +10:00
Damien Elmes
3636c7c90e When the user has no relearning steps, synthesize the value 2023-10-03 13:50:29 +10:00
Damien Elmes
41bddfc6cb Ensure fuzz doesn't go backwards
Closes #2694
2023-10-03 13:23:27 +10:00
Damien Elmes
72b0c81761 When learning steps are missing, start from the SM-2 state
Closes https://github.com/open-spaced-repetition/fsrs-rs/issues/87
2023-10-03 12:20:10 +10:00
Damien Elmes
257d7bbbbc Update FSRS crate 2023-10-03 11:28:56 +10:00
Damien Elmes
9fd8a8bb40 Add stability graph 2023-10-01 15:44:33 +10:00
Damien Elmes
072cd37b42 Support rescheduling on weight/retention change 2023-10-01 15:20:58 +10:00
Damien Elmes
d16faacd0f Allow cards with no learning history when not training 2023-09-30 16:10:23 +10:00
Damien Elmes
93499d4182 Display the default weights as a placeholder 2023-09-30 16:10:23 +10:00
Damien Elmes
50c8a1ba9f Update FSRS
- up to 10x performance increase in optimal retention
- expose loss aversion
- use SpinBoxes
2023-09-30 16:10:22 +10:00
Damien Elmes
f3bb845961 Update incompatible Rust deps 2023-09-28 10:00:47 +10:00
Damien Elmes
b8390d096e Shift weight calculation to backend so it can be run in parallel 2023-09-28 09:10:54 +10:00
Damien Elmes
1f55ad1d44
Expose the ability to train weights from items (#2687) 2023-09-28 08:28:24 +10:00
Jarrett Ye
05499297e0
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