Commit Graph

10497 Commits

Author SHA1 Message Date
Damien Elmes
03edb7bf9e 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
c78de23cf9 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
0071094e6c Add warning about all clients needing to support FSRS 2023-09-23 14:05:28 +10:00
Damien Elmes
4ee021c3a7 Update FSRS 2023-09-23 14:05:28 +10:00
Abdo
9d6e819701
Support Qt.TextFormat.MarkdownText in aqt.utils (#2675) 2023-09-23 14:04:25 +10:00
Abdo
f78c59176e
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
4bfa0d78dc 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
c2b1ab5eb0
Skip template checks in Fields screen (#2670) 2023-09-20 16:09:54 +10:00
Abdo
9b8dfd2860
Fix error when closing Find Duplicates screen early (#2669) 2023-09-20 16:03:46 +10:00
Damien Elmes
fe3d587f48 Apply Svelte typing fix from Abdo
https://github.com/ankitects/anki/issues/2629#issuecomment-1724740151
2023-09-20 16:02:27 +10:00
Damien Elmes
93974567a7 Add a "no image found on clipboard" string
For #2664 and AnkiMobile
2023-09-20 15:48:52 +10:00
Damien Elmes
1510d19e17 Update translations 2023-09-20 15:25:02 +10:00
Damien Elmes
3ed7c75468 Allow saving state on Qt 6
It seems to work normally in Qt 6.5 (which has no tab support).

Previous issue: #1538.
2023-09-20 14:16:12 +10:00
Abdo
34f329b306
Fix intermittent browser error triggered by an early resize event (#2671) 2023-09-20 13:54:40 +10:00
Damien Elmes
303cb0ef65 Pull in weight clipping fix 2023-09-20 13:17:27 +10:00
Damien Elmes
b8ec76fb66 Fix crash when using FSRS with a low max interval setting 2023-09-20 13:14:03 +10:00
Damien Elmes
91538518b3 Fix "Add" button showing when editing I/O note; hide toast 2023-09-19 14:19:51 +10:00
Damien Elmes
d2a0e7825a Hide show/close buttons on mobile
iOS can't handle text fields that are potentially megabytes big, and
the close button is superfluous
2023-09-19 13:14:54 +10:00
Damien Elmes
6074865763 Calculate parameters automatically
Logic derived from d8e2f6a0ff

Closes #2661
2023-09-18 16:43:36 +10:00
Sam Waechter
e7bf248a62
Fix unable to save field dialog if certain fields are deleted (#2663)
* Fix unable to save field dialog if certain fields are deleted

Implemented solution suggested in issue #2556

* Fix unable to save field dialog if certain fields are deleted

fixed code formating

* Fix unable to save field dialog if certain fields are deleted

Made new functions to check referencelessness.  Added unit test.
2023-09-18 14:33:56 +10:00
Damien Elmes
a7b4c90146 Use field tags instead of hard-coding occlusion fields
+ Don't protect the comments field

It's not required by our current code. We can remove the protection
from Header and Back Extra in the future too, once we no longer depend
on them.

Closes #2621
2023-09-18 10:10:11 +10:00
Damien Elmes
906a937faf Add tags in DB check 2023-09-17 15:00:28 +10:00
Damien Elmes
f0be697b55 Protect image occlusion fields and cloze field 2023-09-17 14:22:25 +10:00
Damien Elmes
1e37c806e5 Add support for tagging + protecting fields 2023-09-17 14:03:42 +10:00
Damien Elmes
64e40033e0 Remove the fields_web experiment 2023-09-17 13:48:48 +10:00
Damien Elmes
daa61d47d5 Update fsrs-rs for updated burn pin 2023-09-17 13:38:21 +10:00
Damien Elmes
59759b468f Start on a 'get params' button 2023-09-17 12:58:13 +10:00
Damien Elmes
736054a2e4 Fix preset searches, and expose in text search 2023-09-17 12:51:22 +10:00
Damien Elmes
c0b4b3d0e7 Fix mask editor disappearing when saveNow() called
Closes #2619
2023-09-17 11:51:48 +10:00
Damien Elmes
170ab60a52 Remove the separate chevron in all/one selector 2023-09-17 11:51:48 +10:00
Damien Elmes
d441680984 Remove select image button in I/O
Closes #2620
2023-09-17 11:51:48 +10:00
Damien Elmes
812f5bc8be Bump version to 23.10
A stable release before October is unlikely at this point
2023-09-17 11:51:47 +10:00
Damien Elmes
25d5e56397 Clear memory state when user disables FSRS 2023-09-17 11:50:38 +10:00
Damien Elmes
75de1f9709 Record FSRS difficulty in the review log
Will allow user to see a record of difficulty changes, and allows us
to identify reviews that have been done with FSRS vs SM-2, since the
valid range is different.
2023-09-17 11:50:38 +10:00
Damien Elmes
0301ae1d8a fsrs_memory_state -> memory_state 2023-09-17 11:50:38 +10:00
Damien Elmes
5004cd332b
Integrate FSRS into Anki (#2654)
* Pack FSRS data into card.data

* Update FSRS card data when preset or weights change

+ Show FSRS stats in card stats

* Show a warning when there's a limited review history

* Add some translations; tweak UI

* Fix default requested retention

* Add browser columns, fix calculation of R

* Property searches

eg prop:d>0.1

* Integrate FSRS into reviewer

* Warn about long learning steps

* Hide minimum interval when FSRS is on

* Don't apply interval multiplier to FSRS intervals

* Expose memory state to Python

* Don't set memory state on new cards

* Port Jarret's new tests; add some helpers to make tests more compact

https://github.com/open-spaced-repetition/fsrs-rs/pull/64

* Fix learning cards not being given memory state

* Require update to v3 scheduler

* Don't exclude single learning step when calculating memory state

* Use relearning step when learning steps unavailable

* Update docstring

* fix single_card_revlog_to_items (#2656)

* not need check the review_kind for unique_dates

* add email address to CONTRIBUTORS

* fix last first learn & keep early review

* cargo fmt

* cargo clippy --fix

* Add Jarrett to about screen

* Fix fsrs_memory_state being initialized to default in get_card()

* Set initial memory state on graduate

* Update to latest FSRS

* Fix experiment.log being empty

* Fix broken colpkg imports

Introduced by "Update FSRS card data when preset or weights change"

* Update memory state during (re)learning; use FSRS for graduating intervals

* Reset memory state when cards are manually rescheduled as new

* Add difficulty graph; hide eases when FSRS enabled

* Add retrievability graph

* Derive memory_state from revlog when it's missing and shouldn't be

---------

Co-authored-by: Jarrett Ye <jarrett.ye@outlook.com>
2023-09-16 16:09:26 +10:00
Abdo
6f0bf58d49
Add a backend method to add notes in bulk (#2659)
* Add a backend method to add notes in bulk

* i -> idx

* Remove duplicate assignment

* Allow add_notes to work with multiple deck IDs

* Rename note_deck_id to requests
2023-09-16 13:51:32 +10:00
Abdo
8b0d663fd0
Allow full screen mode on new Qt6 drivers (#2660)
* Allow full screen mode on new Qt6 drivers

* Update fulscreen warning message
2023-09-16 11:28:20 +10:00
Damien Elmes
30ae9f7c54 Fix merge_undoable_ops() not updating counter 2023-09-15 16:53:00 +10:00
Damien Elmes
055d663970 Serialize CollectionOp, and QueryOp by default
Closes #2628
2023-09-15 15:28:26 +10:00
Abdo
e2603a73f5
Fix unescaped HTML in type-in-the-answer (#2658) 2023-09-14 11:34:22 +10:00
Abdo
120c6e165c
Fix tooltips not reflecting configured shortcuts (#2657) 2023-09-14 11:33:42 +10:00
Damien Elmes
81a4d531e3 Don't ask when no cards would be generated
https://forums.ankiweb.net/t/when-adding-cards-to-a-note-type-dont-show-this-will-create-0-cards/34237
2023-09-14 10:44:27 +10:00
Damien Elmes
87dc9aac4b Update translations 2023-09-14 09:24:08 +10:00
Damien Elmes
364c32fa79 Update profiling script 2023-09-14 09:23:44 +10:00
RumovZ
850043b49b
Tooltips for CSV import and import page refactoring (#2655)
* Make enum selector generic

* Refactor ImportCsvPage to support tooltips

* Improve csv import defaults

* Unify import pages

* Improve import page styling

* Fix life cycle issue with import properties

* Remove size constraints to fix scrollbar styling

* Add help strings and urls to csv import page

* Show ErrorPage on ImportPage error

* Fix escaping of import path

* Unify ImportPage and ImportLogPage

* Apply suggestions from code review (dae)

* Fix import progress

* Fix preview overflowing container

* Don't include <br> in FileIoErrors (dae)

e.g. 500: Failed to read '/home/dae/foo2.csv':<br>stream did not contain valid UTF-8

I thought about using {@html ...} here, but that's a potential security issue,
as the filename is not something we control.
2023-09-14 09:06:15 +10:00
platynowy
23823d3135
added Translator (#2653)
* added Translator

added myself to the list (translated Anki, AnkiMobile and Anki Manual to Polish

* Update CONTRIBUTORS
2023-09-12 14:13:08 +10:00
Hikaru Y
3742fa9f0c
Fix some issues with undo/redo in mask editor (#2649)
Issues:
- The `change` event was not dispatched in MaskEditor.svelte when an
undo/redo was performed. Therefore, if the user then closed the editor
or switched to another note without performing an operation that would
cause the `change` event to be dispatched, the undone or redone changes
were not saved to DB.
- When `IOMode.kind === "edit"` (i.e., Edit Current or Browse), the
beginning of the undo history was a blank canvas, not a canvas with
existing masks. Therefore, if you continued to undo to the beginning of
the history, the masks that existed when you opened the editor would be
lost, and they would not be restored even when you performed a redo.
- In the 'Add' dialog, the undo history was not reset when starting to
create a new IO note after adding an IO note.

Also add a small UI improvement:
The undo/redo buttons are now disabled when there is no action to
undo/redo.
2023-09-10 13:26:41 +10:00
Damien Elmes
bfef908c6c
Refactor media sync handling (#2647)
* Refactor media sync handling

- The media USN is now returned in sync/meta, which avoids an extra
round-trip.
- Media syncing is now automatically started by the syncing code at
the end of a normal or full sync, which avoids it competing for bandwidth
and resources, and avoids duplicate invalid login messages when the auth
token is invalid.
- Added a new media_sync_progress() method to both check if media is
syncing, and get access to the latest progress.
- Updated the sync log screen to only show the latest line, like AnkiMobile.
- Show media sync errors in a pop-up, so they don't get missed. Use a non-modal
pop-up to avoid potential conflicts with other modals.

* Remove print statement
2023-09-10 13:22:20 +10:00
Damien Elmes
89854ac2b9 Apply some fixes from Abdo
https://github.com/ankitects/anki/pull/2612#issuecomment-1712320801
2023-09-09 09:12:46 +10:00