Commit graph

11449 commits

Author SHA1 Message Date
Arthur Milchior
d7fc98d4d8
Deck options without bridge (#3571)
* NF: Modify CONTRIBUTORS

Just so that I stop getting the warning

* NF: Create `deckOptionsReady`

* NF: rename _close to require_close

The method will have to be used outside of this class, so can't be private

* NF: simplify slightly some code

* NF: remove bridge command from deck options

* Remove unused import

* Remove superfluous comment with a typo
2025-01-08 21:30:30 +11:00
llama
769f302ea8
Fix "discard changes" appearing on deck options (#3689)
* patch original config after a preset is selected for the first time

* update comment
2025-01-07 17:41:52 +03:00
llama
d01d83e2c6
convert floats to single-precision before comparing in isModified (#3686) 2025-01-07 17:13:43 +03:00
Luc Mcgrady
f057ee465d
Prevent simulate button spam (#3670) 2025-01-07 16:58:22 +03:00
Ben Nguyen
d89e6f3bdd
IO: Prevent text masks from flipping (#3672)
* Lock scaling flip when creating new text mask

* Lock scaling flip on existing text masks
2025-01-07 15:43:28 +03:00
llama
4ee6dacaa3
fix card info failing to load with qt5 (#3681) 2025-01-07 15:39:51 +03:00
llama
ca6002fd58
remove image menu feature when on qt5 (#3685) 2025-01-07 15:30:51 +03:00
sorata
f1a5808d83
Don't Exclude Suspended Cards from Retreivability Graph (#3665)
* Revert "Fix/skip suspended cards in graphs context retrievability (#3518)"

This reverts commit 939cc5a268.

* apply suggestions
2025-01-05 01:30:43 +03:00
Omar Kohl
6f2c959dc3
replace localhost with 127.0.0.1 in syncserver Dockerfile (#3673)
* Add myself to CONTRIBUTORS file

* replace localhost with 127.0.0.1 in syncserver Dockerfile

The healthcheck was failing, presumably because localhost was resolving to ::1
(IPv6), as detailed in this issue: https://github.com/maildev/maildev/pull/500
2025-01-05 01:24:29 +03:00
Ross Brown
9877e22fd2
Tweak how the True Retention stats table displays numbers (#3677)
* Tweak how the True Retention stats table displays numbers

- Always show fractional parts of numbers even if they are 0 (91.0% not 91%).
- Show "N/A" for percentages instead of 0% when there are 0 total reviews.

* Localise percentages correctly
2025-01-04 23:13:32 +03:00
llama
91b3740554
Stop audio playback on editor close (#3666)
* stop audio playback on browser close

* revert fix

* add caller-aware versions of play_file and stop_and_clear_queue

* stop editor's audio autoplay on close

* remove superfluous stop_and_clear_queue from addcards
2025-01-04 18:55:40 +03:00
Niclas Heinz
936e10bd76
update docker deps and docker docs (#3671)
* docs(docker): Change suggested version numbre

* deps(docker): Bump rust to 1.83.0 and alpine to 3.21.0

* deps(docker): Bump rust to 1.83.0

* CONTRIBUTORS: Add my name
2025-01-04 17:58:54 +03:00
Omar Kohl
7f12814bbe
avoid warning by setting SYNC_PORT as ARG in Dockerfile (#3675)
* Add myself to CONTRIBUTORS file

* avoid warning by setting SYNC_PORT as ARG in Dockerfile

    1 warning found (use docker --debug to expand):
    - UndefinedVar: Usage of undefined variable '$SYNC_PORT'
2025-01-04 17:51:43 +03:00
llama
5a7a9090b6
Allow choosing filtered decks in stats (#3687)
* add optional passthru param dyn to DeckChooser

* include filtered decks when choosing decks in stats
2025-01-04 17:39:16 +03:00
user1823
7fa544df9b
Add some unit tests (#3678)
* Add some unit tests

Covers most of the cases encountered in https://github.com/ankitects/anki/pull/3639

* Format

* Update params.rs

Makes the test more robust.

* Update params.rs

When training, the first FSRS item is removed. That's why none of the other tests includes it.

Co-authored-by: Jarrett Ye <jarrett.ye@outlook.com>

* Improve naming

* Fix typo

---------

Co-authored-by: Jarrett Ye <jarrett.ye@outlook.com>
2025-01-04 17:26:23 +03:00
Lukas Sommer
9d1be9a413
Translation comments for actiony-all-selected and actiony-any-selected (#3658)
* Translation comments for actiony-all-selected and actiony-any-selected

* Update

* Update
2024-12-23 21:47:40 +10:00
Luc Mcgrady
c985acb9fe
Add memorized option to FSRS simulation graph (#3655)
* Added: Memorized option to graph

* Count -> Reviews

* Added: Margin to radio button input

* Fix: Labels

* ./check

* Check errors?

* bump fsrs to 1.4.6

* ./ninja fix:minilints

* Added: Don't show hidden simulator values.

* Bump to fsrs 1.4.7
2024-12-22 11:40:51 +10:00
llama
53a2e34a3f
Fix missing buttons on bottom bar when window is narrow (#3653)
* Delay offsetHeight query to account for reflow

* Handle invalid value if webview page was deleted
2024-12-22 11:29:54 +10:00
Ben Nguyen
3a7a1c7346
Don't parse TTS text as XML (#3651) 2024-12-22 11:09:00 +10:00
Ross Brown
5637390b50
Make the "True Retention" table pretty (#3640)
* Make the True Retention table pretty

* Hide absolute pass/fail table for 'all'

* Run './ninja format'

* Manually run prettier on Svelte 5 components

* Refactor to not use {#snippet}

* Fix lint to pass check:eslint

* Fix lint to pass check:svelte

* Rename t9n -> tr to follow code style

* Replace hard-coded string with a translation string

* Use assertUnreachable(...) for exhaustively matching enum
2024-12-19 00:41:57 +11:00
Jarrett Ye
e7fff9eba0
Fix/forget to update memory state during relearning (#3648) 2024-12-19 00:33:04 +11:00
Jarrett Ye
abef3f39ca
Fix/dataPoint index is off by one day in simulator & remove moving average (#3645)
* Fix/dataPoint index is off by one day in simulator

* remove movingAverage
2024-12-19 00:09:04 +11:00
Jake Probst
69e699dc13
Fix easy days causing load balancer to disproportionately schedule graduates to the furthest day (#3643)
* don't do easy days calculation if all days are the same ease
2024-12-18 23:49:59 +11:00
Luc Mcgrady
482874d4f0
Fix Fsrs simulator input problems (#3642)
* Fix: min value for Additional new cards not 0

* Fix: New cards/day default value not starting value

* Preset defaults for review intervals and per day.

* Fix: "Additional new cards to simulate" localisation

* Revert "Fix: "Additional new cards to simulate" localisation"

This reverts commit 9be61d9f93.
2024-12-18 23:43:51 +11:00
llama
b061da73d3
Replace use of window.postMessage in card info (#3646)
* Use anki.updateCard instead of window.onmessage in card-info

* Make card-info placeholder text grey

---------

Co-authored-by: Abdo <abdo@abdnh.net>
2024-12-18 11:32:07 +03:00
Jarrett Ye
474dbc2812
Fix/fallback to non-manual entry when first_of_last_learn_entries non found (#3639)
* Fix/fallback to non-manual entry when first_of_last_learn_entries non found

* refactor single_card_revlog_to_item(s)

* update unit test of bypassed_learning_is_handled

* move comment line

* remove first_relearn_entries

* skip cram entry

* only pick non_manual_entries after ignore date

* fallback to non_manual_entries if the first learning step is before the ignore date

* pass ci

* update ignore_before_date_between_learning_steps_when_reviewing

* shorten the comment

* Minor refactoring

- fsrs_items_for_memory_state - fsrs_items_for_memory_states
- single_card_revlog_to_item -> fsrs_item_for_memory_state
(to match fsrs_items_for_training)
- single_card_revlog_to_items -> reviews_for_fsrs
- Use struct instead of tuple for reviews_for_fsrs output
- Don't return count, since we're already returning the filtered list

* More renaming/comment tweaks

- non_manual_entries -> first_user_grade_idx
- change comments to reflect the fact that we're working backwards
- Use "user-graded" rather than "non-manual"

* Add extra unit test

* Some wording tweaks
2024-12-17 23:34:19 +11:00
Jarrett Ye
4d20945319
Fix/FSRS Simulator Failure: min > max (#3644) 2024-12-17 11:45:43 +03:00
llama
a0712b04e1
Split off path into its own arg (#3641) 2024-12-16 14:15:05 +03:00
Mani
65fd461ddc
Allow object to move to right edge and bottom edge and allow scroll of note fields when not using IO (#3630)
* allow drag and draw at right and bottom edge of canvas area

* allow scroll in fields, when mask editor hidden

* format code
2024-12-15 19:30:47 +03:00
Damien Elmes
d900506003 Fix 'type error: failed to fetch' in congrats screen
The previously-added catch was not working due to the implicit error
handling of the proto methods.

Closes #2895
2024-12-14 22:51:13 +11:00
llama
b726e28229
Remove use of window.location.href in CardInfoDialog (#3621)
* Replace window.location in CardInfoDialog with load_sveltekit_page

* Fix format

* Fix ForgettingCurve's reactivity

* Props' default args aren't reactive

* Add global _updateCardId fn to card-info

* Use _updateCardId to reactively update card-info

* Fix format

* Fix type

* Use dummy form instead of window global for client-side nav

* Fallback to window.location in case form hasn't been rendered

* Use window.postMessage instead of dummy <form>
2024-12-14 22:45:54 +11:00
Jarrett Ye
adcac61b44
Update to FSRS-rs v1.4.4 (clipping post-lapse stability) (#3628)
* Update to FSRS-rs v1.4.4 (clipping post-lapse stability)

* ./ninja fix:minilints
2024-12-14 22:01:34 +11:00
OuOu2021
008edbba28
I18n: Improve i18n and multi-platform display of FSRS Simulator (#3611)
* Improve i18n and multi-platform display of FSRS Simulator

* Tweak the graph bounds to avoid overlapping of the y-axis tick values ​​and the y-axis title

* Update CONTRIBUTORS

* I18n for 4 more strings

* Reduce TitledContainer wrapper of fsrs simulator graph to maximize content display area

* Clean unused variables

* Update ftl/core/deck-config.ftl

* Update ftl/core/deck-config.ftl
2024-12-14 21:59:00 +11:00
a.r
1fb5e99efc
typeanswer: [type:nc] - use nfkd again (#3627) 2024-12-14 21:53:48 +11:00
llama
a2ad0bce55
Fix CardInfoPlaceholder not showing when card id is invalid (#3631)
* Catch bigint parsing error

* Modify CONTRIBUTORS
2024-12-14 21:32:51 +11:00
llama
2d207ff5ba
Remove hardcoded note/card colours from switch.py (#3629)
* Remove hardcoded note/card colours in switch.py

* Modify CONTRIBUTORS

* Switch to None as a safe default value
2024-12-14 21:30:28 +11:00
Bart Louwers
36d0fddd38
[Qt 6.7] Set ForceDarkMode attribute in AnkiWebView (#3622)
* Set ForceDarkMode attribute in AnkiWebView

* Use hasattr for backward compatibility

* Make mypy happy
2024-12-14 21:29:30 +11:00
Damien Elmes
d014f72377 Update url crate to fix idna vuln 2024-12-14 21:03:02 +11:00
Damien Elmes
9c3f89466d Fix glibc tag for AMD build 2024-12-09 19:40:16 +11:00
OuOu2021
cee04bf20c
Apply gradient effect to forgetting curve (#3604)
* Add gradient color for forgetting curve

* Add desiredRetention prop for CardInfo

* update CONTRIBUTORS

* Formatting

* Tweak range of gradient

* Tweak: salmon -> tomato

* Get desired retention of the card from backend

* Add a reference line for desired retention

* Fix: Corrected the steel blue's height & Hide desired retention line when yMin is higher than desiredRetentionY

* Add y axis title

* Show desired retention in the tooltip

* I18n: improve translation and vertical text display

* Revert rotatation&writing-mode of vertical title

* Tweak font-size of y axis title

* Fix: delete old desired retention line when changing duration

* Update ftl/core/card-stats.ftl

---------

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2024-12-09 17:44:05 +11:00
BlueGreenMagick
3b99ae4b91
Fix deck options button twitching on hover (#3623)
* Fix options page tab button text twitching on hover

* Fix options help modal button layout shifting on hover
2024-12-09 16:12:36 +11:00
Ross Brown
d1032d86a7
Make sure Anki resets the QtMessageHandler as it is exiting (#3620) 2024-12-09 15:39:45 +11:00
Ben Nguyen
128f54ed90
Fix reuse internal clipboard for primary selection pasting (#3613)
* Pass down clipboard mode

* Add type annotation
2024-12-09 15:38:52 +11:00
Luc Mcgrady
d6ffaa921f
Add "No reviews to optimize" message (#3610)
* Separate failed message from optimal

* No reviews only

* Fix: Can't block optimize if not optimal

* Wording change

* Update ftl/core/deck-config.ftl

* Simplify code (dae)
2024-12-09 15:21:58 +11:00
hideo aoyama
039c7fc0a9
Snap: keep LD_LIBRARY_PATH when in snap environment (#3618) 2024-12-07 00:42:03 +11:00
Ben Nguyen
a4626bf48e
Remove infinite spinning icon for reset parameters dropdown and add a question mark (#3603)
* Add question mark to popup words

* Remove spinning icon

* Formatting
2024-12-07 00:41:34 +11:00
user1823
f345517dcc
Change font of debug console to Consolas (#3606) 2024-12-07 00:37:43 +11:00
Luc Mcgrady
6524a24a89
Slider easy day gui (#3605)
* Slider easy day gui

* Removed: Borders

* Added: Bottom borders
2024-12-07 00:34:56 +11:00
sorata
d897b4588e
update error message (#3612)
Co-authored-by: Abdo <abdo@abdnh.net>
2024-12-06 03:05:49 +03:00
Ben Nguyen
496d76e478
Hide progress text when done (#3609) 2024-12-06 02:53:24 +03:00