Commit Graph

10536 Commits

Author SHA1 Message Date
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
RumovZ
ba43c7fdc1
Merge all conflicting notetypes (#2707)
* Refactor import apkg tests

* Merge conflicting notetypes regardless of id match

Original ids are a new thing, and we need to handle previous remappings.
This is done separately from the conflict resolution for notetypes with
matching ids, because 1) we need to look at the notes to determine
conflicts, and 2) we don't want to change the notetype of *all* existing
notes with the conflicting notetype. The main reason is that for 2
existing notes with the same noteype, their incoming counterparts could
have *different* notetypes. So to get rid of all conflicts, they must be
resolved on a note-by-note basis.

* Delete merged, now unused notetypes
2023-10-05 06:18:10 +00:00
Damien Elmes
6c1d7a6703 Use 0 when there are no relearning steps; ensure not NaN 2023-10-05 09:55:05 +10:00
Damien Elmes
d7ff99780e Improve Python Protobuf speed
upb was being included in the bundle, but not found at run time due
to src files being embedded in the binary.
2023-10-04 13:36:47 +10:00
dependabot[bot]
42603daa16
Bump postcss from 8.4.24 to 8.4.31 (#2704)
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.24 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.24...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  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-04 13:36:35 +10:00
Dominique Martinet
c555a9cf7a
Update rust-csv (#2703)
Upstream rust-csv 1.3.0 includes our patch and can be used instead of
the ankitects repo.

This fixes `cargo vendor`
2023-10-04 13:21:47 +10:00
Damien Elmes
02ade8e72c Update translations 2023-10-03 14:41:11 +10:00
Damien Elmes
e525704571 Clarify stability subtitle
Based on #2699. Closes #2699.
2023-10-03 14:40:41 +10:00
Damien Elmes
3636c7c90e When the user has no relearning steps, synthesize the value 2023-10-03 13:50:29 +10:00
Damien Elmes
41bddfc6cb Ensure fuzz doesn't go backwards
Closes #2694
2023-10-03 13:23:27 +10:00
Damien Elmes
259ed9c34d Show tooltip on sync completion
Closes #2695
2023-10-03 12:57:39 +10:00
Damien Elmes
a5f01329a0 Update translations 2023-10-03 12:39:01 +10:00
Damien Elmes
9165a7efaf Update urllib3
Minor CVEs
2023-10-03 12:25:06 +10:00
Damien Elmes
72b0c81761 When learning steps are missing, start from the SM-2 state
Closes https://github.com/open-spaced-repetition/fsrs-rs/issues/87
2023-10-03 12:20:10 +10:00
Damien Elmes
257d7bbbbc Update FSRS crate 2023-10-03 11:28:56 +10:00
Damien Elmes
9fd8a8bb40 Add stability graph 2023-10-01 15:44:33 +10:00
Damien Elmes
072cd37b42 Support rescheduling on weight/retention change 2023-10-01 15:20:58 +10:00
Damien Elmes
0ef28853fd Fix TypeError when deck list or overview refreshes during optimal retention
Caused by legacy code blocking the main thread.

https://forums.ankiweb.net/t/anki-23-10-beta/34912/79
2023-09-30 16:10:23 +10:00
Damien Elmes
d16faacd0f Allow cards with no learning history when not training 2023-09-30 16:10:23 +10:00
Damien Elmes
93499d4182 Display the default weights as a placeholder 2023-09-30 16:10:23 +10:00
Damien Elmes
50c8a1ba9f Update FSRS
- up to 10x performance increase in optimal retention
- expose loss aversion
- use SpinBoxes
2023-09-30 16:10:22 +10:00
Abdo
074f452762
Allow creating an image occlusion from the clipboard (#2689)
* Allow creating an image occlusion from the clipboard

* Refactor pasted image name construction into methods

* Reduce button's top padding

* Fix capitalization

* Fix quality parameter of pasted image

* Fix lint errors

* setup_mask_editor_for_file -> setup_mask_editor

* Select -> Paste

* Extract image reading logic

* Fix inlinedImageToFilename
2023-09-29 15:51:44 +10:00
Damien Elmes
f3bb845961 Update incompatible Rust deps 2023-09-28 10:00:47 +10:00
Damien Elmes
ce11927f97 Update compatible Rust deps
Fixes a CVE in tungstenite
2023-09-28 09:54:56 +10:00
Damien Elmes
b8390d096e Shift weight calculation to backend so it can be run in parallel 2023-09-28 09:10:54 +10:00
Damien Elmes
1f55ad1d44
Expose the ability to train weights from items (#2687) 2023-09-28 08:28:24 +10:00
Jarrett Ye
05499297e0
Fix first_rating_count & learn_cost (#2688)
* fix first_rating_count & learn_cost

* Update CONTRIBUTORS

* cargo clippy --fix

* cargo fmt
2023-09-27 18:31:40 +10:00
Damien Elmes
d2f392ff9f Update translations 2023-09-27 16:37:37 +10:00