Commit graph

11148 commits

Author SHA1 Message Date
sorata
bd69a0e687 Update AutoAdvance.svelte (#3313) 2024-07-21 20:49:42 +07:00
user1823
b076286b8a Update references to tooltip strings (#3312)
* Update string reference

* Update FsrsOptionsOuter.svelte
2024-07-21 17:24:41 +07:00
sorata
cd03b7191d Update Tooltip (#3288)
* Update Tooltip

updated the tooltips as described here: https://forums.ankiweb.net/t/update-tooltips/46849

* Update CONTRIBUTORS

* Update deck-config.ftl

* fixed punctuation, stylistic incoherence, etc.

* Update deck-config.ftl

https://github.com/open-spaced-repetition/fsrs4anki/pull/667

* Changed string requires new key (dae)

* Minor tweaks to tense for clarity (dae)

https://github.com/ankitects/anki/pull/3288#issuecomment-2223384500
2024-07-21 16:44:37 +07:00
Abdo
55fed69801 Fix change_notetype_of_notes's docstring (#3304) 2024-07-21 15:26:10 +07:00
David Culley
f99f3d5865 Refactor ephemeral_card of notes (#3307)
* refactor: fix type annotation

* fix: properly check if argument is None

Don't use Boolean expressions to implement a default value.

* fix: ensure that 'model' is not None

Don't use exceptions to control the flow.

* refactor: simplify if-else construct
2024-07-21 15:25:48 +07:00
David Culley
b01f89e7eb refactor: use list comprehension (#3308) 2024-07-21 15:21:41 +07:00
Abdo
fef30b48d3 Fix unused parent tags getting cleared (#3299)
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2024-07-21 15:00:39 +07:00
David Culley
5be8f423f2 Update type annotation syntax (#3283)
* chore: add myself to CONTRIBUTORS file

* refactor: use newer type hints for Union/Optional

* refactor: fix deprecated type annotations

use collections.abc rather than typing

* refactor: use lower letter type annotations

* style: reformat with black

* refactor: remove unused imports

* refactor: add missing imports for type hints

* fixup! refactor: use newer type hints for Union/Optional

* fix: add missing imports for type annotations

* fixup! refactor: use newer type hints for Union/Optional

* fixup! style: reformat with black

* refactor: fix remaining imports re: type hints
2024-07-21 14:00:52 +07:00
Ren Tatsumoto
79b3fb840d replace showWarning with show_warning (#3306)
* replace showWarning with show_warning

* run isort

* change imports
2024-07-21 13:22:47 +07:00
Damien Elmes
638bafb2ee Switch mask editor to non-conflicting shortcut
In the absence of better ideas, I've added alt

Closes #3276 and #3278
2024-07-21 13:05:56 +07:00
David Culley
8ea79dc033 isort: remove settings covered by profile (#3281)
* chore: remove isort settings covered by profile

https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#custom-configuration

* chore: add myself to CONTRIBUTORS file

* chore: use black profile for isort

* chore(isort): fix configuration to skip directories

When overwriting `skip`, `.git` and others would no longer be skipped.

`extend_skip` is the correct option.

* chore(isort): skip directory `qt/bundle`
2024-07-20 18:13:12 +07:00
Damien Elmes
bde039ca84 Allow Unicode-3 license 2024-07-20 18:07:06 +07:00
Damien Elmes
9d8854f71e Bump cargo deny version 2024-07-20 17:59:08 +07:00
Pedro Schreiber
7b7ed58479 keep-text-in-occlusion (#3277) 2024-07-20 17:48:37 +07:00
Ian Samir Yep Manzano
018b645fd4 About section transparent logo (#3284)
* changed anki-logo-thin.png to version with transparent background

* Revert "changed anki-logo-thin.png to version with transparent background"

This reverts commit 4c7e826a73.

* changed anki-logo-thin.png to version with transparent background

* added name to contributors as per contribution guidelines for first PR

* fixed contributors file rather than directly modifying about file
2024-07-20 17:46:12 +07:00
David Culley
2874a0a1cc Simplify the format string (#3293)
* refactor: simplify format string

* chore: add myself to CONTRIBUTORS file
2024-07-10 21:14:51 +07:00
Jean Khawand
b7f61c5d75 Update base images and introduce health endpoint (#3273)
* Update base images and introduce health endpoint

sync-server: introduce `/health` endpoint to check if the service is reachable.

bump(alpine): bump alpine base image from `3.19` to `3.20`

bump(rust): bump rust-alpine build image from `1.76` to `1.79`

* fix cargo fmt

* add allow clippy::extra_unused_type_parameters

* Remove unused type param (dae)

* Route /health directly (dae)

* Fix for latest axum (dae)
2024-07-10 20:35:21 +07:00
user1823
5cea4d536b Apply fuzz to SM2 lapse interval and respect max ivl (#3275)
* Apply fuzz to SM2 lapse interval and respect max ivl

Imo, there is no reason for not applying fuzz to SM2 lapse intervals

* Update review.rs

* Format

* Update review.rs

* Update review.rs

* Update review.rs

* Update review.rs
2024-07-10 20:28:21 +07:00
Damien Elmes
dd8f6405e7 Exclude gix from cargo-deny 2024-07-10 20:12:06 +07:00
Luc Mcgrady
da37614437 Fix profile manager used before checked for None (#3272)
* Fix: profile manager used before checked for None

* ./check
2024-07-10 20:00:15 +07:00
Abdo
c9419313de Limit cloze nesting level (#3264)
* Limit cloze nesting level

* Break cloze rendering at a lower limit
2024-07-10 19:59:31 +07:00
Rastislav Kish
9ffd0f511a A11Y: Improve the accessibility of the Preferences dialog (#3255)
* Configure buddy widgets for labels in the Preferences dialog

Labels are often used to describe the purpose of a different widget like a combobox, edit field or a spinbox by providing a textual name for their functionality. The relation between a label and a widget is typically expressed by placing the label next to the relevant object. In addition to this visual linking intended for human users, frameworks usually also offer semantic way to link labels with other widgets, so the relation can be noticed by programs like screenreaders, which can figure out the correct textual description for the focused widgets based on this information.

By default, labels on their own are not focusable elements, so users dependend on keyboard navigation and speech get to notice only the widget types (textbox, spinbox, etc.) while moving around without any contextual information if labels are not linked. When the linking is done, the component names get included as well.

QT provides the "buddy" property for QLabel, which creates a semantic link between the label and its buddy widget.

This commit configures the buddy properties on labels of the Anki Preferences dialog.

* Configure spinbox suffixes in Preferrences dialog

QSpinBox provides a suffix property. This property makes it possible to display a measurement unit next to the component value, which is linked to it both visually and semantically for the GUI framework without affecting the spinbox value itself. For purposes of accessibility, it's better to use this property than simply place a label next to the component, since it can be directly accessed by screenreaders and other assistive technology.

This commit configures suffix properties for spinboxes in the Anki Preferences dialog. Note: Removal of the original unit labels may have altered the UI a little bit.

* Assign buddy widgets in the ID and password retrieval dialog

Set buddy widgets of the labels in the Get ID and password for synchronization dialog.

* Fix positioning/size of text boxes

* Style the suffixes of Preferences' QSpinBoxes

Style QSpinBox suffixes (for those that have one) in the Preferences dialog by prepending them by a space character.
2024-07-10 19:58:47 +07:00
Abdo
9cd6886564 Fix remaining accessibility warnings (#3241)
* Remove unused build var

* Fix accessibility warnings in CollapseLabel

* Fix accessibility warnings in PlainTextBadge

* Add ARIA role to Autocompleteitem

* Fix accessibility warnings in HandleBackground

* Fix accessibility warnings in HandleControl

* Fix accessibility warnings in EditorField

* Fix accessibility warnings in RichTextBadge

* Fix accessibility warnings in StickyBadge

* Remove ignored a11y warnings
2024-07-10 19:55:08 +07:00
Damien Elmes
9d29e04cf6 Update translations 2024-07-06 19:08:03 +07:00
Damien Elmes
8335618549 Update axum/reqwest for hyper 1.0 2024-07-06 18:45:32 +07:00
Damien Elmes
734962827d Update Rust + Rust deps 2024-07-06 18:40:38 +07:00
Damien Elmes
59f707efa0 Some lint fixes for newer Rust 2024-07-06 18:40:37 +07:00
Damien Elmes
6a65866f43 Update web deps
Vite held back, as current version is breaking the build
2024-07-06 18:40:37 +07:00
Damien Elmes
74d7397a6e Bump Python deps
A few tweaks were required for PyLint
2024-07-06 18:40:37 +07:00
Damien Elmes
16e611c0d7 Fix check:svelte/vitest running indiscriminately 2024-07-06 18:40:36 +07:00
Damien Elmes
71b9df0f7a Uyghur is RTL
https://forums.ankiweb.net/t/rlt-ui-bug-uyghur-language-gui-direction/46610
2024-07-02 19:03:29 +07:00
Damien Elmes
01a1141c5e Update translations 2024-06-28 22:02:33 +08:00
Abdo
e27be4c85c Restore $deckOptions (#3265)
* Restore $deckOptions

* Avoid error in logs when using ./yarn dev or mobile clients (dae)
2024-06-28 19:38:18 +07:00
Abdo
bfe3119299 Shuffle identical values in filtered deck sort (#3259)
* Shuffle identical values in filtered deck sort

* Update test
2024-06-28 18:53:16 +07:00
Abdo
5f691208d5 Fix deck config input's background color regression (#3258)
* Fix deck config input's background color regression

* Move styles to base stylesheet
2024-06-28 18:52:51 +07:00
Damien Elmes
4fdab6cb08 Revert "Ensure minimum doesn't exceed maximum"
This reverts commit 37ce4e8426.

Also remove a stale comment that is no longer relevant after
be725dca11
2024-06-28 19:49:23 +08:00
Jarrett Ye
7519e1fc85 Remove threshold of compute minimum recommended retention (#3246)
* remove threshold of compute minimum recommended retention

* update tool tip of compute-optimal-retention

* cargo clippy --fix

* Update FsrsOptionsOuter.svelte

* Remove 'from 0 cards' reference (dae)
2024-06-28 18:26:39 +07:00
user1823
87961d8c76 Fix FSRS easy interval being same as good interval in relearning cards (#3256)
* Fix FSRS easy interval being same as good interval in relearning cards

https://github.com/ankitects/anki/pull/3236#issuecomment-2187787774

* Update relearning.rs

* Update relearning.rs

* Set min interval of easy to Good + 1

* Ensure minimum doesn't exceed maximum (dae)

With a maximum interval set, it would be possible to confuse with_review_fuzz()
by passing min > max.
2024-06-28 18:20:45 +07:00
antecrescent
dd2f617f52 Make SvelteCheck and ViteTest respect YARN_BINARY (#3231) 2024-06-28 18:00:38 +07:00
Damien Elmes
ecd3bece1c "Subjective difficulty"
https://forums.ankiweb.net/t/anki-24-06-3-rc/46403/5
2024-06-28 18:52:55 +08:00
Damien Elmes
0d2dc2d8c6 Include error message text on page
Also remove the '500' h1 from the error

Closes #3248
2024-06-24 15:35:47 +07:00
Damien Elmes
2238c12f78 Bump version to 24.06.3 2024-06-24 14:55:43 +07:00
Damien Elmes
488a24e684 Add Uyghur to language list 2024-06-24 14:55:16 +07:00
Damien Elmes
10f3f99307 Update translations 2024-06-24 14:49:19 +07:00
Abdo
cf9d513a7e Fix image occlusion flicker caused by setupI18n() (#3253) 2024-06-24 08:48:49 +01:00
James Elmore
b060f7aa45 Fix Renaming note fields not updating custom browser appearance (#3245)
* Added methods to parse browser templates

* Added method to get parsed browser templates

* Make field rename check browser templates for field updates

* Update tests

* Updated CONTRIBUTORS

* Formatting

* Refactored cloze field logic for question template into closure

* Refactored cloze field logic for answer template into closure
2024-06-24 08:39:56 +01:00
Jarrett Ye
8b164cf218 Fix/Relearning cards' Intervals don't update after changing Desired Retention (#3236)
* Fix/Relearning cards' Intervals don't update after changing Desired Retention

* cargo clippy --fix
2024-06-22 10:44:02 +01:00
Abdo
d870d493b7 Fix deck config input's background color in Qt5 (#3243) 2024-06-22 10:43:34 +01:00
Damien Elmes
1822805a15 Formatting fix 2024-06-20 20:43:43 +07:00
Damien Elmes
add833138e Fix deck options failing to show on Qt 5.14
https://forums.ankiweb.net/t/mac-intel-options-screen-doesnt-work-on-version-24-06-2-qt5/45819/8
2024-06-20 20:29:36 +07:00