Commit graph

12060 commits

Author SHA1 Message Date
llama
9025202204
properly construct file url when opening image/folder on linux (#3986) 2025-05-08 23:29:46 +10:00
Abdo
80618cad85
Clear notetypes cache on import (#3969)
* Clear notetypes cache on import

* Clear cache in AnkiQt.on_operation_did_execute() instead
2025-05-08 23:11:47 +10:00
Jarrett Ye
1124a63798
expose decay of Card object in Python (#3985) 2025-05-06 23:32:58 +03:00
Damien Elmes
cbb202a46f Re-run minilints on .md change
While trivial updates to our docs don't really need a license
declaration, they were causing CI to fail after merge.
2025-05-05 19:10:13 +10:00
Divyansh Kushwaha
6a07c6e561
docs: correct reference for linux dockerfile (#3982) 2025-05-05 18:57:08 +10:00
Luc Mcgrady
e06852a0ed
Fix/SQL retrievability underflow (#3980)
* Fix/Saturating sub called before u32 conversion

* more
2025-05-05 18:49:12 +10:00
GithubAnon0000
dcc6000f70
Properly align label and radio input in the stats window (#3977)
* Properly align label and radio input in the stats window

* use margin-inline-end instead of margin-right to support RTL
2025-05-05 18:10:58 +10:00
Damien Elmes
d1bb69aaec Remove unused import 2025-05-05 18:08:31 +10:00
Abdo
b84f2d7873
Use correct debug scripts folder (#3973) 2025-05-05 17:26:04 +10:00
Abdo
0277721280
Fix invalid rust-analyzer option (#3972) 2025-05-05 17:25:11 +10:00
Luc Mcgrady
a66f8b2b5f
Fix/Layout shift on CardCounts button hover (#3971) 2025-05-05 17:24:34 +10:00
Damien Elmes
c70e9d26c5 Add the ability to hide the forgetting curve from card info 2025-05-05 17:04:15 +10:00
Matt Brubeck
bcb28f0a85
Use first >= 1d interval for starting memory state (#3959)
When a filtered revlog history begins with one or more < 1d intervals
(for example, because it starts in the middle of a sequence of
relearning steps), use the first >= 1d interval to calculate the initial
memory state.

Bug report thread:

https://forums.ankiweb.net/t/fsrs-stability-when-first-non-ignored-revlog-has-a-relearning-interval/59894
2025-05-05 15:49:06 +10:00
GithubAnon0000
57ecfbe562
REMOVE percentages of x-axis in the answer buttons graph (#3952)
* Allow linebreak between kind and percentage in answer buttons graph. This is BROKEN!

* FIX: percentage is not below kind

* FIX: y-axis wrongly had percentages

* REMOVE debugging console

* run ./check and fix errors

* REMOVE unused comment (commented out code)

* FIX: Percentage Text is cutoff (this removes transition as well)

* FIX: incorrect alignment

* UPDATE variable names to make them more meaningful

* UNDO removing transition

* REMOVE percentage from x-axis

* Revert "UNDO removing transition"

This reverts commit 2652b16bd7.

* RESTORE transition in x-axis
2025-05-05 15:37:24 +10:00
Yaoliang Chen
1f95d030bb
feat(scheduler): add from_queue flag to CardAnswer (#3976)
Co-authored-by: Yaoliang <yaoliang.ch@gmail.com>
2025-05-03 12:21:48 +03:00
Jarrett Ye
bd67e9fe1b
Fix/stability doesn't increase after pressing good (#3975) 2025-05-03 12:04:35 +03:00
Jonathan Schoreels
963fcf7c60
Check if self.card.reps>0 before substracing 1 (#3966)
* Check if self.card.reps>0 before substracing 1

* Fix formatting

* Use a more rust-y way to avoid the Panic for underflow, especially wé're talking seed value

Co-Authored-By: jake <jake@sharnoth.com>

---------

Co-authored-by: jake <jake@sharnoth.com>
2025-04-30 21:53:36 +10:00
sorata
ad12046e87
Improve an Error Message (#3964)
* improve a string

* Update ftl/core/deck-config.ftl
2025-04-30 21:44:11 +10:00
Matt Brubeck
ef37952ba0
Remove dead code in reviews_for_fsrs (#3958)
* Clarify logic in reviews_for_fsrs

Prior to this change, the second check of `first_of_last_learn_entries`
was dead code because the first check would always break out of the loop
before it could succeed.  Re-order the code for clarity and add a
comment to explain the logic.

* Update CONTRIBUTORS
2025-04-30 21:28:30 +10:00
Jarrett Ye
92cfb7340e
add ellipsis to Grade Now (#3970)
* add ellipsis to Grade Now

* Revert "add ellipsis to Grade Now"

This reverts commit 8a3cf51c9e.

* add ellipsis to Grade Now
2025-04-29 16:43:14 +10:00
llama
51b5086b01
Fix unescaped deck names missing from tooltips when deleted (#3960) 2025-04-29 02:18:56 +03:00
Jarrett Ye
07033435a6
Fix/remove incorrect invalid input check (#3963) 2025-04-29 02:10:19 +03:00
llama
6ff023f6a1
apply min-height to anki-editable directly (#3957) 2025-04-28 06:41:00 +10:00
Luc Mcgrady
ad073ab10c
Feat/CMRR uses simulate config (#3947)
* Added: simulate_request_to_config

* Use SimulateConfig for CMRR

* ./check

* Fix: ComputingRetention

* Use actual cards for optimal_retention
2025-04-27 21:02:37 +10:00
Damien Elmes
e748cec5d1 Update translations 2025-04-27 19:49:52 +10:00
Damien Elmes
1e2f11a271 Latest FSRS 2025-04-27 19:48:43 +10:00
Evgeny Kulikov
2acdc8c30a
Close only "child" window (e.g. Preview) inside Browser on Cmd+W (#3913)
Currently, if a user tries to close Preview which was opened inside Browse, the "parent" Browse window itself gets closed

Co-authored-by: beyondcompute <beyondcompute@users.noreply.github.com>
2025-04-27 18:25:20 +10:00
JL710
62bad44eed
add toggle for browser sidebar (#3953)
* add toggle for browser sidebar

* Update CONTRIBUTORS
2025-04-27 18:22:56 +10:00
Jarrett Ye
90f2e06b17
Fix/missing-simulator-decay-for-FSRS-5 (#3956) 2025-04-27 17:20:13 +10:00
Jarrett Ye
6d0e52e8a0
Fix/incorrect fallback of decay (#3954) 2025-04-27 17:19:59 +10:00
Luc Mcgrady
2406830ff9
Fix/no memory state revlogs in reverse order on card stats screen. (#3951) 2025-04-26 12:09:40 +10:00
user1823
9872645d5a
Update sorting by R for FSRS 6 (#3949)
* Update sorting by R for FSRS 6

* Update sqlite.rs
2025-04-26 12:05:38 +10:00
Jarrett Ye
a5778f3377
Fix/FSRS-6 doesn't give <1d intervals & use log loss instead of RMSE(bins) (#3948)
* Fix/FSRS-6 doesn't give <1d intervals

https://forums.ankiweb.net/t/anki-25-05-beta-1/59710/8?u=l.m.sherlock

* use log loss instead of rmse to determine use which parameters
2025-04-26 12:05:13 +10:00
RREEMMII
0321c26e73
Fix docs of note_fields_check to match changes made in PR #3912 (#3944)
Co-authored-by: Rémi Deloye <remi.deloye@telecom-paris.fr>
2025-04-26 11:55:40 +10:00
Jarrett Ye
7556f71b96
Update to FSRS-rs v3.0.0 (fix historic memory state) (#3946)
* Update to FSRS-rs v3.0.0 (fix historic memory state)

* format
2025-04-25 20:09:19 +10:00
Damien Elmes
365d50012c Add another contributor to the about screen as requested 2025-04-25 18:42:54 +10:00
Jonathan Schoreels
863fe3cd50
Add a way to pass information from browser_will_search to browser_did_search without having it going to the backend (#3945)
* Add a way to pass information from browser_will_search to browser_did_search without having it going to the backend

* Allow None for SearchContext.properties

* Adding myself in CONTRIBUTORS

* Rename SearchContext.properties to SearchContext.addon_metadata

* Revert "Adding myself in CONTRIBUTORS"

This reverts commit a993577279.

* Reapply "Adding myself in CONTRIBUTORS"

This reverts commit f3ce51c83d.
2025-04-25 18:40:24 +10:00
Damien Elmes
0aaa6383f8 Bump version 2025-04-25 16:52:46 +10:00
Damien Elmes
ab17fc147c Update translations 2025-04-25 16:51:28 +10:00
Jarrett Ye
e096c462fa
Feat/FSRS-6 (#3929)
* Feat/FSRS-6

* update comment

* add decay to Card

* ./ninja fix:minilints

* pass check

* fix NaN in evaluation

* remove console

* decay should fallback to 0.5 when it's None.

* Update SimulatorModal.svelte

* Update a few comments

* Update FSRS decay defaults to use constants for better maintainability and clarity

* Update rslib/src/storage/card/data.rs
2025-04-25 16:44:34 +10:00
llama
1e6c8b2006
Fix fields with \n being ignored when searching all fields w/o regex (#3943)
* add singleline flag to regex when searching all fields

* update test
2025-04-24 20:01:10 +10:00
Luc Mcgrady
e861364092
Fix/Calculate missing memory states on simulate (#3940)
* Fix: Recalculate memory states on simulate

* Fix: Wrong cards included

* Save states to cards

* ./check

* Update rslib/src/scheduler/fsrs/simulator.rs
2025-04-24 19:32:31 +10:00
llama
b5f15491a0
carry over tags when refetching csv metadata (#3938) 2025-04-24 19:18:57 +10:00
Luc Mcgrady
a2e0060470
Chore/Simulator modal i18n (#3927)
* Chore: Simulator i18n

* Buttons should be Title Case (dae)
2025-04-24 19:17:04 +10:00
Arthur Milchior
7bebcad864
Some documentation and reduce copy/paste (#3917)
* NF: document that cloze number are kept as they are in the field

I needed to know because {{c1 generate card 0 for example. And storing
the card ordinal would have been another consistent choice.

* NF: introduce method that return the cloze number in fields

This slightly reduce code duplication.

* Apply suggestions from code review
2025-04-24 19:02:11 +10:00
Evgeny Kulikov
fe2c1510ca
Add Cmd+W close shortcut (on Mac) to more dialogs (#3905)
* Enable Cmd+W shortcut in "Edit Current" on Mac

* Enable Cmd+W shortcut in "Fields" editor on Mac

* Enable Cmd+W shortcut in "Cards" editing on Mac

* Enable Cmd+W shortcut in "Sync" tab modal on Mac

* Enable Cmd+W shortcut in "Custom Study" tab modal on Mac

* Enable Cmd+W shortcut in Settings view on Mac

* Enable Cmd+W shortcut in Export dialogs on Mac

* Enable Cmd+W shortcut for getText dialog on Mac

* Enable Cmd+W shortcut in "Change Deck" on Mac

* Enable Cmd+W shortcut in Reposition dialog on Mac

* Enable Cmd+W shortcut in "Grade Now" dialog on Mac

* Enable Cmd+W shortcut in "Reset…" dialog on Mac

* Remove duplicate camelCase variant of add_close_shortcut (dae)

- The camelCase variant will remain accessible with a warning.
- The removed setattr line is legacy cruft, and wasn't doing anything.
2025-04-24 18:53:01 +10:00
Arthur Milchior
efaaae8ce4
Cloze button get disabled outside of cloze field (#3879)
* NF: replace `disabled` by `enabled`

This allows to remove the negations and, in my opinion, make the code
easier to understand and edit.

* Cloze button get disabled outside of cloze field

More specifically, if the user focus in a field that is not a cloze
field, the button are still there but appear as disabled. The shortcut
instead of adding the cloze context shows an alert explaining why this
can't be done.

While this message is already displayed when the user tries to add a
note with cloze in non-cloze field, I suspect it will save time to
stop the user as soon as possible from making mistake. This should
make very clear what is authorized and what is not.

It'll also be a reminder of whether the current field is a cloze or
not.

In order to do this, I added a back-end method (that I expect we may
reuse in ankidroid) to get the index of the fields used in cloze. This
set is sent to the note editor, which propagates it where needed.

In mathjax, the cloze symbol is removed when the selected field is not
a cloze field.
2025-04-24 18:37:41 +10:00
Damien Elmes
b23a6af63e Restore ability to check pages externally on other devices
Broken by the recent security changes
2025-04-24 18:33:09 +10:00
GithubAnon0000
aacf8ec774
Add help modal to TR table (#3874)
* Update TrueRetention.svelte adding description

* Update statistics.ftl to add additional info

* Swap TR with DR

* Change string to 'Is expected to'

* Add help modal to TR table

* Add tooltip slot to Graph.svelte (thanks @Luc-Mcgrady)

* Fix lint warning and failing test

* Remove unused code

* removedd on:mount to make eslint happy

* ADD back on:mount

* ADD back code needed for on:mount

* REMOVE openHelpModal() as I couldn't figure out how to make the title clickable

* attempt to ADD clickable title (BROKEN\!)

* Update ts/lib/components/TitledContainer.svelte

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* Update ts/routes/graphs/Graph.svelte

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* Update ts/routes/graphs/TrueRetention.svelte

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>

* ADD exported onTitleClick as @Luc-Mcgrady suggested

* REMOVE vite.config.ts file

---------

Co-authored-by: Luc Mcgrady <lucmcgrady@gmail.com>
2025-04-24 18:31:45 +10:00
Aristotelis
79b19a17a3
Add add-on scripts to editor CSP (#3942) 2025-04-24 15:28:25 +10:00