Commit graph

11311 commits

Author SHA1 Message Date
Damien Elmes
30e734b925 Bump Rust deps
Primarily for prost, which had incompatible changes
2024-10-21 15:34:04 +10:00
sorata
84b6d20e1d
change sort order name (#3510) 2024-10-21 15:20:45 +10:00
Jarrett Ye
b0eb2a2b97
Feat/Estimated Total Knowledge By Note & Daily Load (#3507)
* Feat/Estimated Total Knowledge By Note & Daily Load

* Update rslib/src/stats/graphs/retrievability.rs

* Update rslib/src/stats/graphs/future_due.rs
2024-10-21 15:19:42 +10:00
Jarrett Ye
6ff309e08f
Feat/option to enable FSRS short-term scheduler when (re)learning steps run out && speed up features based on simulation (#3505)
* Update to FSRS-rs v1.3.2

* add fsrs_short_term_with_steps_enabled to config

* ./ninja fix:minilints

* fix defaults_for_testing

* if current parameters are invalid, skip comparison

fix #3498

* fix redundant_field_names

* cargo clippy --fix

* Update to FSRS-rs v1.3.3

* Update to FSRS-rs v1.3.4

* Avoid an extra config lookup on each card answer (dae)
2024-10-21 15:09:07 +10:00
Jarrett Ye
b09326cddd
Feat/export dataset for research (#3511)
* Feat/export dataset for research

* add comment

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>

* target_path is required

* format

* improve efficiency to look up parent_id

* move `use` down
2024-10-18 18:57:06 +10:00
Damien Elmes
c1a2b03871
Revert "NF: Improve typing of AnkiWebView action (#3475)" (#3504)
This reverts commit 18889239d2.
2024-10-16 03:02:22 +10:00
Han Yeong-woo
25070c505a
Fully switch to File::set_times() from utime crate (#3503)
* Fully switch to File::set_times() from utime crate

* Switch to open_file()

Future me will end up wondering why we're explicitly declaring read=true

* Fix failing on windows

* Minor tidy-up (dae)

* Fix comment typo
2024-10-16 02:35:37 +10:00
Taylor Obyen
569a4705e7
Fix ease button alignment (#3474)
* Fix ease button alignment

* Make CSS not 'hacky'
2024-10-16 01:46:55 +10:00
Jarrett Ye
f804abf758
Fix/only let FSRS take over short-term schedule when steps are empty (#3496) 2024-10-16 01:16:47 +10:00
Ben Nguyen
a537d349b8
Enable strict_optional for aqt/editor.py (#3500)
* Enable strict_optional for aqt/editor.py

* Fix mypy errors in EditorWebView class

* Fix mypy errors in Editor class

* DRY

* Match same short circuiting behavior

* Convention
2024-10-16 01:08:24 +10:00
Hikaru Y.
694a5089a9
Fix 'Discard changes' dialog appearing even when no changes are made (#3495)
* Fix 'Discard changes' dialog appearing even when no changes are made

https://forums.ankiweb.net/t/anki-24-10-beta/49989/166

* Fix geometry of deck options window not being saved

evt.accept() does not seem to trigger reject().
2024-10-16 00:47:33 +10:00
Cy Pokhrel
8f4cab6a1a
Fix editor loses focus when toggling list if list item empty (#3483)
* fix editor loses focus when toggling list if list item empty

* fix CONTRIBUTORS
2024-10-16 00:38:35 +10:00
Damien Elmes
f3ca4646fc
Revert "Fully switch to File::set_times() from utime crate (#3501)" (#3502)
This reverts commit 723b5e9bcc.
2024-10-16 00:35:26 +10:00
Han Yeong-woo
723b5e9bcc
Fully switch to File::set_times() from utime crate (#3501)
* Fully switch to File::set_times() from utime crate
 
* Switch to open_file() (dae)

Future me will end up wondering why we're explicitly declaring read=true
2024-10-16 00:31:17 +10:00
Damien Elmes
b75fd94c96 Update Rust deps
- Primarily for the latest RUSTSEC on pyo3
- utime has been pinned, as they've introduced a deprecation warning
without a solution being available for folder mtimes
2024-10-15 23:00:45 +10:00
Damien Elmes
743017b471 Partially switch to File::set_times() from utime crate 2024-10-15 23:00:38 +10:00
Damien Elmes
e77632d7b2 Fix UI hanging when update check stalls
https://forums.ankiweb.net/t/anki-24-10-beta/49989/222
2024-10-15 21:32:46 +10:00
Damien Elmes
111cefe8f1 Revert "When updating all FSRS parameters at once, exclude suspended cards"
https://forums.ankiweb.net/t/memory-state-of-suspended-cards/50460/6

This reverts commit 656cfe0b9c.
2024-10-12 22:09:05 +10:00
Jarrett Ye
f00211df35
add get_revlogs API && fix the style of tooltipText of ReviewsGraph (#3490)
* add get_revlogs API

* fix tooltipText of ReviewsGraph

the style of true-retention shouldn't affect the style of tooltipText of ReviewsGraph

* More verbose wording (dae)
2024-10-12 14:49:14 +10:00
Ben Nguyen
aaf4994e6f
Enable strict_optional for aqt/data, aqt/forms, aqt/import_export (#3489)
* Added spacing

* Enable strict_optional for aqt/data

* Update CONTRIBUTORS

* Enable strict_optional for aqt/forms

* Enable strict_optional for aqt/import_export

* Fix mypy errors in import_dialog.py

* Fix mypy errors in exporting.py

* Better variable name

* Stick to assert convention
2024-10-12 14:36:15 +10:00
Damien Elmes
eae9bbc473 Update translations 2024-10-12 00:28:11 +10:00
Damien Elmes
40f9e0dc7a Fix true retention table dimensions
https://forums.ankiweb.net/t/anki-24-10-beta/49989/118
2024-10-11 23:57:47 +10:00
Damien Elmes
78b9580447 Ignore mw typing error 2024-10-11 23:47:22 +10:00
Damien Elmes
b3a85a6515 Revert "Decide if element is bold by getComputedStyle (#2453) (#2579)"
This reverts commit 9ced6be03e.

Caused a regression:
https://forums.ankiweb.net/t/anki-24-10-beta/49989/150
2024-10-11 23:34:50 +10:00
Hikaru Y.
e79060487b
Fix broken tag editor in Svelte 5 (#3488)
* Fix temporary disappearance of a tag

https://forums.ankiweb.net/t/anki-24-10-beta/49989/47

* Fix incorrect behavior after tag deletion

* Fix tag addition/selection buttons becoming invisible

Once tags were selected, subsequent deselection or selection did not
mount 'TagAddButton' or 'TagsSelectedButton' components.
2024-10-11 23:21:00 +10:00
Ben Nguyen
931e1d80f2
Enable strict_optional in aqt/. and aqt/browser (#3486)
* Boolean naming convention

* Rename no_strict_optional -> strict_optional

* Update CONTRIBUTORS

* Enable strict optional for aqt module

* Fix errors

* Enable strict optional for aqt browser

* Fix layout.py errors

* Fix find_duplicates.py errors

* Fix browser.py errors

* Revert a0 a1 names

* Fix tree.py errors

* Fix previewer.py errors

* Fix model.py errors

* Fix find_and_replace.py errors

* Fix item.py errors

* Fix toolbar.py errors

* Fix table/__init__.py errors

* Fix model.py errors

* Fix state.py errors

* Fix table.py errors

* Fix errors in card_info.py

* Fix searchbar.py errors

* Fix name

* Fix assert in browser.py

* Formatting

* Fix assert vh

* assert is not None instead of truthy

* Split _move_current() up to correct type signature (dae)

We want either index or direction, but not both.
2024-10-11 23:12:48 +10:00
Tomas Fabrizio Orsi
d4a3e4828b
ts/src/app.html: Changed from favicon.png to favicon.ico (#3485)
Signed-off-by: Tomas Fabrizio Orsi <torsi@fi.uba.ar>
2024-10-11 22:25:58 +10:00
a.r
8af63f81eb
typeanswer: NFC fix & cleanup (#3482)
* typeanswer: cleanup

* DiffNonCombining's new() used String where plain Vec is appropriate
* get rid of normalize_typed for DiffTrait again by pulling code into DiffNonCombining's new()
* two DiffNonCombining testcases

* typeanswer: return to NFC & typos
2024-10-11 20:33:08 +10:00
Arthur Milchior
18889239d2
NF: Improve typing of AnkiWebView action (#3475)
There are only two types of actions. The code does not seems to
consider this to be extandable, and the changed variable is private,
so I would expect it relatively acceptable to change the way it
work. This would improve the typing.

If this is rejected, at least, the callback should be noted as
optional, so that the IDE does not complain that `if cb` can not be
false.
2024-10-11 20:16:20 +10:00
Taylor Obyen
7439c657f0
Add card position column and always show position in card info (#3471)
* Expose original position to columns and card info

* Fix contributors

* Change routine name and return, fix SQL file, utilize coalesce inline

* Handle cards without original position

* Remove unecessary conversion
2024-10-11 20:14:07 +10:00
Jarrett Ye
a982720a42
Feat/Easy Days (#3442)
* Feat/Easy Days

* format

* add easy_days_percentages to deck_config

* configure Easy Days via table

* remove unused code

* add translatable strings & add default of easy days

* don't check easy_days_percentages when deserialize

* pass test::all_reserved_fields_are_removed

* consider next_day_at when interval_to_weekday

* remove y-axis-title created in last simulation

* EstimatedTotalKnowledge should be integer

* Reorder deck option sections (dae)

- Move FSRS to bottom left, to move it closer to the top, and so
the left and right columns appear roughly balanced when FSRS is
enabled.
- Move Easy Days above Advanced

* Don't crash if wrong number of days (dae)

* Use lower field number (dae)

Repeated fields are more compactly stored in the first 15 fields.
2024-10-11 19:47:44 +10:00
Damien Elmes
79a6a4dc53 Pretend mw is set from the start
https://github.com/ankitects/anki/pull/3476#issuecomment-2395281774

Closes #3476
2024-10-10 22:17:58 +10:00
Damien Elmes
479aee0883 Fix updated template links
I forgot to update the PR before merging.
2024-10-10 20:52:14 +10:00
sorata
d98fc142f1
Change links in error messages (#3468)
* Update template.rs

* Update template.rs

* ./check (dae)
2024-10-10 20:47:11 +10:00
Hikaru Y.
407e2dc43b
Fix issues with 'Discard changes' confirmation dialog (#3478)
* Prevent memory leak

* Fix deck option changes not detected until focus is lost

* Accurately determine if there are any pending changes

This makes it so that the confirmation dialog appears when it should,
and not when it shouldn't.
2024-10-06 14:21:00 +10:00
Jarrett Ye
598233299e
Let FSRS control short term schedule (#3375)
* graduate card when user press hard and has 0 learning steps

* fix error: useless conversion to the same type

* do the same thing to again

* fix expected `Option<u32>`, found integer

* ./ninja format

* let FSRS control short term schedule

* Update to FSRS-rs v1.3.0

* ./ninja check:clippy

* Update to FSRS-rs v1.3.1

* Pin FSRS version (dae)

https://github.com/ankidroid/Anki-Android-Backend/pull/417

* Remove redundant parens (dae)
2024-10-06 12:20:18 +10:00
Damien Elmes
378c955905 Revert "Fix ease button alignment (#3404)"
This reverts commit a262e02f9d.

Due to regression:
https://forums.ankiweb.net/t/anki-24-10-beta/49989/119
2024-10-04 22:38:50 +10:00
Damien Elmes
80ebdf1988 Flip order of question/answer actions, and ascending/descending ease
https://forums.ankiweb.net/t/anki-24-10-beta/49989/53
2024-10-04 20:52:20 +10:00
user1823
de3b1754fa
Add "open image" option to editor (#3431)
* Add "open image" option to editor

* Update qt/aqt/editor.py

Co-authored-by: Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>

* Update editor.py

* Remove unused import

* Fix "show in folder"

* Fix 'show in folder' on macOS

* Revert "Fix "show in folder""

This reverts commit cf2b33ee9422bcaf8d9e20bd4cce74e5061c13cf.

* Reimplement show_in_folder for Windows (dae)

- Avoid reusing call(), as the startupinfo we were passing in was
breaking the explorer invocation
- Attempt to bring explorer to the front after the window has been show,
as it otherwise appears under Anki (at least when running from source)

---------

Co-authored-by: Ben Nguyen <105088397+bpnguyen107@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2024-10-04 20:51:55 +10:00
Damien Elmes
85f034b144 Split true retention into multiple tables; display vertically
This prevents the page scrolling off screen on small devices. This is
a quick fix, and further tweaks to the layout are welcome.
2024-10-04 17:04:22 +10:00
Damien Elmes
12cd3ca919 Update translations 2024-10-04 16:29:47 +10:00
Damien Elmes
6aff3c5f80 Update protobuf to fix Windows crash
https://forums.ankiweb.net/t/anki-24-10-beta/49989/109
2024-10-04 16:27:13 +10:00
박현우
761fb76ba7
Allow addon page URL on AddonsDialog (#3467)
* Allow users to just copy&paste addon page URL to addon 'code' field.

https://forums.ankiweb.net/t/get-addons-allow-url-on-code-section/36370
2024-10-04 15:02:29 +10:00
mmjang
9ced6be03e
Decide if element is bold by getComputedStyle (#2453) (#2579)
* Decide if element is bold by getComputedStyle (#2453)

* Use getComputedStyle() for italics too (dae)
2024-10-02 19:37:40 +10:00
Shirish Pokhrel
2ac27585b2
Fix editor loses focus when toggling list and copy selects wrong target deck for filtered decks (#3465)
* fix copy selects wrong target deck for filtered decks
2024-10-02 18:42:41 +10:00
a.r
cfd1eba7ec
typeanswer: hoist strip_expected (#3464)
(renamed from prepare_expected)

Single use makes it likelier to get inlined, too.
2024-10-02 18:28:18 +10:00
Ben Nguyen
cc45db0e22
Fix Mnemosyne importer chokes on due dates >= 2038 (#3459)
* Fix integer overflow

* Update CONTRIBUTORS
2024-10-02 18:20:44 +10:00
Jarrett Ye
159681d9f2
Fix/Reschedule doesn't work on cards in filtered deck (#3441)
* Fix/Reschedule doesn't work on cards in filtered deck

* Update docstring (dae)
2024-10-02 18:09:25 +10:00
Taylor Obyen
d6aa95950d
Fix occlusion drift again (#3443)
* Fix occlusion drift

* Fix image editor occasionally not loading fully

* Fix occlusion disassociation when browsing

* Address oversights

* Fix translucent modifier applies to newly created shapes incorrectly

* Fix i-text turns yellow upon immediate note change

* Fix image occlusion hot keys not disabled when typing

* Improve text label creation experience

* Remove redundant functions

* Fix error when adding occlusion (dae)
2024-10-02 17:19:52 +10:00
Jarrett Ye
59969f62f5
polish graphs of simulator, true retention table and forgetting curve (#3448)
* polish graphs of simulator and forgetting curve

* True Retention: decrease precision of percentages

* apply uniform sampling rate to forgetting curve

* don't display time, only date when maxDays >= 365

* don't floor the totalDaysSinceLastReview

* correct cramming condition

* improve code-style

* polish ticks & tooltip of simulator

* remove unused import

* fix minor error of daysSinceFirstLearn

* filter out revlog entries from before the reset

https://forums.ankiweb.net/t/anki-24-10-beta/49989/63?u=l.m.sherlock

* use Math.ceil for windowSize

* fill currentColor for legend text

* remove mix-blend-mode: multiply

* tune the position of legend
2024-10-01 00:22:30 +10:00