Commit Graph

10813 Commits

Author SHA1 Message Date
dependabot[bot]
2d176d8c35
Bump rustix from 0.38.14 to 0.38.19 (#2747)
* Bump rustix from 0.38.14 to 0.38.19

Bumps [rustix](https://github.com/bytecodealliance/rustix) from 0.38.14 to 0.38.19.
- [Release notes](https://github.com/bytecodealliance/rustix/releases)
- [Commits](https://github.com/bytecodealliance/rustix/compare/v0.38.14...v0.38.19)

---
updated-dependencies:
- dependency-name: rustix
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update licenses

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2023-10-19 09:44:51 +10:00
Abdo
bba67fdab4
Fix misleading warning when changing notetype from/to cloze (#2744) 2023-10-18 16:50:32 +10:00
dependabot[bot]
dfe0370a2a
Bump @babel/traverse from 7.22.5 to 7.23.2 (#2746)
Bumps [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-18 09:17:26 +10:00
Damien Elmes
39bf2f2160 Update to latest fsrs 2023-10-18 09:03:23 +10:00
Damien Elmes
197c486bc0 Bump urllib3 for CVE 2023-10-18 08:56:48 +10:00
Abdo
b23f17df27
Drop support for checkpoints (#2742)
* Drop support for checkpoints

* Deprecate .flush()

* Remove .begin/.commit

* Remove rollback() and deprecate save/autosave/reset()

There's no need to commit anymore, as the Rust code is handling
transactions for us.

* Add safer transact() method

This will ensure add-on authors can't accidentally leave a transaction
open, leading to data loss.

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2023-10-17 12:43:34 +10:00
user1823
4c17a6964e
Rename Analyze to Evaluate in FSRS Deck Options (#2741)
* Update deck-config.ftl

* Update FsrsOptions.svelte

* Update CONTRIBUTORS
2023-10-17 09:53:24 +10:00
Abdo
01738757ef
Prevent media syncing from blocking collection tasks (#2740) 2023-10-17 09:47:50 +10:00
Hikaru Y
bea4307d78
Another approach to preventing selected shapes from shifting (#2735)
* Revert "Fix selected shapes shifting to canvas origin"

This reverts commit d81b96fed0adb7db2fb9847c52d7cb73f83b4b32.

This introduced a regression where the selection of objects was cleared
when it should not have been. For example, if multiple objects were
selected and the mouse was released while moving them around, the
selection would be cleared.

* Another approach to preventing selected shapes from shifting

Prevent fabric objects from shifting to the wrong position when the
active selection contains multiple objects by calculating their
coordinates relative to the canvas, as in the case of the fabric.Group.
2023-10-15 10:11:23 +10:00
Abdo
bd55149846
Reduce shaking of bottom bar (#2734) 2023-10-15 10:06:28 +10:00
Damien Elmes
b2d515c8bb Update to Qt 6.5.3 on Windows/Mac
+ Fix incorrect version selection on Mac

Closes #2733 (except for Linux users)
2023-10-15 09:48:36 +10:00
Damien Elmes
72e57456ce Fix stuttering in FSRS progress display 2023-10-14 14:03:20 +10:00
Damien Elmes
9f0dd4a63f Fix startup failure in macOS bundle
Closes #2731
2023-10-14 13:49:33 +10:00
Damien Elmes
86f80ef926 Reduce maximum deck size in retention calculation
https://forums.ankiweb.net/t/anki-23-10-beta-5/35677/11
2023-10-14 12:00:22 +10:00
Damien Elmes
76e6da6652 Switch Qt5 shims from opt-out to opt-in
If you have an add-on that hasn't been updated yet, please contact
the add-on author. You can temporarily restore functionality by defining
an ENABLE_QT5_COMPAT=1 env var.
2023-10-14 11:46:46 +10:00
Abdo
5cde4b6941
Remove v1/v2 support from the backend (#2727)
* Remove v1/v2 support from deck list

* Remove v1/v2 support from most routines and show error

* Remove scheduler_version from preferences

* Fix formatting

* Remove v1/v2 conditionals from Python code

* Fix legacy importer

* Remove legacy hooks

* Add missing scheduler checks

* Remove V2 logic from deck options screen

* Remove the review_did_undo hook

* Restore ability to open old options with shift (dae)
2023-10-14 10:50:59 +10:00
Damien Elmes
e1e0f2e1bd
Use scheduling flag instead of checking revlog when importing decks (#2730)
Closes #2714
2023-10-14 10:30:20 +10:00
Abdo
115f2a425e
Turn edit window into a QMainWindow (#2732)
* Turn edit window into a QMainWindow

* Ensure dialog is garbage collected (dae)
2023-10-14 10:29:57 +10:00
Damien Elmes
fea1fc288b Keep badge out of natural tab order
If I've understood things correctly, this should allow regular
users to skip over the badge elements with Tab, while still
allowing screen reader apps to read/focus the badge elements.

https://github.com/ankitects/anki/pull/2721#issuecomment-1761740985
https://forums.ankiweb.net/t/anki-23-10-beta-5/35677/18
2023-10-14 10:20:14 +10:00
Damien Elmes
ae7eeb55f8 Update to merged PR commit 2023-10-13 14:07:53 +10:00
Damien Elmes
b91caad3f3 Update fsrs-rs for partial fix for #2706 2023-10-13 14:05:31 +10:00
Damien Elmes
fc80793983 Fix reversed float left/right icons
Closes #2713
2023-10-13 13:04:42 +10:00
Gulshan Singh
a230c754b9
Add Sphinx documentation generation functionality (#2720)
* Add Sphinx documentation generation functionality

* sphinx-docs -> python/sphinx

* Use ninja instead of make

* Update copyright info in sphinx docs

* Run sphinx-apidoc before building Sphinx docs

* Cleanup Sphinx path insertion

* Don't write build outputs into source; use autoapi

* aqt -> _aqt

* Mention sphinx in development.md

---------

Co-authored-by: Damien Elmes <gpg@ankiweb.net>
2023-10-13 13:03:54 +10:00
Damien Elmes
56c5002848 Update translations 2023-10-13 12:50:32 +10:00
Damien Elmes
6e177851cc Add help entries for FSRS options 2023-10-13 12:50:15 +10:00
Damien Elmes
bfe340c163 Don't provide a button to copy estimated retention into desired retention
It's too easy for the user to end up with silly values if their configured
time/day is not reasonable.
2023-10-13 12:38:47 +10:00
Damien Elmes
8b4c57fbce Hide SM2-specific items in help pages when FSRS enabled 2023-10-13 11:00:51 +10:00
Damien Elmes
f4b760153f Hide loss aversion 2023-10-13 10:38:56 +10:00
Damien Elmes
003cdfd2ec Use sm2 retention when deriving memory state
Closes #2702
2023-10-13 10:37:35 +10:00
Damien Elmes
9fd6d86a3e Update translations 2023-10-13 10:10:05 +10:00
Hikaru Y
7cf19ea213
Fix selected shapes shifting to canvas origin (#2729)
* Fix selected shapes shifting to canvas origin

* Make only newly added shape selected even if it...

... overlaps with another
2023-10-13 09:58:43 +10:00
Abdo
6c2205663e
Fix previewer geometry not being restored sometimes (#2728) 2023-10-13 08:50:40 +10:00
Aristotelis
a7e5d2a663
Change IO text background color to white (#2726)
Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-13 08:49:31 +10:00
Aristotelis
7ce1c4439a
Propagate editor UI state transitions to add-ons (#2711)
* Propagate editor UI state transitions to add-ons

* Also set initial Python state to EditorState.INITIAL

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-13 08:47:50 +10:00
Abdo
9e147c6335
Add text tool to image occlusion (#2705)
* Add text tool to IO

* Remove unnecessary parentheses

* Fix text objects always grouped

* Remove log

* Fix text objects hidden on back side

* Implement text scaling

* Add inverse text outline

* Warn about IO notes with only text objects

This will result in a different error message than the case where no
objects are added at all though, and the user can bypass the warning.
Maybe this is better to avoid discarding the user's work if they have
spent some time adding text.

* Add isValidType

* Use matches!

* Lock aspect ratio of text objects

* Reword misleading comment

The confusion probably comes from the Fabric docs, which apparently need updating: http://fabricjs.com/docs/fabric.Canvas.html#uniformScaling

* Do not count text objects when calculating current index

* Make text objects respond to size changes

* Fix uniform scaling not working when editing

* Use Arial font

* Escape colons and unify parsing

* Handle scale factor when restricting shape to view

* Use 'cloned'

* Add text background

* Tweak drawShape's params
2023-10-12 13:40:11 +10:00
chandraiyengar
b35a11ffd6
Add profile name in profile deletion confirmation message (#2722)
* Add profile name in profile deletion confirmation message

* Update contributors

* leave old translation and add new one
2023-10-12 13:34:52 +10:00
Kenny
73eab9280d
Fix a11y issues with Badge component (#2721)
* fix: a11y issues in badge component

* fix: spacing issues with button element
2023-10-12 13:33:36 +10:00
virinci
d261d1e467
Fix ModuleNotFoundError: No module named 'distutils' (#2723) 2023-10-11 14:12:18 +10:00
Carlo Quick M.Ed
8d6b1e43bb
Updated README (#2718)
* Update README.md

* Update CONTRIBUTORS

* Removed unnecessary elements to README.md
2023-10-11 14:11:07 +10:00
Abdo
c052be9e25
Add a backend method to extract static media references (#2716)
* Add a backend method to extract static media references

* Extract into Notetype.gather_media_names()
2023-10-11 14:10:02 +10:00
Damien Elmes
7b84348771 Fix n2 missing hide-success code 2023-10-11 13:04:54 +10:00
Hikaru Y
b3f6edc323
Fix polygon tool not working (#2712)
* Fix polygon not converting correctly to cloze

* Fix first polygon disappearing when creating se...

...cond one during editing

Previously, a fabric object was passed directly to a `Shape` such as
`Rectangle` or `Polygon`, so mutating a non-primitive property of the
shape would lead to mutating the original fabric object as well.

* Commit addition of polygon immediately

Unlike the rect or ellipse tools, when the polygon tool was active,
clicking on the canvas did not fire the `object:removed` event and the
`change` event was not dispatched. As a result, an addition of a polygon
was not saved to the DB when switching to another note or closing the
editor in edit mode without performing an action that dispatched the
`change` event.
2023-10-10 13:51:35 +10:00
Aristotelis
4cd12ccd28
Refactor IO image pickers into separate component (#2710)
* Refactor IO image pickers into separate component

* Adjust import path

* Move styles to component and tweak class names

* Remove unused import

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-10-10 13:26:20 +10:00
Damien Elmes
961d7dfd72 Rust 1.73 2023-10-09 19:22:43 +10:00
Damien Elmes
f741b4af91 Fix 'PanicException: command requires weights to be set' 2023-10-09 18:39:18 +10:00
Damien Elmes
0e6104a96b Fix 'Expression tree is too large' when user has many decks
+ Allow 'did:' searches to match multiple decks at once
2023-10-09 18:39:18 +10:00
Damien Elmes
67acdc3034 Apply tag fix from Abdo
https://forums.ankiweb.net/t/drag-and-drop-tag-groups-crashes-anki/35505/3
2023-10-09 13:55:37 +11:00
Damien Elmes
03778caff9 Update n2 for bugfix 2023-10-09 13:42:39 +11:00
RumovZ
23f29a6ecc
Invalid sorting (#2709)
* Rollback if toggling state fails

Previously, if the search triggered by a state toggle failed, the switch
and the model would move to the new state, while the table would remain
in the previous state.

* Fix reversed sort orders of FSRS columns

* Add sep. default sort orders for notes and cards

* Add test for consistent default sort orders

* Add launch config for debugging in VSC

* Extend launch config for macOS and Linux
2023-10-07 06:36:15 +00:00
Damien Elmes
9db35fee6e Update FSRS for performance improvement 2023-10-05 16:27:10 +10:00