Commit graph

10818 commits

Author SHA1 Message Date
Abdo
549f6f55a9 Improve confirmation message in Add screen (#2903) 2023-12-24 15:22:59 +10:00
Jarrett Ye
9af073cd0e Update to FSRS-4.5 (#2901) 2023-12-22 16:17:40 +10:00
Damien Elmes
b5270716b5 Update translations 2023-12-22 14:19:06 +10:00
msisovic
e852372c20 Fix macOS clipboard issues (#2900)
* Added double-check of clipboard change when pasting.

* Added comment explaining changes, updated CONTRIBUTORS and about.py
2023-12-22 14:18:19 +10:00
Abdo
bfac98d622 Offer to save changes when card layouts screen is closed (#2899) 2023-12-22 14:12:33 +10:00
Damien Elmes
08a7b3ccab Update FSRS
We're on the commit prior to
https://github.com/open-spaced-repetition/fsrs-rs/pull/141, as that is
going to require work that will need to wait until after 23.12
2023-12-22 14:02:39 +10:00
Damien Elmes
2a173fdca9 Force memory state recompute when cards moved into different deck 2023-12-22 14:02:39 +10:00
RumovZ
1ad343c22a Log existing notes during CSV import (#2898) 2023-12-22 14:01:35 +10:00
Abdo
f4cc9c0308 Do not close web pages when Esc is pressed and a modal is open (#2894)
* Prefer key over keyCode

* Do not close TS pages on Esc when floating elements are open

* Close pop-up when Escape is pressed regardless of keepOnKeyup

* Close help modals when Escape is pressed

* Avoid duplicate handling of Esc in WithFloating

* Formatting

* Handle closing of preset management modals

* Reset text input modal to initial value
2023-12-21 13:59:52 +10:00
Akash Reddy
37d0165fcc Fix opening card info window closes it when already open (#2896) 2023-12-21 13:57:32 +10:00
Damien Elmes
e5fa4791a7 Use seconds instead of minutes for preview delay
Since this is not compatible with older clients, preview_delay has been
brought back so the configured value will still sync.
2023-12-21 11:02:29 +10:00
Damien Elmes
022fa10821 Hack around overflow in some languages
The problem at the moment is that the two left buttons are not part
of the scrollable area on the right, and the scrollable area has been
manually positioned. We would need to move the buttons into the toolbar
area, and then hide them when using the desktop editor. For now, I've
just added wrapping/smaller text instead.

https://forums.ankiweb.net/t/image-occlusion-editor-buttons-overlap-in-some-languages/38499
2023-12-18 13:34:05 +10:00
Damien Elmes
ac458609c4 Update translations 2023-12-18 13:20:17 +10:00
Damien Elmes
09c506a682 Update zerocopy for soundness fix 2023-12-16 09:48:30 +10:00
Damien Elmes
f7a653a76c Defer page cleanup to prevent API access warning 2023-12-16 09:45:58 +10:00
user1823
e29c9cd81a Correct the description of FSRS Difficulty in Stats (#2888)
* Correct the description of FSRS difficulty

* Update DifficultyGraph.svelte

* Update statistics.ftl
2023-12-14 12:48:58 +10:00
Damien Elmes
ec8415f8f7 Preserve _renderStats() signature to avoid add-on breakage 2023-12-14 10:57:50 +10:00
Damien Elmes
3b3d9444b8 Calculate elapsed days for intraday learning cards
https://forums.ankiweb.net/t/anki-23-12-beta/37771/109
2023-12-13 10:18:29 +10:00
Damien Elmes
40fe8fc0c8 Update translations 2023-12-13 09:23:46 +10:00
Abdo
87f29c335e More fixes for auto advance state (#2879)
* Disable auto advance on review cleanup

* Fix auto advance state resetting on card flip when bottom bar is focused

* Move focus handling to reviewer

* Simplify destruction of previous timers

* Fix auto advance firing early

* Fix handling of 'wait for audio'

* Remove unused import

* When focus is lost, disable auto advance (dae)

Otherwise it will resume when the user answers a card, which is
surprising.
2023-12-13 09:23:11 +10:00
Gustaf-C
507f2c8ccf Add hint for zero minutes in filtered deck (#2887) 2023-12-13 09:07:09 +10:00
Gustaf-C
6f5ed40ff0 Change link to manual in help screen from icon to text (#2886)
* Change help screen link to manual from icon to text

* Fix auto advance manual link (dae)
2023-12-13 09:03:05 +10:00
Damien Elmes
a55d708a10 Better approximate average retention/ease/difficulty
Our average calculation is based on pre-binned values, so it's not
entirely accurate, but using the midpoint of the bin brings us closer.
In the future we can solve this by calculating it on the Rust end instead.
2023-12-12 15:09:13 +10:00
Damien Elmes
ea0a9e13b7 Fix unwanted border on macOS
https://forums.ankiweb.net/t/anki-23-12-beta/37771/106
2023-12-12 14:43:48 +10:00
Damien Elmes
701e0b7e60 Fix error generating parameters when a parameter is 0 2023-12-12 12:33:32 +10:00
Damien Elmes
c7162781c0 Move globe icon into separate Svelte file
Confirmed correct layout in RTL mode.

I experimented with adding a tooltip as well, as suggested in
https://forums.ankiweb.net/t/anki-23-12-beta/37771/82, but it's
confusing as we already change the mouse cursor/underline when the user
hovers over a label. Given the help text universally starts with
"affects the entire collection", I think that's good enough.
2023-12-12 12:33:31 +10:00
Damien Elmes
9c3cf6af57 Ensure cloze numbers sort in order
https://forums.ankiweb.net/t/anki-23-12-beta/37771/103
2023-12-12 09:51:42 +10:00
Damien Elmes
935f50cfff Don't use SM2 memory state when cards are manually introduced
https://github.com/open-spaced-repetition/fsrs4anki/issues/540#issuecomment-1848833376
2023-12-12 09:40:31 +10:00
Damien Elmes
f40d3194e7 Fix underscores in MathJax breaking rendering
Report:
https://forums.ankiweb.net/t/anki-23-12-beta/37771/51

\ln ^{\alpha} x \text{______} x^{\beta}\text{______}a^{x}

Cause:
https://github.com/mathjax/MathJax/issues/2566#issuecomment-727579057
2023-12-11 15:00:56 +10:00
Damien Elmes
60f2b23ae7 Show tooltip when auto-advance enabled/disabled 2023-12-11 14:43:12 +10:00
Damien Elmes
a9f70b64e3 Give a hint about optimizing all presets 2023-12-11 14:27:17 +10:00
Damien Elmes
7cb9b93b43 Fix some issues with toggle mask shortcut
- We were registered another event handler for each card, which was a
resource leak, and would lead to the shortcut failing on every second card
due to the even number of toggles.
- We were allowing toggleMasks() to run even when the button wasn't visible
(e.g., when showing the question side of a card)
2023-12-11 14:02:19 +10:00
Damien Elmes
907fa891d6 Split "auto advance" into a separate section 2023-12-11 13:47:34 +10:00
Damien Elmes
7e27f8a72a Invert seconds to show question/answer; tweak wording
The previous wording could be interpreted as 'time until showing question'
or 'time that question should be shown'. I'd intended the latter, and
I didn't notice that the original implementation was doing the former.
2023-12-11 13:40:44 +10:00
Damien Elmes
9248bb62e9 Allow decimal timer delays 2023-12-11 13:17:04 +10:00
Damien Elmes
6f75b2eee2 Fix incorrect search being used when evaluating parameters
https://forums.ankiweb.net/t/anki-23-12-beta/37771/89
2023-12-11 13:09:48 +10:00
Damien Elmes
9107084f4a Catch another invalid-timestamp error
https://forums.ankiweb.net/t/anki-23-12-beta/37771/88
2023-12-11 12:39:20 +10:00
Damien Elmes
dbf9460e06 Revert "Prefer image pastes over HTML in the editor (#2856)"
This reverts commit 6e6dab3993.

Rolling this back for now, as it's caused a couple of regressions:

- In the old path, we returned (html, internal=False); in the new path,
it's returned as internal=True, which prevents formatting from being
stripped. This requires night mode to reproduce, as we don't strip text
colors in day mode.
- It can result in lost alt tags and filenames, as after right clicking on an
image in Chrome and choosing 'copy image', Chrome puts both the HTML and
the image on the clipboard

Related discussion: https://forums.ankiweb.net/t/anki-23-12-beta/37771/90
2023-12-11 12:27:41 +10:00
Damien Elmes
d9ed327f13 Another fix for unfocused input box in Qt 6.6.1 2023-12-11 11:54:47 +10:00
Damien Elmes
67c188c7f9 Fix revert icon position in RTL 2023-12-11 09:20:10 +10:00
RumovZ
25a96a1b78 Fix Select component not reacting to changed list (#2885)
* Fix Select component not reacting to changed list

Fixes #2882.

* Add msys to path on Windows in VSC settings
2023-12-11 09:12:34 +10:00
Abdo
07d9cec88e Fix IO note count (#2884) 2023-12-10 12:55:47 +10:00
Damien Elmes
5a9f9433ba Don't allow HTML in Select fields
If there's somewhere where we do need it, we should make it opt-in,
as stripping is the safe default.

Closes #2883
2023-12-10 12:47:21 +10:00
Damien Elmes
88f3ac0422 Rework rollover check
- Avoid waking up frequently
- Ensure collection access happens before sync begins, as otherwise
it may block the UI
2023-12-10 12:37:01 +10:00
Damien Elmes
cc8d110612 Ensure deck browser fetches collection data in the background 2023-12-10 12:37:01 +10:00
Damien Elmes
f4a8bb12c8 Log long-running calls on the UI thread 2023-12-10 12:37:01 +10:00
Damien Elmes
1f8f7fd79b Fix sync status check blocking collection access 2023-12-10 12:37:01 +10:00
Abdo
d7fcfd3c72 Persist mask group scaling (#2878)
* Persist mask group scaling

Handles the first issue in #2876

* Fix selection resizing
2023-12-10 10:02:47 +10:00
Damien Elmes
5c2a47ed29 Further speed up deck options load
Profiling revealed that binding to clientWidth for each component in
the deck options was taking up a sizable amount of time, due to the
inefficient way it's implemented: https://github.com/sveltejs/svelte/issues/7583

In one case, we can instead defer checking clientWidth until we go to
display the popover. In the other case, we can achieve the revert button
positioning a different way.

The last change dropped the speed index in Chrome from 1.4s to 1s; this
change brings it down to 0.7s.

Also fixed the hovered select element from jiggling due to a different
border width when hovering.
2023-12-08 15:10:35 +10:00
Damien Elmes
a758ca7343 Update translations 2023-12-08 14:01:27 +10:00