Commit graph

261 commits

Author SHA1 Message Date
Adnane Taghi
f96c8c2ac8 Make URL schemes dialog more ergonomic (#4002)
(originally merged into a PR branch)

* Make URL schemes dialog more ergonomic

* add name to contributors list

* Title Case

* Tweak build instructions so Cursor picks them up

* Use a warning icon for the URL scheme pop-up

* Default to cancelling
2025-05-15 16:17:33 +10:00
Kolby Moroz Liebl
6427ff3db5
Fix dockerimage, by bumping rust version (#3993) 2025-05-15 16:09:27 +10:00
llama
573f59fab1
Allow rotating IO masks (#3987)
* Revert "Disable rotation globally"

This reverts commit 22736238c1.

* alt. impl for hiding rotation marker when selecting/ungrouping

* (de)serialise angles

* rotate masks in reviewer

* update bounds checking

* floats.ts -> lib.ts

* add convenience fns

* store mask angles (deg) in steps of 10000

* update CONTRIBUTORS
2025-05-10 16:21:33 +10:00
Yaoliang Chen
1f95d030bb
feat(scheduler): add from_queue flag to CardAnswer (#3976)
Co-authored-by: Yaoliang <yaoliang.ch@gmail.com>
2025-05-03 12:21:48 +03:00
Matt Brubeck
ef37952ba0
Remove dead code in reviews_for_fsrs (#3958)
* Clarify logic in reviews_for_fsrs

Prior to this change, the second check of `first_of_last_learn_entries`
was dead code because the first check would always break out of the loop
before it could succeed.  Re-order the code for clarity and add a
comment to explain the logic.

* Update CONTRIBUTORS
2025-04-30 21:28:30 +10:00
JL710
62bad44eed
add toggle for browser sidebar (#3953)
* add toggle for browser sidebar

* Update CONTRIBUTORS
2025-04-27 18:22:56 +10:00
Jonathan Schoreels
863fe3cd50
Add a way to pass information from browser_will_search to browser_did_search without having it going to the backend (#3945)
* Add a way to pass information from browser_will_search to browser_did_search without having it going to the backend

* Allow None for SearchContext.properties

* Adding myself in CONTRIBUTORS

* Rename SearchContext.properties to SearchContext.addon_metadata

* Revert "Adding myself in CONTRIBUTORS"

This reverts commit a993577279.

* Reapply "Adding myself in CONTRIBUTORS"

This reverts commit f3ce51c83d.
2025-04-25 18:40:24 +10:00
(x⋅ln(7))⁻¹
369dec9319
Add an option to disable middle click to paste on Linux (#3904)
* Add checkbox

* Working in editor

* Toolbar webview

* Other webviews

* Even more webviews

* Move to profile settings

* Add to contributors [skip ci]

* Fix checks

* Fix checks

* Better?

* Remove unneded

* Remove checkbox and a few other things

* How the hell did that happen

* Undo FTL changes (dae)

* Remove superfluous config entry (dae)

* Add comment about profile keys (dae)
2025-04-15 19:51:00 +10:00
babofitos
066f5fd281
Fix: correct typo and adjust indentation in docstring (#3920)
* fix: correct typo and adjust indentation in docstring

Fixed a small typo in the webview_did_inject_style_into_page docstring and adjusted indentation for consistency.

* Update CONTRIBUTORS
2025-04-13 17:00:19 +10:00
RREEMMII
1fa99c97e4
Add a warning when there is a cloze in "back extra" and "text" is empty (#3912)
* Add a warning when there is a cloze in "back extra" and "text" is empty

Fix #3909

* Disallow non-blank first field card

* Fix Rust ninja check
2025-04-13 14:40:35 +10:00
ikkz
567cd9b9e3
style: add shadow to graph tooltip (#3891) 2025-03-29 05:08:59 +03:00
chel-ou
122980e06b
Add hooks for comparing answers (#3855)
* Add hooks associated to compare answer feature

* Update CONTRIBUTORS

* Add type pattern to compare answer related hooks
2025-03-15 12:12:01 +07:00
Val Enfys
d0ed54a768
Update my name in Anki's credits (#3852)
* Update my name in about.py

* Add name to CONTRIBUTORS
2025-03-14 17:00:48 +07:00
Evgeny Kulikov
339bf436d1
Prevent accidental dragging of audio playback buttons and hint links (#3844)
* Add myself to CONTRIBUTORS

* Set draggable="false" attribute on .replay-button

Because currently if a user drags slightly (even unintentionally) upon clicking a play button, play does not happen

* Prevent dragging hint links

Because if a user moves cursor a little after `mousedown`, action (expanding the hint) does not occur. Which might cause issues from accessibility standpoint
2025-03-14 16:47:03 +07:00
Thomas Graves
f5f22edb6a
Don't recalculate remaining steps, conditionally (#3849)
* Don't recalculate remaining steps, conditionally

Bug report reproduction steps:
Create a new profile so that everything is set to default.
Create a new card.
Click Good.
Open deck options and empty learning steps. Save.
No go back and put 1m 10m as LS.
Go back to the card and it should show 10m on the Good button.

Check if old_steps is empty and if it is just use remaining
steps for the new_remaining steps. Add test.

* Update contributers

* Format code

* Fix clippy error

* Use more idiomatic imports
2025-03-14 16:32:28 +07:00
Brayan Oliveira
94e90dbf85
Add title for some dialogs and avoid hardcoding the text of the discard changes dialog (#3846)
* feat: add title to rename dialog

* fix: localize hardcoded message

* feat: add title to create deck dialog

* refactor: formatting fixes

* add name to about screen

adding my name to contributors for the third time
2025-03-10 15:53:43 +07:00
Jakub Fidler
d8460d354a
fix: Task manager exception handling (#3839)
* Raise exception from closures in run_in_background using run_on_main

* Add author to CONTRIBUTORS file

* Undo taskman changes

* Raise exceptions from _on_closures_pending using singleShot
2025-03-10 14:17:50 +07:00
Brayan Oliveira
63c2a09ef6
feat: add title to some of the sync dialogs (#3838)
* refactor: accept window title in some dialog methods

* feat: match sync initial title with state

Sync iniates in the `Checked` state, so the initial title is changed to match it instead of using the generic `Anki` title

* feat: use `Sync` as the tile of login screen

Maybe a new string should be created for that.

* feat: Use `Sync` as title of the sync conflict dialog

Maybe a new string should be used for that

* refactor: fix formatting

* fix: alias in CONTRIBUTORS

Even in 2025, the script isn't smart enough to handle different casing or use just the GitHub ID
2025-03-03 15:03:28 +03:00
Lukas Sommer
96df6becfc
Comments for translators about sort order (#3831)
* Comments for translators about sort order

* Group combobox entries together. More comments.

* Touch CONTRIBUTORS
2025-02-26 10:32:06 +03:00
mumtazrifai
e373b0ed9b
Use default flag name when flag is renamed to empty string (#3826)
* Add function to restore the default name of a flag

* Call function to restore default flag name if flag renamed to empty string

* Update _load_flags to use the default_flag_names dict

* Add name to contributors file

* Add trailing comma to pass tests

* Update to follow python style guide

* Update about.py

* Revert "Update _load_flags to use the default_flag_names dict"

This reverts commit caa8fea94b.

* Use require_refresh() instead of storing default flag names
2025-02-21 16:38:04 +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
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
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
Luca Auer
899cb89990
Prevent stale frames from being drawn / always ensure up-to-date contents in webview (#3668)
* Prevent stale frames being drawn.

At key points where external changes enter the webview, stale images might get rendered. This ensures that a frame showing current state is always shown.

* Only stage single redraw

* Remove potentially superfluous calls to `self.update()`

* Remove potentially superfluous calls to `self.update()`.

I lost this one during some git troubles.

* Revert unrelated change

The function is supposed to take a boolean telling it whether or not the loading succeeded, which it doesn't as is. However, this is unrelated and works either way so I also reverted it again.

* chore: code cleanup

* cleanup: Remove redundant check for presence of callback

A callback will be used either way for this call, so it can be simplified. The check happens inside the handler.

* Add comment explaining why this change is necessary, referencing the relevant PR.

* Clarify comment to answer the why, not the what.

One can see what is being done, why is probably more important.
2025-01-18 15:54:20 +11:00
Lukas Sommer
d153ce9241
Comments for translators (#3729) 2025-01-17 06:11:07 +03:00
wackbyte
493320fb33
Unpin svelte and update sveltekit-svg (#3722)
Warnings from enums were fixed in https://github.com/sveltejs/svelte/pull/14192
2025-01-12 18:06:54 +11:00
Yuki
9460911d90
Fix menubar in fullscreen (#3710)
* Fix/menubar in fullscreen

* CONTRIBUTORS file

* Fix/menubar in fullscreen

* CONTRIBUTORS file

* Fix and add Type hints
2025-01-10 20:18:32 +11:00
David Elizalde
1bdd7f706f
Issue 2563 - remove mhchem (#3705)
* Issue 2563 - remove mhchem

* Update CONTRIBUTORS
2025-01-09 22:24:39 +11:00
Arthur Milchior
d7fc98d4d8
Deck options without bridge (#3571)
* NF: Modify CONTRIBUTORS

Just so that I stop getting the warning

* NF: Create `deckOptionsReady`

* NF: rename _close to require_close

The method will have to be used outside of this class, so can't be private

* NF: simplify slightly some code

* NF: remove bridge command from deck options

* Remove unused import

* Remove superfluous comment with a typo
2025-01-08 21:30:30 +11:00
Niclas Heinz
936e10bd76
update docker deps and docker docs (#3671)
* docs(docker): Change suggested version numbre

* deps(docker): Bump rust to 1.83.0 and alpine to 3.21.0

* deps(docker): Bump rust to 1.83.0

* CONTRIBUTORS: Add my name
2025-01-04 17:58:54 +03:00
Omar Kohl
7f12814bbe
avoid warning by setting SYNC_PORT as ARG in Dockerfile (#3675)
* Add myself to CONTRIBUTORS file

* avoid warning by setting SYNC_PORT as ARG in Dockerfile

    1 warning found (use docker --debug to expand):
    - UndefinedVar: Usage of undefined variable '$SYNC_PORT'
2025-01-04 17:51:43 +03:00
Lukas Sommer
9d1be9a413
Translation comments for actiony-all-selected and actiony-any-selected (#3658)
* Translation comments for actiony-all-selected and actiony-any-selected

* Update

* Update
2024-12-23 21:47:40 +10:00
llama
2d207ff5ba
Remove hardcoded note/card colours from switch.py (#3629)
* Remove hardcoded note/card colours in switch.py

* Modify CONTRIBUTORS

* Switch to None as a safe default value
2024-12-14 21:30:28 +11:00
OuOu2021
cee04bf20c
Apply gradient effect to forgetting curve (#3604)
* Add gradient color for forgetting curve

* Add desiredRetention prop for CardInfo

* update CONTRIBUTORS

* Formatting

* Tweak range of gradient

* Tweak: salmon -> tomato

* Get desired retention of the card from backend

* Add a reference line for desired retention

* Fix: Corrected the steel blue's height & Hide desired retention line when yMin is higher than desiredRetentionY

* Add y axis title

* Show desired retention in the tooltip

* I18n: improve translation and vertical text display

* Revert rotatation&writing-mode of vertical title

* Tweak font-size of y axis title

* Fix: delete old desired retention line when changing duration

* Update ftl/core/card-stats.ftl

---------

Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2024-12-09 17:44:05 +11:00
Ross Brown
d1032d86a7
Make sure Anki resets the QtMessageHandler as it is exiting (#3620) 2024-12-09 15:39:45 +11:00
hideo aoyama
039c7fc0a9
Snap: keep LD_LIBRARY_PATH when in snap environment (#3618) 2024-12-07 00:42:03 +11:00
Sawan Sunar
f6a3e98ac3
fix deck button not clickable in stats screen (#3602)
Changed z-index of the underlying spinner
2024-12-02 19:34:39 +03:00
Cy Pokhrel
8f4cab6a1a
Fix editor loses focus when toggling list if list item empty (#3483)
* fix editor loses focus when toggling list if list item empty

* fix CONTRIBUTORS
2024-10-16 00:38:35 +10:00
Ben Nguyen
aaf4994e6f
Enable strict_optional for aqt/data, aqt/forms, aqt/import_export (#3489)
* Added spacing

* Enable strict_optional for aqt/data

* Update CONTRIBUTORS

* Enable strict_optional for aqt/forms

* Enable strict_optional for aqt/import_export

* Fix mypy errors in import_dialog.py

* Fix mypy errors in exporting.py

* Better variable name

* Stick to assert convention
2024-10-12 14:36:15 +10:00
Ben Nguyen
931e1d80f2
Enable strict_optional in aqt/. and aqt/browser (#3486)
* Boolean naming convention

* Rename no_strict_optional -> strict_optional

* Update CONTRIBUTORS

* Enable strict optional for aqt module

* Fix errors

* Enable strict optional for aqt browser

* Fix layout.py errors

* Fix find_duplicates.py errors

* Fix browser.py errors

* Revert a0 a1 names

* Fix tree.py errors

* Fix previewer.py errors

* Fix model.py errors

* Fix find_and_replace.py errors

* Fix item.py errors

* Fix toolbar.py errors

* Fix table/__init__.py errors

* Fix model.py errors

* Fix state.py errors

* Fix table.py errors

* Fix errors in card_info.py

* Fix searchbar.py errors

* Fix name

* Fix assert in browser.py

* Formatting

* Fix assert vh

* assert is not None instead of truthy

* Split _move_current() up to correct type signature (dae)

We want either index or direction, but not both.
2024-10-11 23:12:48 +10:00
Tomas Fabrizio Orsi
d4a3e4828b
ts/src/app.html: Changed from favicon.png to favicon.ico (#3485)
Signed-off-by: Tomas Fabrizio Orsi <torsi@fi.uba.ar>
2024-10-11 22:25:58 +10:00
박현우
761fb76ba7
Allow addon page URL on AddonsDialog (#3467)
* Allow users to just copy&paste addon page URL to addon 'code' field.

https://forums.ankiweb.net/t/get-addons-allow-url-on-code-section/36370
2024-10-04 15:02:29 +10:00
Shirish Pokhrel
2ac27585b2
Fix editor loses focus when toggling list and copy selects wrong target deck for filtered decks (#3465)
* fix copy selects wrong target deck for filtered decks
2024-10-02 18:42:41 +10:00
Ben Nguyen
cc45db0e22
Fix Mnemosyne importer chokes on due dates >= 2038 (#3459)
* Fix integer overflow

* Update CONTRIBUTORS
2024-10-02 18:20:44 +10:00
Taylor Obyen
fdc69505e9
Fix incorrect canvas bounds calculations (#3457)
* Fix incorrect canvas bounds calculations

* Fix contributors

* Set variables to be constant
2024-10-01 00:03:38 +10:00
Taylor Obyen
df127b1af7
Add revert to backup option to file menu (#3434)
* Add revert to backup context item

* Fix contributors a new way

* Change relative time to filename

* Update ftl/qt/qt-accel.ftl (dae)
2024-09-25 20:21:59 +10:00
a.r
dc5fa60c8b
typeanswer: cleanups (#3415)
* typeanswer: cleanups

no functional change

* typeanswer: disambiguate

no functional change

* typeanswer: reorder

* typeanswer: skip DiffContext if nothing typed

No use to run all that code without input.

* typeanswer: skip tokenization if input is correct

No use in this case.

* typeanswer: make repo check happy (.map → .fold)

Either a new check or the call was too complex previously for it to trigger?

* Add to contributors

* typeanswer: remove slice_* functions

They're used only once in to_tokens. Easier to read this way IMHO, anyway.
2024-09-25 20:15:16 +10:00
Ben Nguyen
c2f3e63b90
Bug with “A 100 day interval will become X days.” (#3432)
* add name to about page

* use two decimal retention for calculations

* Update CONTRIBUTORS

* format

* Update CONTRIBUTORS

* Update CONTRIBUTORS

* Update CONTRIBUTORS
2024-09-22 18:24:32 +10:00
Kris Cherven
163c10191f
Fix Qt desktop file name warning (#3419)
* Fix Qt desktop file name warning

* Update CONTRIBUTORS
2024-09-22 18:02:35 +10:00
Kris Cherven
0a879bd2ed
Fix pasting from the primary selection (#3413)
* Fix clipboard pasting from the primary selection

* Small renaming

* Fix submodules

* Fix pylint false positive
2024-09-20 21:00:12 +10:00