Commit Graph

10851 Commits

Author SHA1 Message Date
Damien Elmes
edd38ca067 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
400686d2ae Update translations 2023-12-13 09:23:46 +10:00
Abdo
aa71313d12
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
eb58863a7c
Add hint for zero minutes in filtered deck (#2887) 2023-12-13 09:07:09 +10:00
Gustaf-C
1b0ccfd243
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
129157eb21 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
00da2ac27b 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
9205b4db3a Fix error generating parameters when a parameter is 0 2023-12-12 12:33:32 +10:00
Damien Elmes
980594252d 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
45abf1c7e8 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
db93939ded 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
70ee28b559 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
5f0a74e01f Show tooltip when auto-advance enabled/disabled 2023-12-11 14:43:12 +10:00
Damien Elmes
50796e53b4 Give a hint about optimizing all presets 2023-12-11 14:27:17 +10:00
Damien Elmes
1ec769f1ae 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
9933e2ab54 Split "auto advance" into a separate section 2023-12-11 13:47:34 +10:00
Damien Elmes
8157d88038 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
699a63b85a Allow decimal timer delays 2023-12-11 13:17:04 +10:00
Damien Elmes
4f10a2818f 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
c56efb4442 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
174a2e7bc5 Revert "Prefer image pastes over HTML in the editor (#2856)"
This reverts commit abd8759d50.

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
4e63e61b22 Another fix for unfocused input box in Qt 6.6.1 2023-12-11 11:54:47 +10:00
Damien Elmes
b36f367030 Fix revert icon position in RTL 2023-12-11 09:20:10 +10:00
RumovZ
c11e40b11b
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
6f3550464d
Fix IO note count (#2884) 2023-12-10 12:55:47 +10:00
Damien Elmes
93738d1656 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
c09a46f857 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
e9a8b676a7 Ensure deck browser fetches collection data in the background 2023-12-10 12:37:01 +10:00
Damien Elmes
6b3381afef Log long-running calls on the UI thread 2023-12-10 12:37:01 +10:00
Damien Elmes
a7d7301d33 Fix sync status check blocking collection access 2023-12-10 12:37:01 +10:00
Abdo
548aca5b4f
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
97f43fbd45 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
e2625d648b Update translations 2023-12-08 14:01:27 +10:00
Damien Elmes
183d69be22 Ensure progress windows get cleaned up
Closes #2872
2023-12-08 13:54:32 +10:00
Damien Elmes
cfc6bc6548 Update FSRS for new default weights 2023-12-08 13:54:31 +10:00
Damien Elmes
f10a29a93d Make help button more obvious, and remove hover animations
There's been a fair bit of talk on the forums about users not discovering
the help info, so this will hopefully make finding it easier.

Ideally we'd use a single var(--fg), but it feels a bit too strong in
light mode.

The animations we were showing on hover/focus made the UI feel
laggy. This has come up before, and we already disable them for buttons.
I experimented with removing the transitions (but keeping the change on
hover) - it feels much more responsive, but I also didn't feel that it
was contributing anything useful - the user knows where they've placed
the mouse or cursor, and the extra movement feels like a bit of a
distraction. Happy to discuss if people feel differently, though.
2023-12-08 13:39:56 +10:00
Damien Elmes
b103e09a5e Fix non-local .html testing 2023-12-08 12:43:09 +10:00
Damien Elmes
29e98721b5 Fix slow deck options performance
column-count was causing progressively-worse performance. By switching
to manual left/right column assignment, we get faster performance and
retain the top-to-bottom/left-to-right flow.

This also removes the outer DynamicallySlottable, which as far as I'm
aware, is not used by any add-ons.

Closes #2877
2023-12-08 12:09:26 +10:00
Damien Elmes
7664248550 Add a globe icon to global icons
Currently 80% of voters favor the globe, so I'm going to tentatively
call it.

https://forums.ankiweb.net/t/activating-fsrs-on-one-preset-activates-it-on-all-presets/36947/16
2023-12-08 11:18:13 +10:00
Damien Elmes
e778cba089 Allow user to configure hard/good buttons when rescheduling off
Closes #2858
2023-12-08 11:04:34 +10:00
Damien Elmes
fdcdc14f6b Hide position when card not new
https://forums.ankiweb.net/t/position-info-is-shown-even-when-the-card-is-not-new/38087
2023-12-08 10:06:14 +10:00
Damien Elmes
86aafa74a6 Treat cards with no reps like new cards
https://github.com/open-spaced-repetition/fsrs4anki/issues/540#issuecomment-1837780217
2023-12-07 14:56:39 +10:00
Damien Elmes
96ae3a5d63 Update to latest fsrs-rs
The extra entries in Cargo.lock and licenses.json are mostly spurious,
and caused by https://github.com/tracel-ai/burn/pull/1025#issuecomment-1842006690
2023-12-07 14:13:58 +10:00
Gustaf-C
63260631e4
Include elapsed_secs in learning card state (#2862)
* Include elapsed_time in learning card state

* Suggested updates, elapsed_time -> elapsed_secs

* Remove outdated comment
2023-12-06 16:40:22 +10:00
Damien Elmes
9364dad49a Fix filter area not starting focused on Qt 6.6.1
https://forums.ankiweb.net/t/dialog-windows-no-longer-focus-inputbox/37880
2023-12-06 14:30:46 +10:00
Abdo
80d58728d5
Fix TTS not working properly with auto advance (#2874)
* Fix TTS not working properly with auto advance

* Restore cb() call in error path (dae)
2023-12-06 11:45:33 +10:00
Damien Elmes
5daafef5e6 Fix mpv idle notification not using main thread
Message arrived on a background non-Qt thread, and called run_in_background(),
which assumes it's running on the GUI thread. This resulted in single_shot()
failing to run in reviewer's on_av_player_did_end_playing on Linux/macOS.
2023-12-06 11:40:05 +10:00
Damien Elmes
425d9e3fe1 Fix mpv not working out of the box in win32 source build
Regressed in 711c28e1a5
2023-12-06 11:34:56 +10:00
Jarrett Ye
96ae3dce48
Fix/keep two decimals for stability (#2873)
* Fix/keep two decimals

* update test
2023-12-06 10:08:52 +10:00
Abdo
27b2bce604
Do not add a fallback field reference if front side contains conditionals (#2859)
* Do not add a fallback field ref if front contains conditionals

* Ensure field reference when there are only conditionals
2023-12-06 10:06:28 +10:00