Commit Graph

10828 Commits

Author SHA1 Message Date
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
Damien Elmes
987a46978b Update to PyQt 6.6.1
The new wheel appears to have fixed ABI issues on both Windows and Linux.
2023-12-06 09:20:42 +10:00
Damien Elmes
25bc32b1e2 Handle invalid install timestamps in add-ons
https://forums.ankiweb.net/t/anki-23-12-beta/37771/57
2023-12-06 09:20:42 +10:00
Jarrett Ye
80c5f2d491
skip revlog with time = 0 when calc recall cost (#2870)
* skip revlog with time = 0 when calc recall cost

* Update retention.rs
2023-12-05 13:08:34 +10:00
Akash Reddy
a5bdb28849
Fix Mathjax can only be pasted once (#2869)
* Fix mathjax can be pasted only once

* Update about.py

* Update CONTRIBUTORS

* fix formatting
2023-12-05 10:01:25 +10:00
user1823
884e8dcac5
Ignore rescheduled cards in old stats page (#2863)
* Ignore rescheduled cards in old stats page

Rescheduled cards are not actual reviews. So, including them in Cards Studied Today is inappropriate.

* Simplify SQL query

* Fix Answer Buttons graph

* Fix error

* Potentially fix error
2023-12-05 09:55:33 +10:00
Damien Elmes
4e281026a0 Catch NaNs in FSRS weights
Users pasting in weights from the old scheduler were leaving the outer
square brackets in, causing the first and last numbers to be parsed as
NaN.
2023-12-04 16:19:22 +10:00
Damien Elmes
cbab96ec75 Update to Qt 6.6.1 on Mac
This also fixes the Mac bundle using an old Qt version.

Linux held back due to ABI breakage; should be fixed in about a week
when PyQt 6.6.1 comes out. Windows build also fails to run - not sure
if it's the same issue or not.
2023-12-04 16:15:52 +10:00
Shawn M Moore
f447f89d07
Remember endpoint we authenticated against in returned SyncAuth (#2864)
* Include endpoint we authed against in response

* Add self to contributors
2023-12-04 15:05:29 +10:00
Abdo
91335b834f
Clear editor's internal copied text on cut/copy (#2866) 2023-12-04 15:04:49 +10:00
Abdo
344dbe45ed
Show actual due date of learning cards in Card Info (#2865) 2023-12-04 15:04:22 +10:00
Hikaru Y
820b833a43
Fix image overlay not closing when clicking outside on Qt6.6 (#2861)
* Add type to createEventDispatcher

* Fix image overlay not closing when clicking outside on Qt6.6

Use Event.composedPath() instead of obsolete Event.path
https://chromestatus.com/feature/5726124632965120
2023-12-04 14:57:03 +10:00
Abdo
843c0417b0
Fix auto advance state not being restored after focus change in some (#2860)
cases
2023-12-04 14:54:25 +10:00
Abdo
abd8759d50
Prefer image pastes over HTML in the editor (#2856) 2023-12-01 15:23:07 +10:00
Abdo
e2e9e37a31
Fix some RTL issues in help modals (#2857)
* Fix RTL position of close button in help modals

* Fix position of active button's border

* Fix margin of modal's title

* Fix alignment of modal buttons' text

* Add missing translation
2023-12-01 15:07:44 +10:00
Damien Elmes
75febab401 Fix relative overdueness order error in filtered deck
https://forums.ankiweb.net/t/anki-23-12-beta/37771/21
2023-12-01 14:54:33 +10:00
Damien Elmes
b29dc99b3e Fix sorting by due column in notes mode
https://forums.ankiweb.net/t/anki-23-12-beta/37771/20
2023-12-01 14:50:41 +10:00
Abdo
dc3bd3efde
Replace css_browser_selector with our own implementation (#2854)
* Replace css_browser_selector

* Add classes to root element instead of body

* Export addBrowserClasses() in reviewer_extras for mobile clients (dae)

* Avoid setting .mac on iOS devices (dae)
2023-11-30 10:57:33 +10:00
gustavosmendes1
1bca45176a
Added contributors and edit about (#2855) 2023-11-30 10:15:05 +10:00
Damien Elmes
4109d1e843 Update translations 2023-11-29 10:26:04 +10:00
Damien Elmes
063b6f60fd Rework error dialog
- Hide traceback
- Include full add-on info in 'copy debug info' button, like about
screen
- Link to troubleshooting page
- Use non-modal pop-up in the common case, to avoid potential conflicts
with other modals.

Closes #2830
2023-11-29 10:25:32 +10:00
Damien Elmes
e5170f341b Remove some v3 checks 2023-11-28 14:06:49 +10:00
Damien Elmes
7252dd56b6 Fix inability to save deck options when FSRS not enabled 2023-11-27 13:34:42 +10:00
Damien Elmes
123474c455 Update TS deps
Due to a change in svelte-check 3.5.2 (likely https://github.com/sveltejs/language-tools/pull/2146),
we can no longer have composite enabled, as svelte-check spits out errors
about files in other project references not being listed in included files.
This should hopefully not make a difference to us, as we weren't taking
advantage of TypeScript's project compilation, as svelte-check doesn't support
it, and we use esbuild for JS conversion.
2023-11-27 13:34:42 +10:00