Commit Graph

10481 Commits

Author SHA1 Message Date
Abdo
8e5bd2c3a1
Close import log page on error (#2639) 2023-09-05 10:47:49 +10:00
Abdo
c45f3cb0af
Do not show [object Object] (#2636) 2023-09-04 11:17:42 +10:00
Abdo
d3d67c2083
Support searching for custom data strings (#2634)
* Add extract_custom_data

* Add tests for has-cd

* Add `prop:cds` query
2023-09-04 11:17:13 +10:00
Damien Elmes
ff53625408 Update nightly formatter
Rustfmt is now capable of formatting let Some(..) else {} blocks
2023-09-02 16:13:50 +10:00
Abdo
064b973a2a
Allow searching for missing custom data properties (#2626)
* Allow searching for missing custom data properties

* Add has-cd query
2023-09-01 14:13:31 +10:00
Nil Admirari
9d3f01043b
Support AVIF (#2630) 2023-08-31 08:44:10 +10:00
Damien Elmes
25cab1c67a Revert "Revert "Pull in latest upstream n2 fixes""
Was some debug code in my status hiding patch; commit link updated.
2023-08-31 08:31:43 +10:00
Damien Elmes
1100bb6fe8 Revert "Pull in latest upstream n2 fixes"
This reverts commit e07e60495b.

Latest update has an issue on macOS.
2023-08-31 08:00:34 +10:00
Damien Elmes
e86cebd45e Fix importing link 2023-08-31 07:52:21 +10:00
Damien Elmes
e07e60495b Pull in latest upstream n2 fixes
- Fixes an issue where tasks would continue to appear active for a while
after they had finished on Unix platforms
- The latest n2 now behaves the same way as ninja when substituting
variables, so we no longer need to do the substitution ourselves.
2023-08-31 07:40:57 +10:00
Damien Elmes
740528eaf9 Update to Rust 1.72 2023-08-25 07:56:38 +10:00
Damien Elmes
408b48834b Fix clippy issues in Rust 1.72 2023-08-25 07:56:38 +10:00
Monty Evans
95f7d5a941
Change “Delete Note” shortcut to cmd+backspace (#2614)
* Changed delete note shortcut during reviewing to ctrl+backspace

* Added name to contributors

* Changed Mac shortcut
2023-08-25 07:15:11 +10:00
Damien Elmes
dcf91fcc50 Fix ninja compatibility 2023-08-25 02:45:16 +10:00
Aristotelis
b55cf11e0e
Update CONTRIBUTORS (#2623)
Re-register updated GH noreply email
2023-08-24 13:16:37 +10:00
Aristotelis
594267149d
[IO API] Create Python entry points for creating and editing IO notes (#2598)
* Create python API for adding and editing IO notes

Also: Refactor IO-related methods, tweaking their naming and moving them to a continuous section

* Ensure editor is loaded before setupMaskEditor call

---------

Co-authored-by: Glutanimate <glutanimate@users.noreply.github.com>
2023-08-24 12:35:38 +10:00
Damien Elmes
239e964c42
Shift output suppression into n2 (#2618)
After updating with tools/install-n2, you should now be able to see
the last line of long-running commands like cargo invocations.
2023-08-23 11:59:52 +10:00
Damien Elmes
3b7c5d71ab Update Rust deps 2023-08-23 11:44:33 +10:00
Damien Elmes
9122aab3ad Fix a deprecation warning in Svelte 2023-08-23 11:05:14 +10:00
Aristotelis
538ea31387
Fix typo: notetypeId → noteId (#2615)
IOEditingMode interface expects noteId
2023-08-21 15:00:05 +10:00
Damien Elmes
bc295b41c1 Update n2 to fix https://github.com/ankitects/anki/pull/2612#issuecomment-1685376149 2023-08-21 12:45:17 +10:00
Damien Elmes
70506aeb99 Temporarily turn off I/O support
Aristotelis has asked for a bit more time to work on it, and this unlocks
a new beta/stable release. Will revert this commit after the release is
out.
2023-08-20 08:41:35 +10:00
Damien Elmes
cdcd9bcce0 New collections now start with the v3 scheduler 2023-08-19 13:31:01 +10:00
Damien Elmes
f2fefbb052 Update translations 2023-08-19 11:53:37 +10:00
Damien Elmes
d2022d1a6d Avoid allocating in extract_latex() if possible; make public 2023-08-19 08:05:39 +10:00
Mani
87e2cf7976
fix: reset image button in io note editor (#2602) 2023-08-16 07:47:46 +10:00
Gabriel Heinatz
72ed482133
fixed and tested issue #2608 (#2611)
* fixed issue #2608
It was indeed the tabstop order.

* added my name and mail to fulfill test requirements

* fixed and tested issue #2608
There was a wrong name in the tabstop, so it could not resolve that name and skipped the element.
2023-08-16 07:26:50 +10:00
Damien Elmes
b73cb15888 Take another approach to dealing with conflicting flattened keys
The approach in #2542 unfortunately introduced a regression, as whilst
it ensured that duplicate keys are removed when downgrading, it no longer
prevented the duplicates from being removed when converting to a legacy
Schema11 object. This resulted in things like backend.get_notetype_legacy()
returning duplicate keys, and could break syncing:

https://forums.ankiweb.net/t/windows-desktop-sync-error/33128

As syncing and schema11 object usage is quite common compared to downgrading,
the extra Value deserialization seemed a bit expensive, so I've switched
back to explicitly removing the problem keys. To ensure we don't forget to
add new keys in the future, I've added some new tests that should alert us
whenever a newly-added key is missing from the reserved list.
2023-08-15 11:25:53 +10:00
Damien Elmes
c112236dd9 Support include_filtered=false, skip_default=true case 2023-08-08 15:34:43 +10:00
mjuhanne
cc776bb0ca
Fix crash caused by uninitialized self._reps in class Reviewer (#2603)
* Fix crash caused by uninitialized self._reps in class Reviewer

* Do not declare _reps in reviewer.py twice
2023-08-07 15:10:47 +10:00
Damien Elmes
934f582804 Support importing AnkiDroid's legacy backups
They were missing the media map, and were not importable by the desktop.
2023-08-03 19:33:16 +10:00
Abdo
98715e593a
Improve presentation of importing results (#2568)
* Implement import log screen in Svelte

* Show filename in import log screen title

* Remove unused NoteRow property

* Show number of imported notes

* Use a single nid expression

* Use 'count' as variable name for consistency

* Import from @tslib/backend instead

* Fix summary_template typing

* Fix clippy warning

* Apply suggestions from code review

* Fix imports

* Contents -> Fields

* Increase max length of browser search bar

https://github.com/ankitects/anki/pull/2568/files#r1255227035

* Fix race condition in Bootstrap tooltip destruction

https://github.com/twbs/bootstrap/issues/37474

* summary_template -> summaryTemplate

* Make show link a button

* Run import ops on Svelte side

* Fix geometry not being restored in CSV Import page

* Make VirtualTable fill available height

* Keep CSV dialog modal

* Reword importing-existing-notes-skipped

* Avoid mentioning matching based on first field

* Change tick and cross icons

* List skipped notes last

* Pure CSS spinner

* Move set_wants_abort() call to relevant dialogs

* Show number of imported cards

* Remove bold from first sentence and indent summaries

* Update UI after import operations

* Add close button to import log page

Also make virtual table react to resize event.

* Fix typing

* Make CSV dialog non-modal again

Otherwise user can't interact with browser window.

* Update window modality after import

* Commit DB and update undo actions after import op

* Split frontend proto into separate file, so backend can ignore it

Currently the automatically-generated frontend RPC methods get placed in
'backend.js' with all the backend methods; we could optionally split them
into a separate 'frontend.js' file in the future.

* Migrate import_done from a bridgecmd to a HTTP request

* Update plural form of importing-notes-added

* Move import response handling to mediasrv

* Move task callback to script section

* Avoid unnecessary :global()

* .log cannot be missing if result exists

* Move import log search handling to mediasrv

* Type common params of ImportLogDialog

* Use else if

* Remove console.log()

* Add way to test apkg imports in new log screen

* Remove unused import

* Get actual card count for CSV imports

* Use import type

* Fix typing error

* Ignore import log when checking for changes in Python layer

* Apply suggestions from code review

* Remove imported card count for now

* Avoid non-null assertion in assignment

* Change showInBrowser to take an array of notes

* Use dataclasses for import log args

* Simplify ResultWithChanges in TS

* Only abort import when window is modal

* Fix ResultWithChanges typing

* Fix Rust warnings

* Only log one duplicate per incoming note

* Update wording about note updates

* Remove caveat about found_notes

* Reduce font size

* Remove redundant map

* Give credit to loading.io

* Remove unused line

---------

Co-authored-by: RumovZ <gp5glkw78@relay.firefox.com>
2023-08-02 20:29:44 +10:00
Mani
b9da61f993
follow-up pr for io button in note editor (#2600)
* follow-up pr for io button in note editor

* Expose change event in Svelte instead of relying on timeout (dae)
2023-07-31 14:24:26 +10:00
Damien Elmes
a35c1a058d Extract inline images as part of media check
We also need to get to the bottom of what's causing this:
https://forums.ankiweb.net/t/anki-browse-extremely-laggy/32533
2023-07-31 12:23:16 +10:00
Damien Elmes
7a34f83d40 Update regex crate for .extract()
Also update yanked hermit-abi
2023-07-31 12:20:07 +10:00
Damien Elmes
1d7559819c Quick fix for I/O disappearing after first add
Closes #2596
2023-07-27 23:35:20 +10:00
Mani
135de7f9ed
image occlusion button in note editor (#2485)
* setup mask editor in note editor
- add image on mask button click (only one time)
- show hide add button for io on notetype change
- hide field in io notetype
- icon for toggle
and replace image

* add update io notes

* Tidy up i/o notetype check and fix error

- Make it a method on editor
- Use .get(), because the setting doesn't exist on older notetypes
- Pass the bool value into the ts code, instead of the enum

* reset io page after adding

* remove adjust function & add target for mask editor

* handle browse mode & merged sidetoolbar and toptoolbar to toolbar

* fix: shape, button click in browse, dropdown menu

* add arrow to add button

* store for handling visiblity of maskeditor
- remove update  button in edit mode, implement autoupdate

* update var name

* simplify store
2023-07-27 22:45:49 +10:00
Aristotelis
0a418e0612
Pass AddCards instance to notetype change hook (#2594)
Allows add-ons that modify AddCards to more easily react to notetype changes without needing to keep AddCards instances as state.
2023-07-27 22:29:59 +10:00
Aristotelis
51a322c77e
[Development] Specify extra directory as a designated ignored folder (#2593)
* Add `extra` directory as a designated ignored folder

Excludes `extra/` from version tracking, file formatters, and file checks.

* Remove pytest cache from exclusion rules

Python test discovery is easy enough to disable for the workspace in VS Code's settings and pytest does not serve any purpose in the context of the project anyway.
2023-07-27 22:27:07 +10:00
Damien Elmes
4691560522 Work around CI failure on Windows with PyQt 6.5.2 2023-07-26 21:10:19 +10:00
Damien Elmes
9ce98207be Update certifi for minor bug fix 2023-07-26 20:41:19 +10:00
Damien Elmes
9fa2495f8d Qt 6.5.1 -> 6.52 on Windows/Mac
Linux still blocked on previous Wayland breakage
2023-07-26 20:39:11 +10:00
RumovZ
543f391096
Pass dict for locals and globals to exec() (#2590) 2023-07-25 21:21:06 +10:00
Luc Mcgrady
bceffd96c6
Add keyboard shortcut for legacy stats (#2583)
* Added: Shortcut for legacy stats

* Added: Name to contributors

* Capitalize S
2023-07-24 11:31:41 +10:00
Damien Elmes
201cdeb831 Update translations 2023-07-24 10:29:59 +10:00
Damien Elmes
e7ee99c5fb Catch altered translation of 'unknown error'
https://forums.ankiweb.net/t/how-to-solve-this-problem-trouble-report/32402
2023-07-24 10:29:37 +10:00
Damien Elmes
61f7c70d3c Don't throw on empty URLs in clipboard
https://forums.ankiweb.net/t/dragging-and-dropping-picture-error/32313
2023-07-24 10:28:07 +10:00
Kenny
3727781522
Fix a11y error in CardsCount Component (#2585)
* fix: a11y issues in CardCounts component

* feat: add name to contributors file

* fix: excessive spacing
2023-07-21 20:43:08 +10:00
Damien Elmes
ae5f1cfda1 Apply similar border-radius fix for help page 2023-07-18 22:50:27 +10:00
Derek Dang
1cac2dc85f
Address a11y warning for TabbedValue (#2582)
* Address a11y warning for TabbedValue

* Make the tab underline straight (dae)
2023-07-18 22:49:02 +10:00