anki/qt/aqt
Henrik Giesel a981e56008
Improved add-on extension API (#1626)
* Add componentHook functionality

* Register package NoteEditor

* Rename OldEditorAdapter to NoteEditor

* Expose instances in component-hook as well

* Rename NoteTypeButtons to NotetypeButtons

* Move PreviewButton initialization to BrowserEditor.svelte

* Remove focusInRichText

- Same thing can be done by inspecting activeInput

* Satisfy formatter

* Fix remaining rebase issues

* Add .bazel to .prettierignore

* Rename currentField and activeInput to focused{Field,Input}

* Move identifier to lib and registration to sveltelib

* Fix Dynamic component insertion

* Simplify editingInputIsRichText

* Give extra warning in svelte/svelte.ts

- This was caused by doing a rename of a files, that only differed in
  case: NoteTypeButtons.svelte to NotetypeButtons.svelte
- It was quite tough to figure out, and this console.log might make it
  easier if it ever happens again

* Change signature of contextProperty

* Add ts/typings for add-on definition files

* Add Anki types in typings/common/index.d.ts

* Export without .svelte suffix

It conflicts with how Svelte types its packages

* Fix left over .svelte import from editor.py

* Rename NoteTypeButtons to unrelated to ensure case-only rename

* Rename back to NotetypeButtons.svelte

* Remove unused component-hook.ts, Fix typing in lifecycle-hooks

* Merge runtime-require and register-package into one file

+ Give some preliminary types to require

* Rename uiDidLoad to loaded

* Fix eslint / svelte-check

* Rename context imports to noteEditorContext

* Fix import name mismatch

- I wonder why these issues are not caught by svelte-check?

* Rename two missed usages of uiDidLoad

* Fix ButtonDropdown from having wrong border-radius

* Uniformly rename libraries to packages

- I don't have a strong opinion on whether to name them libraries or
  packages, I just think we should have a uniform name.
- JS/TS only uses the terms "module" and "namespace", however `package`
  is a reserved keyword for future use, whereas `library` is not.

* Refactor registration.ts into dynamic-slotting

- This is part of an effort to refactor the dynamic slotting (extending
  buttons) functionality out of components like ButtonGroup.

* Remove dynamically-slottable logic from ButtonToolbar

* Use DynamicallySlottable in editor-toolbar

* Fix no border radius on indentation button dropdown

* Fix AddonButtons

* Remove Item/ButtonGroupItem in deck-options, where it's not necessary

* Remove unnecessary uses of Item and ButtonGroupItem

* Fix remaining tests

* Fix relative imports

* Revert change return value of remapBinToSrcDir to ./bazel/out...

* Remove typings directory

* Adjust comments for dynamic-slottings
2022-02-03 14:52:11 +10:00
..
browser Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
data move Bazel convenience symlinks outside of repo folder 2022-01-23 19:18:44 +10:00
forms fix generated code symlinks again 2022-01-24 16:59:37 +10:00
operations Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
qt tweak qrc deprecation warning 2021-12-04 14:35:49 +10:00
__init__.py Fix Alt-Gr and add shortcut to create copy again (#1544) 2021-12-10 17:52:08 +10:00
_macos_helper.py implement a basic native macOS audio recorder 2021-12-07 18:48:24 +10:00
about.py Update about.py (#1533) 2021-12-07 09:01:30 +10:00
addcards.py Simplify name (#1620) 2022-01-24 11:55:15 +10:00
addons.py Add last version check for add-on updates (#1608) 2022-01-21 21:43:54 +10:00
BUILD.bazel run buildifier/buildozer to tidy up BUILD files 2021-12-14 09:18:24 +10:00
changenotetype.py Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
clayout.py Tweak search highlight color in the templates screen (#1625) 2022-01-27 09:40:33 +10:00
colors.py fix generated code symlinks again 2022-01-24 16:59:37 +10:00
customstudy.py Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
dbcheck.py PEP8 collection.py 2021-06-27 15:12:22 +10:00
deckbrowser.py retire the v1 scheduler 2021-11-24 14:12:56 +10:00
deckchooser.py Fix chooser label not being updated when current notetype/deck renamed (#1452) 2021-10-25 13:23:06 +10:00
deckconf.py convert invariant assertions to if statements 2021-11-25 17:47:50 +10:00
deckdescription.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
deckoptions.py Remove individual .html files + other refactorings (#1588) 2022-01-16 15:05:35 +10:00
editcurrent.py PEP8 editorMode 2022-01-12 15:01:43 +10:00
editor.py Improved add-on extension API (#1626) 2022-02-03 14:52:11 +10:00
emptycards.py Fix memory leak in AnkiWebView (#1510) 2021-11-29 12:31:37 +10:00
errors.py catch all recording errors; mention permission 2021-06-02 12:20:40 +10:00
exporting.py fix check for user exporting into data folder on Windows 2021-11-25 09:30:17 +10:00
fields.py Editor Field Descriptions (#1476) 2021-11-06 09:42:48 +10:00
filtered_deck.py convert invariant assertions to if statements 2021-11-25 17:47:50 +10:00
flags.py use Qt search path instead of resource system 2021-10-12 16:17:08 +10:00
gui_hooks.py
hooks_gen.py fix generated code symlinks again 2022-01-24 16:59:37 +10:00
importing.py dump traceback to console on importing exception 2022-01-02 09:47:44 +10:00
legacy.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
main.py disable compression on backup zips again 2022-01-24 21:32:31 +10:00
mediacheck.py fix media trash throttling; decrease delay 2021-12-04 09:10:31 +10:00
mediasrv.py Add _raw methods for all methods in the backend (#1594) 2022-01-21 21:32:39 +10:00
mediasync.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
modelchooser.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
models.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
mpv.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
notetypechooser.py Remove all_names in notetypechooser (#1501) 2021-11-23 10:27:57 +10:00
overview.py avoid duplicate work in overview screen 2021-11-25 09:01:02 +10:00
package.py ignore a spurious mypy error 2021-10-28 19:19:37 +10:00
pinnedmodules.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
preferences.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
profiles.py Add last version check for add-on updates (#1608) 2022-01-21 21:43:54 +10:00
progress.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
py.typed
reviewer.py Add Create Copy to reviewer and use current card's deck (#1569) 2021-12-31 16:45:30 +10:00
schema_change_tracker.py
sound.py Only warn once about missing av player (#1592) 2022-01-16 13:46:01 +10:00
stats.py Fix memory leak in AnkiWebView (#1510) 2021-11-29 12:31:37 +10:00
studydeck.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
switch.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
sync.py convert invariant assertions to if statements 2021-11-25 17:47:50 +10:00
tagedit.py switch to new-style PyQt scoped enums and Qt6 2021-10-15 12:57:19 +10:00
taglimit.py Backend Custom Study (#1600) 2022-01-20 14:25:22 +10:00
taskman.py avoid importing directly from PyQt5 where possible 2021-10-15 10:47:53 +10:00
theme.py Add dark mode detection fix for users without gnome schema (#1610) 2022-01-24 19:48:32 +10:00
toolbar.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00
tts.py update platform checks (eg isWin -> is_win) + devMode 2021-11-25 09:06:16 +10:00
undo.py fix redo menu item showing undo text 2021-08-04 10:28:45 +10:00
update.py PEP8 for rest of pylib (#1451) 2021-10-25 14:50:13 +10:00
utils.py Fix is_zoom_event() (#1607) 2022-01-20 11:56:12 +10:00
webview.py qt/aqt/webview: handle opening href with target=_blank (#1623) 2022-01-24 12:23:01 +10:00
wheel_description.txt
winpaths.py run pyupgrade over codebase [python upgrade required] 2021-10-04 15:05:48 +10:00