Commit graph

11565 commits

Author SHA1 Message Date
Damien Elmes
acaeee91fa Bump version 2025-02-06 22:59:27 +07:00
Damien Elmes
20561414b2 Update translations 2025-02-06 22:59:19 +07:00
llama
da8c0f0e9b
clear io image field when resetting in add mode (#3794) 2025-02-06 22:58:49 +07:00
Damien Elmes
f893ec63af Prompt user to apply Windows updates when SSL connection fails
See #3793
2025-02-06 22:57:15 +07:00
Damien Elmes
50c1155eb7 Give editcurrent its own menubar too
Closes #3785
2025-02-06 18:57:59 +07:00
Danika-Dakika
6e7dcad542
Update Deck Options strings to clarify Timers (#3792)
* Update CONTRIBUTORS

added myself

* Update about.py

added myself

* Update scheduling.ftl

timers-related string changes

* Update deck-config.ftl

timers-related string changes

* Update help-page.ts

timers-related string changes
2025-02-06 15:17:30 +07:00
llama
8dea502689
add cut handler in TagInput (#3791) 2025-02-06 14:26:44 +07:00
dependabot[bot]
0b7afea63e
Bump vitest from 2.1.3 to 2.1.9 (#3790)
Bumps [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest) from 2.1.3 to 2.1.9.
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Commits](https://github.com/vitest-dev/vitest/commits/v2.1.9/packages/vitest)

---
updated-dependencies:
- dependency-name: vitest
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-06 14:24:51 +07:00
Jarrett Ye
54679c5779
Fix/disable FSRS short-term scheduler if w[17] or w[18] is zero (#3788)
* Fix/disable FSRS short-term scheduler if w[17] or w[18] is zero

* fix bracket

* rename variable
2025-02-06 14:24:40 +07:00
llama
2cbcd79a84
Cap preview cols to prevent stall when csv is parsed with the wrong delimiter (#3786)
* cap csv import preview table at 1000 columns

* add fluent message

* show warning when preview table columns have been truncated

* simplify fluent message ($count will almost always be a big num)

* _tr -> tr
2025-02-06 14:23:43 +07:00
Luc Mcgrady
dd93691b9c
Added: SpinnerBox percentage symbol. (#3777)
* Added: Padded percentage symbol

* Added: Floating percentage

* ./check

* half finished comment

* Removed: redundant toStringValue function

* Removed: Accidental import

* Improved pointer-events:none

* Improve percentage alignment

* Improve leftmost percentage alignment

* Fix: Percentage sticks to left

* ./check

* Fix: IOS css

* ./check
2025-02-06 14:21:26 +07:00
Luc Mcgrady
93032cdceb
Delete y-axis titles for graphs (#3789)
* Remove simulator y axis labels

* Remove forgetting curve y-axis title

* ./check

* Mark the card-stats string as deprecated as well (dae)
2025-02-06 14:17:39 +07:00
Damien Elmes
de7a693465 Latest openssl CVE 2025-02-03 15:17:07 +07:00
Jarrett Ye
7781d1b471
Update to FSRS-rs v2.0.3 (fix simulator) (#3784) 2025-02-02 23:35:34 +07:00
llama
009a683e62
Fix discard changes randomly being a noop on certain linux systems (#3781)
* fix discard changes randomly being a noop on certain linux systems

* use QApplication.setActiveWindow instead

* revert current impl

* wait for the next event loop iter before calling activeWindow
2025-02-02 23:31:36 +07:00
llama
fab939e0e1
add image context menu actions for io mask editor (#3779) 2025-01-31 00:06:29 +11:00
llama
3641030b35
fix error when right-clicking empty space in update addons dialog (#3780) 2025-01-30 23:42:27 +11:00
Expertium
ca9fb505aa
Added "preset" to "Optimize all" and "Optimize current" (#3778)
I think this one really calls for a poll. Dae, I highly suggest you to ask multiple users whether "Optimize current" and "Optimize all" are clear enough or need "preset". I'm pretty sure most people will find it confusing without "preset".
2025-01-30 23:41:01 +11:00
llama
56dd93b5be
Add drag/drop support when adding IO images (#3776)
* allow adding images via drag/drop when adding io

* support editing io notes as well

Co-authored-by: Abdo <abdo@abdnh.net>

---------

Co-authored-by: Abdo <abdo@abdnh.net>
2025-01-27 18:58:58 +03:00
llama
00501c267c
fix copying images with filenames containing reserved chars (#3775) 2025-01-27 16:57:31 +03:00
Damien Elmes
b65fa693da Hack in a fix for wheel generation 2025-01-27 01:20:58 +11:00
Damien Elmes
7a61e52576 Auto-expand bundle progress in Buildkite on Linux 2025-01-26 19:37:34 +11:00
Damien Elmes
c398baca7a Bundling got broken in the revert to Qt 6.6 2025-01-26 19:32:01 +11:00
Damien Elmes
92b1144d97 Bump Rust to 1.84
+ fix new warnings/lints
+ update pyo3 to fix some other warnings
2025-01-26 18:51:21 +11:00
Damien Elmes
a05e41e035 Update translations 2025-01-26 18:20:40 +11:00
Damien Elmes
169d85883d Reviews graph: orange -> blue
Closes #3764
2025-01-26 17:45:14 +11:00
Damien Elmes
5ccc6304e3 Fix drag&drop on some Linux systems
Thanks to Ab_Bc:
https://forums.ankiweb.net/t/image-occlusion-not-working-jan-2025/54523/17

Closes #3767
2025-01-26 17:31:54 +11:00
Damien Elmes
5c84a0cb5e
Fall back to SM2 relative order when memory state missing (#3771)
Closes #3770
2025-01-26 17:26:46 +11:00
Damien Elmes
71ae5a6b67 Use a simple menubar for addcards on macOS
This makes initial-open and reopen behaviour consistent.

Closes #3659
2025-01-26 17:05:09 +11:00
Damien Elmes
7884edfd3a
Yarn 4 (#3772)
* Update to yarn 4, and pin the version

* Use yarn to invoke prettier, as yarn 4 is not setting +x

* Fix a few peer dependency warnings
2025-01-26 14:40:17 +11:00
Mike Hardy
2ef46afb48
build: specify the canvas transitive node dependency build failure workaround in future-compatible way (#3752)
* fix: specify canvas npm optional dep ignore workaround more cleanly

this should allow it to work with yarn classic and yarn modern

* chore: add self to CONTRIBUTORS
2025-01-26 11:57:30 +11:00
Jarrett Ye
43e860783b
Fix/re-optimize FSRS if short-term param is weird (#3742)
* Fix/re-optimize FSRS if short-term param is weird

* Reset progress when another run is required (dae)

* only count the same-day steps

* Fix flicker when optimizing again (dae)
2025-01-26 10:42:17 +11:00
Damien Elmes
5883e4eae8 Move Optimize All action into main deck options page
Closes #3696

I have no strong feelings about the message/button wordings or
layout, so if people have better suggestions, they are welcome.
2025-01-25 22:57:05 +11:00
Damien Elmes
c253d40d1d Use prettier's cache
Approximately halves runtime on my system
2025-01-25 22:52:25 +11:00
Damien Elmes
3d13d259bb Use Qt 6.8 on ARM Linux; add tools/run-qt6.8
Prior to this change, ./run fails out of the box on ARM systems, as Qt
wasn't available on PyPI until the 6.8 release.

Also added a script in tools/ for testing Qt6.8 issues on other platforms.
2025-01-25 21:59:31 +11:00
Damien Elmes
cd1824165f Revert "Qt 6.8.1"
This reverts commit 04228de666.

Anki 25.01 Beta 1 revealed a bunch of regressions with the latest
Qt, and zero reports of improvements from it, so we'll be better off
holding off on it for now, and perhaps reporting the deadkeys issue
to Qt once we've got a proper reproduction process.
2025-01-25 21:41:33 +11:00
Luc Mcgrady
f038d6726a
Fix: Simulator Ignores New Cards Already Introduced (#3760)
* Subtract introduced:1 count from learn count of first day of simulator.

* Fix: Cards filtered

* Tidy up

* Fix: Cards filtered (2)

* ./check

* Removed unnecessary filter

* Fix: Doesn't work for real new cards

* ./check

* Fix: .is_none()

* Limit to 1 day

* Removed "days_to_simulate" argument from convert
2025-01-25 21:16:25 +11:00
user1823
b80384c715
More accurate sorting by R (#3747)
* Match calc of relative overdueness in SM2 and FSRS

* Fix calculation of FSRS relative overdueness

* Improve readability by avoiding double negative

* Move comment line
2025-01-25 21:15:49 +11:00
llama
9b2987b4a8
Fix numeric deck and notetype names being treated as ids when importing csv (#3748)
* fallback to treating deck and notetype ids as names

* add test for metadata
2025-01-25 20:13:30 +11:00
Omar Kohl
eaec53bfc4
Ignore SYNC_PORT and SYNC_BASE in syncserver Dockerfile (#3716)
Hardcode them to:

    SYNC_PORT=8080
    SYNC_BASE=/anki_data

If these env variables are passed into the container with different values,
they are ignored.

The reasons is if the user modifies SYNC_BASE they risk data loss since
anki-sync-server will no longer write data into the volume. If they change
SYNC_PORT they need to also change it when mapping this internal port to the
external port of the container, which could be confusing plus it has no benefit
to allow this since it's always possible to change the external port even if
the internal port is fixed to 8080 (e.g. `-p 1234:8080`).

In both cases there is no benefit to making these values configurable and there
are risks associated.

Unfortunately there is no easy way of implementing this for the
Dockerfile.distroless so it's up to the user not to modify these values.
2025-01-25 19:28:55 +11:00
Damien Elmes
5ef8e33d42 Update translations 2025-01-25 19:25:24 +11:00
Ross Brown
dc37a28de0
Add translation strings for True Retention table (#3745)
* Add translation strings for True Retention table

* Hard-code strings to make pylint happy
2025-01-25 19:18:43 +11:00
GithubAnon0000
e32292585b
FIX lang selection resetting to en_US for some langs (#3744)
* FIX lang selection resetting to en_US for some langs

Fixes https://forums.ankiweb.net/t/anki-25-01-beta/54490/17?u=anon_0000.

# Issue
Set a hand full of certain languages in the preferences screen and see that the translations have been applied after reboot. The language selection in preferences wrongly shows en_US though, not the current active language. If you wanted to switch to `en_US` in this case, then you'd have to first switch to a working language (like de_DE) and then switch to en_US.

# Solution
`anki/qt/aqt/preferences.py` has the functions `setup_language()` and `current_lang_index()`. I noticed that it defaults to en_US, if the language is not in `compatMap` and it couldn’t return the index of the current language. No idea if this code is faulty but I headed over to `anki/pylib/anki/lang.py` afterwards.

Here, in `compatMap`, I added e.g. `"la": "la_LA"`. I knew the code since I could get it with `print("––– lang is ", lang)` in `preferences.py` (`current_lang_index()` retrieves `la` for latin).

After adding those code changes from my PR, the problem for those selected languages had gone away.

No idea if that's best practices though or if something else should be fixed instead.

* UPDATE CONTRIBUTORS adding myself to the list
2025-01-25 19:14:50 +11:00
llama
df808727c8
fix changes to tags not being reflected when editing in io mode (#3768) 2025-01-25 10:36:21 +03:00
Omar Kohl
71e2a6f782
Introduce PUID and PGID env variables to syncserver Dockerfile (#3714)
PUID and PGID are optional env variables to specify the user and group id of
the user that the anki-sync-server process should run with.

This gives more flexibility for solving permission problems with volumes and is
a common pattern for Docker images (e.g. see here:
https://docs.linuxserver.io/general/understanding-puid-and-pgid/)

The anki-sync-server process will write any files with the permissions of the
user it's running with, which can be a problem when you need to access those
files from outside the container or when they are being written into a bind
mount that is owned by a particular user on the host system.

To be able to implement this the entrypoint.sh needs to run as root (since it
needs to create a user and change file permissions). anki-sync-server then
needs to be started with the user 'anki', which is why the new dependency
'su-exec' is required. The user 'anki' and group 'anki-group' can no longer be
created at image build time because then their ids would be fixed.

Also update the build instructions to require building the Docker image inside
the directory where the Dockerfile resides since the build now needs to copy
the entrypoint.sh and it seems wrong the specify the path
docs/syncserver/entrypoint.sh inside the Dockerfile.
2025-01-25 18:19:38 +11:00
Arthur Milchior
6c37d5fc70
Add percentage to FSRS spinner (#3679)
* Add percentage to FSRS spinner

This commit add a percentage option in SpinBox and SpinBoxFloatRow, set to False
by default.

If it's true, a percent symbol is added at the end of the line before
the increase/decrease button.

While the value is represented as a percentage without decimal places,
the internal representation is not changed. Which mean that a
multiplier must used to compute the string value, indicate to the
input field the min, max and step, and when updating the result.

* Remove unsightly percentage sign, and update historical retention too

https://github.com/ankitects/anki/pull/3679#issuecomment-2579636981

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2025-01-25 18:17:02 +11:00
llama
873c4e617d
Recognise and check for media referenced in <source> tags (#3763)
* recognise and check <source> tags for media

* add test
2025-01-25 10:16:24 +03:00
llama
8ec94e281c
Remove unfinished polygon when undoing and redoing in IO mode (#3759)
* make removeUnfinishedPolygon return whether a polygon was removed

* treat removing an unfinished polygon as a discrete undo step

* has to be handled when redoing as well, but not as a discrete step
2025-01-25 10:08:47 +03:00
llama
d463f11d07
Allow reopening the add cards window (#3756)
* allow reopening the add cards window

* deck needs to be changed after notetype
since changing notetype potentially changes deck
2025-01-25 09:54:10 +03:00
kelciour
760ce162fb
Cleanup avplayer on profile close (#3754) 2025-01-25 09:44:15 +03:00