Commit Graph

335 Commits

Author SHA1 Message Date
Damien Elmes
0b8b168df1 Add confirmation for upload 2023-11-07 11:11:07 +10:00
Damien Elmes
e2ee6b7d44 Add an info box so the non-linear nature of desired retention can be seen 2023-11-06 12:04:31 +10:00
Damien Elmes
a58b2a986c Clarify 1+ day warning 2023-11-05 14:05:03 +10:00
Damien Elmes
329ac92c5e weights -> parameters
Closes #2807
2023-11-05 13:44:40 +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
e0d2866f79 Prompt user to save preset changes before they compute weights
Closes #2797
2023-11-04 11:46:29 +10:00
Damien Elmes
235b6aa2e4 Move 'review' out of 'no need to translate' section 2023-11-04 08:45:02 +10:00
Damien Elmes
d744a7cceb Add tooltip to mask editor button 2023-11-03 21:55:38 +10:00
Damien Elmes
726a59118f Split sidebar review string
https://forums.ankiweb.net/t/im-trying-to-improve-the-translation-but-i-cant-find-it-in-one-place-please-help-me/35335/19
2023-11-03 21:25:10 +10:00
Damien Elmes
ea84ca9300 Split 'due' translation in deck browser 2023-11-02 21:15:02 +10:00
Damien Elmes
4a3785c03c Conflict handling -> Updates 2023-10-28 13:16:13 +10:00
Damien Elmes
55134435f2 Mention 'custom scheduling' and link to FSRS in manual 2023-10-28 12:47:55 +10:00
Damien Elmes
843ac9eff9 Migrate some auto advance strings over from AnkiMobile 2023-10-28 12:31:51 +10:00
Damien Elmes
bbe9dc5186 Split translation of learn in the deck list
Closes #2708
2023-10-26 11:23:24 +10:00
Damien Elmes
9362ef9620 Tweaks to import screen
- Tweak wording
- Move conflict handling options to a disclosure
2023-10-26 11:23:24 +10:00
Damien Elmes
9a027a8c48 Warn users about rescheduling 2023-10-26 11:23:24 +10:00
Damien Elmes
ecb12e44e1 Fix title case 2023-10-23 12:05:33 +10:00
Damien Elmes
aab81f9f9a Add tooltips for image occlusions
Closes #2768
2023-10-23 12:03:22 +10:00
Damien Elmes
5098ecce24 Tweak some of the graph descriptions 2023-10-20 12:58:07 +10:00
user1823
4c17a6964e
Rename Analyze to Evaluate in FSRS Deck Options (#2741)
* Update deck-config.ftl

* Update FsrsOptions.svelte

* Update CONTRIBUTORS
2023-10-17 09:53:24 +10:00
Damien Elmes
6e177851cc Add help entries for FSRS options 2023-10-13 12:50:15 +10:00
Damien Elmes
bfe340c163 Don't provide a button to copy estimated retention into desired retention
It's too easy for the user to end up with silly values if their configured
time/day is not reasonable.
2023-10-13 12:38:47 +10:00
Damien Elmes
003cdfd2ec Use sm2 retention when deriving memory state
Closes #2702
2023-10-13 10:37:35 +10:00
Damien Elmes
e525704571 Clarify stability subtitle
Based on #2699. Closes #2699.
2023-10-03 14:40:41 +10:00
Damien Elmes
259ed9c34d Show tooltip on sync completion
Closes #2695
2023-10-03 12:57:39 +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
Abdo
074f452762
Allow creating an image occlusion from the clipboard (#2689)
* Allow creating an image occlusion from the clipboard

* Refactor pasted image name construction into methods

* Reduce button's top padding

* Fix capitalization

* Fix quality parameter of pasted image

* Fix lint errors

* setup_mask_editor_for_file -> setup_mask_editor

* Select -> Paste

* Extract image reading logic

* Fix inlinedImageToFilename
2023-09-29 15:51:44 +10:00
Damien Elmes
da027bccd9 Tweak some wordings 2023-09-27 16:37:03 +10:00
Damien Elmes
65c2381f4d x% complete 2023-09-27 16:24:25 +10:00
Michael Eliachevitch
2580399552
Button to set desired FSRS retention to optimal/calculated (#2685)
* Draft set optimal/calculated retention button

Temporarily save the calculated optimal retention and display it with a button
that sets the desired retention above to this value.Don't show button until
attention had been calculated. Disable button when optimal and desired
attention are equal.

I find this nicer than the current alert-popup solution, as it avoids a popup
and gives a choice to the user to accept the calculated retention or not, while
also persisting the calculated retention on the screen for a bit.

TODO: What's still missing is that the `optimalRetention` variable is global and
persists when I change presets. When changing presets the variable should reset to
`undefined`, which would also makes the button disappear. Ideally it should also
disappear when changing the FSRS parameters. So probably it should be made part
of some deck options state and subscribe to some events. But with that I might
need some help. Also I thought whether that variable should go into the deck
options schema but tbh it's not something we want to persist between sessions,
users should recalculate it.

* Add me to contributors for tests so pass

* Add formatting ant type fixes to make tests pass

* Minor fixes (dae)

* Remove the period
2023-09-27 16:12:49 +10:00
Abdo
ab7e64865e
Implement "stop timer on answer" as a preset option (#2686)
* Implement "stop timer on answer" as a preset option

* Hide timer setting on AnkiMobile (dae)
2023-09-27 16:10:14 +10:00
Damien Elmes
17cfec5e35 Prohibit weight generation when reps < 1000 2023-09-25 16:17:00 +10:00
Damien Elmes
baae685dbb UI tweaks
https://forums.ankiweb.net/t/anki-23-10-beta-1/34912/19
2023-09-25 15:54:18 +10:00
Damien Elmes
ba9ee93fa8 Expose deck-then-random option in UI 2023-09-25 11:12:28 +10:00
Damien Elmes
e6fdfc20a9 Use FSRS difficulty when sorting by ease 2023-09-23 16:20:36 +10:00
Damien Elmes
0071094e6c Add warning about all clients needing to support FSRS 2023-09-23 14:05:28 +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
93974567a7 Add a "no image found on clipboard" string
For #2664 and AnkiMobile
2023-09-20 15:48:52 +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
1e37c806e5 Add support for tagging + protecting fields 2023-09-17 14:03:42 +10:00
Damien Elmes
59759b468f Start on a 'get params' button 2023-09-17 12:58:13 +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
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
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
Damien Elmes
9d14fcf79d Add a missing word to translations 2023-09-09 09:06:18 +10:00
RumovZ
14de8451dc
Merging Notetypes on Import (#2612)
* Remember original id when importing notetype

* Reuse notetypes with matching original id

* Add field and template ids

* Enable merging imported notetypes

* Fix test

Note should be updated if the incoming note's notetype is
remapped to the existing note's notetype.
On the other hand, it should be skipped if its notetype id is mapped
to some new notetype.

* Change field and template ids to i32

* Add merge notetypes flag to proto message

* Add dialog for apkg import

* Move HelpModal into components

* Generalize import dialog

* Move SettingTitle into components

* Add help modal to ImportAnkiPackagePage

* Move SwitchRow into components

* Fix backend method import

* Make testable in browser

* Fix broken modal

* Wrap in container and fix margins

* Update commented Anki version of new proto fields

* Check ids when comparing notetype schemas

* Add tooltip for merging notetypes.

* Allow updating notes regardless of mtime

* Gitignore yarn-error.log

* Allow updating notetypes regardless of mtime

* Fix apkg help carousel

* Use i64s for template and field ids

* Add option to omit importing scheduling info

* Restore last settings in apkg import dialog

* Display error when getting metadata in webview

* Update manual links for apkg importing

* Apply suggestions from code review

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

* Omit schduling -> Import all cards as new cards

* Tweak importing-update-notes-help

* UpdateCondition → ImportAnkiPackageUpdateCondition

* Load keyboard.ftl

* Skip updating dupes in 'update alwyas' case

* Explain more when merging notetypes is required

* "omit scheduling" → "with scheduling"

* Skip updating notetype dupes if 'update always'

* Merge duplicated notetypes from previous imports

* Fix rebase aftermath

* Fix panic when merging

* Clarify 'update notetypes' help

* Mention 'merge notetypes' in the log

* Add a test which covers the previously panicking path

* Use nested ftl messages to ensure consistency

* Make order of merged fields deterministic

* Rewrite test to trigger panic

* Update version comment on new fields
2023-09-09 09:00:55 +10:00
Abdo
98715e593a
Improve presentation of importing results (#2568)
* Implement import log screen in Svelte

* Show filename in import log screen title

* Remove unused NoteRow property

* Show number of imported notes

* Use a single nid expression

* Use 'count' as variable name for consistency

* Import from @tslib/backend instead

* Fix summary_template typing

* Fix clippy warning

* Apply suggestions from code review

* Fix imports

* Contents -> Fields

* Increase max length of browser search bar

https://github.com/ankitects/anki/pull/2568/files#r1255227035

* Fix race condition in Bootstrap tooltip destruction

https://github.com/twbs/bootstrap/issues/37474

* summary_template -> summaryTemplate

* Make show link a button

* Run import ops on Svelte side

* Fix geometry not being restored in CSV Import page

* Make VirtualTable fill available height

* Keep CSV dialog modal

* Reword importing-existing-notes-skipped

* Avoid mentioning matching based on first field

* Change tick and cross icons

* List skipped notes last

* Pure CSS spinner

* Move set_wants_abort() call to relevant dialogs

* Show number of imported cards

* Remove bold from first sentence and indent summaries

* Update UI after import operations

* Add close button to import log page

Also make virtual table react to resize event.

* Fix typing

* Make CSV dialog non-modal again

Otherwise user can't interact with browser window.

* Update window modality after import

* Commit DB and update undo actions after import op

* Split frontend proto into separate file, so backend can ignore it

Currently the automatically-generated frontend RPC methods get placed in
'backend.js' with all the backend methods; we could optionally split them
into a separate 'frontend.js' file in the future.

* Migrate import_done from a bridgecmd to a HTTP request

* Update plural form of importing-notes-added

* Move import response handling to mediasrv

* Move task callback to script section

* Avoid unnecessary :global()

* .log cannot be missing if result exists

* Move import log search handling to mediasrv

* Type common params of ImportLogDialog

* Use else if

* Remove console.log()

* Add way to test apkg imports in new log screen

* Remove unused import

* Get actual card count for CSV imports

* Use import type

* Fix typing error

* Ignore import log when checking for changes in Python layer

* Apply suggestions from code review

* Remove imported card count for now

* Avoid non-null assertion in assignment

* Change showInBrowser to take an array of notes

* Use dataclasses for import log args

* Simplify ResultWithChanges in TS

* Only abort import when window is modal

* Fix ResultWithChanges typing

* Fix Rust warnings

* Only log one duplicate per incoming note

* Update wording about note updates

* Remove caveat about found_notes

* Reduce font size

* Remove redundant map

* Give credit to loading.io

* Remove unused line

---------

Co-authored-by: RumovZ <gp5glkw78@relay.firefox.com>
2023-08-02 20:29:44 +10:00
Damien Elmes
a35c1a058d Extract inline images as part of media check
We also need to get to the bottom of what's causing this:
https://forums.ankiweb.net/t/anki-browse-extremely-laggy/32533
2023-07-31 12:23:16 +10:00
Mani
135de7f9ed
image occlusion button in note editor (#2485)
* setup mask editor in note editor
- add image on mask button click (only one time)
- show hide add button for io on notetype change
- hide field in io notetype
- icon for toggle
and replace image

* add update io notes

* Tidy up i/o notetype check and fix error

- Make it a method on editor
- Use .get(), because the setting doesn't exist on older notetypes
- Pass the bool value into the ts code, instead of the enum

* reset io page after adding

* remove adjust function & add target for mask editor

* handle browse mode & merged sidetoolbar and toptoolbar to toolbar

* fix: shape, button click in browse, dropdown menu

* add arrow to add button

* store for handling visiblity of maskeditor
- remove update  button in edit mode, implement autoupdate

* update var name

* simplify store
2023-07-27 22:45:49 +10:00