Commit graph

10713 commits

Author SHA1 Message Date
Mani
b8d9e77984 fixes: remove unfinished shapes, remove selectable and make shapes remain inside canvas (#2809)
* remove unfinished polygon and remove selectable for shapes in polygon mode

* make group and polygon position remain inside canvas area

* click through transparent area in grouped object

* add some shortcuts for basic usages

* tools button icon in center & switch mode border

* fix load svg image

* basic rtl support, panzoom have issues in rtl mode

* better zoom option both in ltr and rtl

* handle zoom event in mask editor

* add h button to handle toggle mask

* add more mime type

* use capital M (shift+m) for toggle mask

* allow io shortcuts in mask editor only

* make other shapes also remain in canvas bound area

* better zoom implementation, zoom from center
add zoom to resize event listener

* add a border to corner to handle blend of control

* add refresh button to go to  selection menu

* add tooltip to shortcuts and also add shortcut for other tools

* make opacity remain in same state when toggled on

* opacity for group/ungroup objects

* update shortcuts implementation
2023-11-24 14:06:40 +10:00
Gustaf-C
cf71ad1256 Improve visibility of clicked buttons in editor (#2841)
* Improve button visibility in editor when clicked

* Turn button text white for light-mode visibility
2023-11-23 16:56:45 +10:00
Damien Elmes
89fe5f710c Include next_day timestamp in revlog export 2023-11-23 14:46:48 +10:00
Damien Elmes
d4b5d85ea7 Add remove_dir_all() 2023-11-22 17:41:45 +10:00
Damien Elmes
70900e91d0 Add a method for exporting revlogs in binary 2023-11-22 11:57:40 +10:00
Damien Elmes
e6a7a8ff4a When training with the whole collection, include deleted card history 2023-11-22 10:53:08 +10:00
Ben Olson
035a6c9b59 Improve keyboard handling and accessibility for Select.svelte and refactor (#2811)
* resolve TagAddButton a11y
better comments to document tagindex reasoning

* resolved a11y for TagsSelectedButton
allow focus to TagsSelectedButton with Shift+Tab and Enter or Space to show popover

* safely ignore a11y warning as container for interactables is not itself interactable

* Update CONTRIBUTORS

* quick fix syntax

* quick fix syntax

* quick fix syntax

* quick fix syntax

* resolved a11y in accordance with ARIA APG Disclure pattern

* resolved a11y
ideally should replace with  with
a11y-click-events-have-key-events is explicitly ignored as the alternative (adding ) seems more clunky

* resolved SpinBox a11y
cannot focus on these buttons, so no key event handling needed (keyboard editting already possible by just typing in the field)
widget already properly follows ARIA APG Spinbutton pattern

* cleanup

* onEnterOrSpace() function implemented as discussed in #2787 and #2564

* I think this is the main keyboard handling of Select
Still need to fix focus and handle roles and attributes

* fixed the keyboard interaction

focus is janky because you need to wait until after the listed options load and for some reason that needs a tiny delay on onMount
I think this technically violates a11y, but it really doesn't since the delay is literally zero. But the code still needs it to happen.

* Select and SelectOption reference the same focus function

* SelectOption moved inside Select
+ started roles and a11y

* quick syntax and such changes

* finish handling roles and attributes

* fixed keyboard handling and only visual focus

* cleanup and slight refactoring

* fixed syntax

* what even is this?

* bug fixes + revert key selection

* fixed scrolling

* better control scrolling and focus

* Adjusted selection
Up/Down Arrows: start selection on active option
Enter/Space/Click: no initial selection, down arrow to first option, up arrow to last option

* Only set selected the first time Select is opened, all subsequent times use the previous selected
2023-11-21 14:23:18 +10:00
Abdo
febaa524ab Load MathJax's text-chtml-full component in reviewer/previewer (#2836)
* Load MathJax's text-chtml-full in review screens

* Remove no longer needed MathJax extensions
2023-11-20 16:50:55 +10:00
Akash Reddy
a7e54e4050 Fix switching of add & history buttons when selecting IO notetype (#2833)
* Fix switching of add & history buttons when selecting IO notetype

* Update CONTRIBUTORS
2023-11-20 16:36:25 +10:00
user1823
b05f8ed1df Clarify learning steps recommendation (#2832)
* Clarify learning steps recommendation

The previous text could suggest that 1d was OK, but it is actually not recommended.

* Update deck-config.ftl
2023-11-20 16:31:39 +10:00
Damien Elmes
c97205a535 Fix FSRS retrievability sorting issues
- We must use interval, not stability to infer days_elapsed
- We must use original due date in a filtered deck
- Use retrievability in filtered deck sorting, not just regular sorting
2023-11-20 13:59:45 +10:00
Abdo
b94c1c2f5f Expose ImportAnkiPackageOptions (#2835) 2023-11-20 13:17:53 +10:00
Damien Elmes
60cfa254e8 Fix broken bundling on Windows 11
When Windows notices "install" in the filename it triggers a UAC elevation,
causing 'cargo run' to fail.
2023-11-20 12:01:34 +10:00
Damien Elmes
c6523a7115 Tweaks to Windows build instructions 2023-11-20 11:59:08 +10:00
Damien Elmes
2da97e4720 Fix cards showing up due in the past in a filtered deck
Caused by using due instead of original_due when card was in learning.
I think the original goal of that code was to ignore the learning timestamp
and show the next review date instead, but it's both simpler and more
intuitive to show the learning date instead.
2023-11-20 10:52:13 +10:00
Hikaru Y
ee8b5ea171 Fix misalignment of IO masks in Qt5 when image is vertically long (#2829)
* Revert "Fix I/O not showing in Qt5"

This reverts commit 7249dd9811.

* Fix misalignment of IO masks in Qt5 when image is vertically long

Also, as in Qt6, constrain the IO image to fit in the viewport.
2023-11-16 10:30:54 +10:00
Damien Elmes
c1588356bd Automatically disable sandbox on Qt5 PyPi/packaged builds 2023-11-16 10:28:58 +10:00
Damien Elmes
353d1ac003 Ignore invalid I/O notetypes when deciding whether to add
https://forums.ankiweb.net/t/can-t-add-new-cards/37155
2023-11-15 13:32:02 +10:00
Damien Elmes
a0f061d57a Add ability for pages created by add-ons to opt in to API 2023-11-14 15:55:09 +10:00
Abdo
fc5b38567b Fix filtered deck ordering of intraday learning cards and reviews (#2828)
* Fix filtered deck ordering of intraday learning cards and reviews

* Handle rollover correctly
2023-11-14 15:08:36 +10:00
Abdo
7c2007ccad Persist FSRS weights search in preset (#2827) 2023-11-14 11:47:08 +10:00
Ben Olson
f603eb29f0 Resolve a11y for tag options buttons (#2787)
* resolve TagAddButton a11y
better comments to document tagindex reasoning

* resolved a11y for TagsSelectedButton
allow focus to TagsSelectedButton with Shift+Tab and Enter or Space to show popover

* safely ignore a11y warning as container for interactables is not itself interactable

* Update CONTRIBUTORS

* quick fix syntax

* quick fix syntax

* quick fix syntax

* quick fix syntax

* resolved a11y in accordance with ARIA APG Disclure pattern

* resolved a11y
ideally should replace with  with
a11y-click-events-have-key-events is explicitly ignored as the alternative (adding ) seems more clunky

* resolved SpinBox a11y
cannot focus on these buttons, so no key event handling needed (keyboard editting already possible by just typing in the field)
widget already properly follows ARIA APG Spinbutton pattern

* cleanup

* onEnterOrSpace() function implemented as discussed in #2787 and #2564

* quick syntax and such changes
2023-11-14 11:40:04 +10:00
Damien Elmes
f346048e15 Bump Apple Silicon build to macOS 12+
Latest Xcode has broken macOS 11 on ARM, and I can't find a workaround

https://forums.ankiweb.net/t/can-t-open-anki-after-download/36938/14
2023-11-14 11:19:11 +10:00
Damien Elmes
d9f9103a36 Don't restrict answer key shortcuts
Qt seems to handle invalid input gracefully, and the previous approach
prevented things like umlauts or keys with modifiers.

https://forums.ankiweb.net/t/bug-cannot-set-answer-key-to-german-umlaut/37091
2023-11-13 16:09:32 +10:00
Damien Elmes
7249dd9811 Fix I/O not showing in Qt5
Images still gets stretched, because Qt5 doesn't support the aspect-ratio
CSS property, but it's better than nothing.

https://forums.ankiweb.net/t/possible-occulusion-issue-on-ver-23-10-and-the-solution/36894
2023-11-13 15:31:50 +10:00
Damien Elmes
dc0d4e9fe1 Enable webview debugging in Qt5 scripts 2023-11-13 15:20:50 +10:00
RumovZ
134793835f Allow applying limits of inactive parents (#2824)
* Allow applying limits of inactive parents

* Tweak label/help text (dae)
2023-11-13 14:30:19 +10:00
Damien Elmes
3d0ef99cf1 Bump version to 23.12
New features have been merged in, and an API has changed, so this seems
more appropriate. If any urgent issues are found, I'll make a separate
branch for 23.10.2.
2023-11-13 13:57:33 +10:00
RumovZ
cf28ec1437 Allow im-/exporting with or without deck configs (#2804)
* Allow im-/exporting with or without deck configs

Closes #2777.

* Enable webengine remote debugging in launch.json

* Reset deck limits and counts based on scheduling

Also:
- Fix `deck.common` not being reset.
- Apply all logic only depending on the source collection in the
gathering stage.
- Skip checking for scheduling and only act based on whether the call
wants scheduling. Preservation of filtered decks also depends on all
original decks being included.
- Fix check_ids() not covering revlog.

* Fix importing legacy filtered decks w/o scheduling

* Disable 'include deck options' by default, and fix tab order (dae)

* deck options > deck presets (dae)
2023-11-13 13:54:41 +10:00
Damien Elmes
e5153fde78 Fix some build steps being re-run a second time unnecessarily 2023-11-13 13:35:54 +10:00
Abdo
cb9d5218f7 Add auto-advance options to deck preset (#2765)
* Move stop-timer-on-answer strings to correct section

* Add auto-advance options to deck preset

* Implement answer actions

* Fix error when last card is answered before timeout

* Fix deserialization of answerAction

* Add answerAction to reserved key list

* Fix inverted boolean

* Add option to wait for audio to finish

* Add auto-advance toggle

* Add shortcut

* Disable auto-advance when main window state changes

* Start auto-advance timer after option is toggled

* Disable auto-advance when main window loses focus

* Use existing translations

* Add Answer Hard and Show Reminder
2023-11-13 10:41:51 +10:00
Kieran Black
b363445135 fix: refresh model list when legacy addon adds notetype (#2825)
* refresh model list when legacy addon adds notetype

When legacy addons add note types, they automatically add the note type to the collection models. When this was detected, the dialog box presenting the list of models was not being updated due to an early return in the code. This commit adds a list refresh along this path of execution to ensure the gui is updated with the newly added model.

* add trailing space to name in CONTRIBUTORS
2023-11-13 10:36:21 +10:00
Abdo
48d38bb9af Show due date of buried/suspended cards in card info (#2820)
* Show due date of buried/suspended cards in card info

* Simplify match and handle relearning cards

* Omit ctype checks

* Test due, not card.due (dae)
2023-11-13 10:23:46 +10:00
Abdo
dd3aa23512 Fix jittery virtual table scrolling on mobile (#2810)
* Fix jittery virtual table scrolling on mobile

* Fix table body appearing above header on iOS (dae)
2023-11-13 10:19:33 +10:00
Damien Elmes
b989c98639 Update fsrs-rs 2023-11-13 10:13:20 +10:00
Damien Elmes
7e8735c16e Bump version 2023-11-13 10:10:00 +10:00
Damien Elmes
36fae1a30e Update self_cell for UB fix 2023-11-12 10:40:33 +10:00
Damien Elmes
2868edffe0 Update translations 2023-11-09 20:44:13 +10:00
Damien Elmes
02c476b54e More tweaks to API security
- Allow custom study methods in reviewer to prevent errors
- Ensure we 'fail closed' if referer header has been removed
- Ensure we ignore opaque POST requests from other origins

Thanks again to Daniel for the feedback.
2023-11-09 20:43:23 +10:00
snowtimeglass
d3357d0244 Change tooltip strings for image occlusion center alignments (#2815)
- Fix the swapping of the strings

- Change the strings to make the meanings clearer

- Incidentally, add a name to CONTRIBUTORS
2023-11-09 12:02:51 +10:00
Abdo
8fc04f52fe Hide "toggle masks" in "Hide One, Guess One" mode (#2817) 2023-11-09 09:59:01 +10:00
Abdo
92b88fc3e2 Move anki.utils.html_to_text_line() to backend (#2816) 2023-11-09 09:57:23 +10:00
Damien Elmes
7bcb31b65b Check video tags in media check
https://forums.ankiweb.net/t/video-tag-does-not-recognize-the-source-file-in-check-media/36850/2
2023-11-08 14:00:41 +10:00
Damien Elmes
0f2303002c Fix Android backend failing to build on Windows with n2 2023-11-08 13:31:35 +10:00
Damien Elmes
58d69589ff Fix Anki closing before 'clock is off' message appears
Also fix it showing HTML code instead of formatted text
2023-11-08 12:01:31 +10:00
Damien Elmes
b93a616747 Update translations 2023-11-08 11:28:14 +10:00
Damien Elmes
7afc0d0f2c Relax desired retention warning from 0.85 to 0.8 2023-11-08 11:28:08 +10:00
Damien Elmes
f822d9243d Prevent legacy pages apart from the editor from accessing our API
Thanks to Daniel for the suggestion.
2023-11-08 10:59:52 +10:00
Damien Elmes
a0c1bc723d Add ability to tag legacy pages with a context
Will allow us to identify which of our screens requests are coming in
through, until we can migrate them to separate entrypoints.
2023-11-08 10:59:15 +10:00
Damien Elmes
77b2fa5761 Ensure webpages in browser can't access local webserver
Thanks to Daniel for the report.
2023-11-08 10:59:15 +10:00