mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Anki is a smart spaced repetition flashcard program
![]() * add AnkiWebView subclasses for stats, empty cards and find dupes ui
* update ui files to use subclassed webviews instead
* remove superfluous calls to AnkiWebView.set_kind
* Avoid set_kind() race condition in legacy stats webview
Replacing the web view is a hacky workaround, but likely a reasonable compromise for a legacy view that we do not want to maintain a separate Qt form for.
* Slightly refactor AnkiWebView subclass creation and tweak inline comment
+ Extend create_ankiwebview_subclass() with the ability to set any
init time AnkiWebView argument
+ Introduce some nice-to-haves in terms of static type checking support
and IDE autocompletion
+ Mark helper function as private to discourage add-on use
* Drop `AnkiWebView.set_kind` completely
There no longer is an Anki-internal use case for changing the web view kind after initializing a web view, and add-ons almost certainly do not have any use for it either.
Given that setting the kind after web view construction can lead to known race conditions with `domDone` signals, we should remove this method to discourage uses like this in both Anki code and add-on consumers.
There currenty only seems to be one add-on calling `set_kind()`, so this seem like a justifiable API change.
---------
Co-authored-by: llama <100429699+iamllama@users.noreply.github.com>
(cherry picked from commit
|
||
---|---|---|
.buildkite | ||
.cargo | ||
.config | ||
.github/ISSUE_TEMPLATE | ||
.vscode.dist | ||
build | ||
cargo | ||
docs | ||
ftl | ||
proto | ||
pylib | ||
python | ||
qt | ||
rslib | ||
tools | ||
ts | ||
.deny.toml | ||
.dockerignore | ||
.dprint.json | ||
.eslintrc.cjs | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.isort.cfg | ||
.mypy.ini | ||
.prettierrc | ||
.pylintrc | ||
.ruff.toml | ||
.rustfmt-empty.toml | ||
.rustfmt.toml | ||
.version | ||
.yarnrc.yml | ||
Cargo.lock | ||
Cargo.toml | ||
check | ||
CONTRIBUTORS | ||
LICENSE | ||
ninja | ||
package.json | ||
pkgkey.asc | ||
pyproject.toml | ||
README.md | ||
run | ||
run.bat | ||
rust-toolchain.toml | ||
SECURITY.md | ||
yarn | ||
yarn.bat | ||
yarn.lock |
Anki
This repo contains the source code for the computer version of Anki.
About
Anki is a spaced repetition program. Please see the website to learn more.
Getting Started
Anki Betas
If you'd like to try development builds of Anki but don't feel comfortable building the code, please see Anki betas
Developing
For more information on building and developing, please see Development.
Contributing
Want to contribute to Anki? Check out the Contribution Guidelines.
Anki Contributors
License
Anki's license: LICENSE