Commit Graph

11151 Commits

Author SHA1 Message Date
Damien Elmes 5c33e5ea65
Revert "About section transparent logo (#3284)" (#3315)
This reverts commit 0b38ecdbc7.
2024-07-22 02:09:40 +07:00
Damien Elmes faa9efaff7 Latest openssl fix 2024-07-22 02:08:35 +07:00
Jarrett Ye 52ce6e6a6b
Feat/FSRS-5 (#3298)
* Feat/FSRS-5

* adapt the SimulatorConfig of FSRS-5

* update parameters from FSRS-4.5

* udpate to FSRS-rs v1.1.0

* ./ninja fix:minilints

* pass ci

* update cargo-deny to 0.14.24

* udpate to FSRS-rs v1.1.1

* update to fsrs-rs v1.1.2
2024-07-21 21:02:24 +07:00
sorata 5216fa959e
Update AutoAdvance.svelte (#3313) 2024-07-21 20:49:42 +07:00
user1823 dccb7c9b27
Update references to tooltip strings (#3312)
* Update string reference

* Update FsrsOptionsOuter.svelte
2024-07-21 17:24:41 +07:00
sorata 087f957a36
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 b05c9d1598
Fix change_notetype_of_notes's docstring (#3304) 2024-07-21 15:26:10 +07:00
David Culley aa6583cdd1
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 e213c0a6d1
refactor: use list comprehension (#3308) 2024-07-21 15:21:41 +07:00
Abdo bb5ed4da9c
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 63afb0f8c6
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 412e67db3e
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 194f35617d 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 af115c7fda
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 793fdd484d Allow Unicode-3 license 2024-07-20 18:07:06 +07:00
Damien Elmes e13783b941 Bump cargo deny version 2024-07-20 17:59:08 +07:00
Pedro Schreiber 799912cfe3
keep-text-in-occlusion (#3277) 2024-07-20 17:48:37 +07:00
Ian Samir Yep Manzano 0b38ecdbc7
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 9d8782c31c
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 56a085bc21
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 6ec22e5118
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 88b506413f Exclude gix from cargo-deny 2024-07-10 20:12:06 +07:00
Luc Mcgrady fa4352f3b6
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 daf5f68fd5
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 e985fec9c4
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 d108bff862
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 486cc8a2ab Update translations 2024-07-06 19:08:03 +07:00
Damien Elmes 227f790d8e Update axum/reqwest for hyper 1.0 2024-07-06 18:45:32 +07:00
Damien Elmes dca962c81e Update Rust + Rust deps 2024-07-06 18:40:38 +07:00
Damien Elmes 6b3b545a9a Some lint fixes for newer Rust 2024-07-06 18:40:37 +07:00
Damien Elmes 2a52639cd3 Update web deps
Vite held back, as current version is breaking the build
2024-07-06 18:40:37 +07:00
Damien Elmes cd885098f7 Bump Python deps
A few tweaks were required for PyLint
2024-07-06 18:40:37 +07:00
Damien Elmes a739d6257c Fix check:svelte/vitest running indiscriminately 2024-07-06 18:40:36 +07:00
Damien Elmes ec96bfe315 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 d678e39350 Update translations 2024-06-28 22:02:33 +08:00
Abdo fa47e905c5
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 55d68c01d8
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 6232d0aec8
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 f98fbbf298 Revert "Ensure minimum doesn't exceed maximum"
This reverts commit 37ce4e8426.

Also remove a stale comment that is no longer relevant after
b8ec76fb66
2024-06-28 19:49:23 +08:00
Jarrett Ye 6d13221ae5
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 8d11a909ed
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 60b25535ef
Make SvelteCheck and ViteTest respect YARN_BINARY (#3231) 2024-06-28 18:00:38 +07:00
Damien Elmes fe86401f88 "Subjective difficulty"
https://forums.ankiweb.net/t/anki-24-06-3-rc/46403/5
2024-06-28 18:52:55 +08:00
Damien Elmes 0d8d816a0c 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 ae1577b228 Bump version to 24.06.3 2024-06-24 14:55:43 +07:00
Damien Elmes e4326ce801 Add Uyghur to language list 2024-06-24 14:55:16 +07:00
Damien Elmes 7bb6b186be Update translations 2024-06-24 14:49:19 +07:00
Abdo 4221e54390
Fix image occlusion flicker caused by setupI18n() (#3253) 2024-06-24 08:48:49 +01:00
James Elmore 930c97b1c7
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 79917bbd2d
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