Commit graph

8945 commits

Author SHA1 Message Date
Henrik Giesel
d654a57a90 Set "no-non-null-assertion: off" by default (#1475) 2021-11-04 11:42:51 +10:00
Damien Elmes
5e8580e137 ensure revlog headers match alignment of columns
+ right-align interval; it looks bad centered
2021-11-02 16:32:09 +10:00
Damien Elmes
600cbe5ded use absolute package paths in eslint.bzl 2021-11-02 13:49:19 +10:00
Damien Elmes
cc325d74b8 add lint checks for unsupported browser API calls 2021-11-02 13:44:41 +10:00
Damien Elmes
37df65d0c8 avoid Object.fromEntries() and some instances of globalThis
Not supported on early iOS 12. This can be reverted after iOS 12
support is dropped, which should be soon.
2021-11-02 12:54:06 +10:00
Damien Elmes
dd4c4eb07c include subfolders in eslint/prettier checks 2021-11-02 12:50:27 +10:00
Damien Elmes
5bad3d067c revert congrats h3 style change from #1470
Presumably bootstrap is overriding the styling of headers; this is a
quick fix to make the header be bold again, like the graphs screen.
2021-11-01 12:55:31 +10:00
Damien Elmes
43be693cc5 set local=False for python/protoc/clang
Suspect this will fix these repos being unnecessarily restarted on
changes to the workspace.
2021-11-01 11:38:20 +10:00
Damien Elmes
032c7e49c3 allow passing npm repo name in compile_svelte() 2021-10-31 18:10:11 +10:00
Damien Elmes
a3a9523f6f use absolute path for sql_format 2021-10-31 11:13:38 +10:00
Henrik Giesel
d74c38abe5 Several CSS fixes - Editor Cleanup (#1470)
* Refactor editor css, fix editor button highlight

- Avoid using webview.css
- Move more buttons css into button_mixins

* Fix DropdownItem appearance

* Fix the visuals of tags

* Make dropdown font slightly smaller

* Give SelectOption a background color

* Move some css from deck-options-base to CardStateCustomizer

* Avoid using core.scss for CardStats

* Avoid using sass/core in congrats package

* Inline core.scss into webview.scss

* Include fusion-vars for base.scss

* need to keep core.scss around for now (dae)
2021-10-31 08:29:22 +10:00
Matthias Metelka
f85e2e8cef Highlight field badges when toggled to non-default state (#1466) 2021-10-31 07:48:37 +10:00
Damien Elmes
82ab53c249 fix ts-run
Closes #1468
2021-10-30 09:14:43 +10:00
Damien Elmes
8ef362e7ed fix scripts/mypy*
Broken in switch to rules_python
2021-10-30 09:14:43 +10:00
Damien Elmes
455e0ce63b fix sort order toggling
We're getting an enum instead of an int in Qt6

normal/reversed have been renamed to ascending/descending; no add-ons
appear to be using the old versions.
2021-10-30 09:14:43 +10:00
Damien Elmes
670690fd64 fix broken startup on macOS due to incorrect mpv path 2021-10-30 09:14:43 +10:00
Damien Elmes
ce12b00c8e fix missing protobuf C extension on darwin-arm 2021-10-30 09:14:43 +10:00
RumovZ
e49b81bf88 Disable renaming of no-flag item (#1467) 2021-10-30 09:08:51 +10:00
RumovZ
d62d23c525 Use backend for getting deck children (#1465)
* Add backend routine for child deck names and ids

* Use backend for getting deck children

Instead of flawed case-sensitive Python logic.
2021-10-29 19:43:17 +10:00
Damien Elmes
0facadcf91 ignore requested graphics driver on Qt6 for now 2021-10-29 19:34:05 +10:00
Damien Elmes
a3c7628931 avoid printing compat warning on Qt5 2021-10-29 19:29:12 +10:00
Damien Elmes
c0a812cf9a tweaks for Linux package 2021-10-29 19:26:35 +10:00
Damien Elmes
56e432cf16 tweaks for Windows package
- move audio tools into subfolder
- add buildmanifest.py
2021-10-29 18:11:28 +10:00
Damien Elmes
951339a6fa show warning instead of crashing when recording on darwin-arm64 2021-10-29 14:43:59 +10:00
Damien Elmes
6774f81895 rename some of the files in aqt/qt/ 2021-10-29 13:54:24 +10:00
Damien Elmes
faf4ddf55f remove PyQt 6.2.0 workarounds
Fixed in the 6.2.1 release, and attempting to sign again on ARM
breaks the build.
2021-10-29 13:48:39 +10:00
Damien Elmes
a1a65fe4ff fix new cards not being correctly limited
https://forums.ankiweb.net/t/ios-beta-20080-2-more-new-cards-after-review-limit-is-met/13728/10
2021-10-29 12:12:34 +10:00
Damien Elmes
5f929cc959 add a flag to disable PyQt5 compat 2021-10-29 10:08:07 +10:00
Damien Elmes
62ec17adc6 fix missing icons in browse screen
Introduced in 4a0fa32d3c
2021-10-29 10:08:07 +10:00
Damien Elmes
4ce839b8d8 update to PyQt 6.2.1 2021-10-29 08:40:22 +10:00
Damien Elmes
4a0fa32d3c print a deprecation warning for old-style enums
https://github.com/ankitects/anki/pull/1440#issuecomment-948622876
2021-10-28 20:21:52 +10:00
Damien Elmes
a898940b75 use aqt.qt to (partially) mock the old PyQt5 module
We can't import the Qt5 libraries to do it - they are not usually
available, and it will lead to crashes if both are imported at once.
2021-10-28 20:17:18 +10:00
Aristotelis
a2b1deacba Maintain compatibility with PyQt5 add-ons in PyQt6 builds (#1440)
* Alias PyQt5 to PyQt6 on PyQt6 builds

Restores basic compatibility with PyQt5 add-ons

* Register QtCore early to work around sip error

* Monkey-patch unscoped enums that are in use by add-ons back in

Enums whose namespace moved with PyQt6 were determined using the tooling in https://github.com/qutebrowser/qutebrowser/issues/5904

Relevant enums for the Anki add-on ecosystem were found by grepping through all AnkiWeb add-ons and a selection of GitHub-released add-ons.

* Add full Qt.Key namespace

Maintains compatibility with add-ons that allow specifying key bindings via Qt.Key enums

* Reintroduce PyQt6.Qt as an alias for QtCore.Qt

* Alias classes shifted from QtWidgets to QtGui

* Add missing enums

Adds ≈200 enums that were missed during the initial grep

* Map exec_ calls to exec

* Tweak section headers

* Fix QtWebEngineWidgets imports failing due to delayed import

Addesses: "QtWebEngineWidgets must be imported before a QCoreApplication instance is created"

* Register additional aliases for top-level Qt modules

Given how we have had to deal with side-effects when not registering other aliased imports ahead of time, it seems safer to also register the remaining few with sys.modules.

* Handle calls to deprecated PyQt resource API graciously

* Create QtWebEngineWidgets aliases for classes moved to QtWebEngineCore

* Alias QShortcut

* Restore QWebEnginePage.view()

* Alias sip to PyQt6.sip

* Alias QtCore.QRegExp to QtCore.QRegularExpression

* Restructure aqt.qt into package

Pre-requirement for aliasing the PyQt5.Qt namespace correctly.

Should hopefully also make it easier to keep an overview as Qt-compat-related modules were proliferating.

* Properly alias PyQt5.Qt

PyQt5.Qt used to serve as a common namespace for all Qt classes, not just QtCore.Qt.*

While this changes does not make all classes accessible via PyQt5.Qt, it does so for the most important Qt submodules, which should cover most add-on breakages.

* Simplify Qt resource system legacy handling

* Also alias PyQt6.Qt

Covers imports of the form `from PyQt5 import import Qt` (due to previous aliasing of PyQt5 to PyQt6)

* Add missing enums

Better approach to grepping through add-ons yielded additional hits

* Run formatters

* Satisfy pylint
2021-10-28 19:57:42 +10:00
Henrik Giesel
915b638dcc Fix DeckOptions toolbar having wrong margins and no flex-grow (#1464)
ButtonToolbar.svelte now has to assume that the button elements
are two levels below it. This can be simplified once we can use
flex-gap.
2021-10-28 19:37:52 +10:00
RumovZ
008fa9692b Fix quotation of "and" and "or" in search (#1463) 2021-10-28 19:23:56 +10:00
RumovZ
67ca3308a5 Stop trimming filename references before encoding (#1462)
Closes  #1430
2021-10-28 19:22:51 +10:00
Damien Elmes
d2fc9ee608 ignore a spurious mypy error 2021-10-28 19:19:37 +10:00
Damien Elmes
0509362da4 Merge branch 'packaging'
An experimental new approach based on PyOxidizer instead of PyInstaller.

PyInstaller doesn't currently define __file__ in bundled files, so a
few parts of the code that were referencing __file__ directly needed
to be updated. The root_path argument to flask is for the same reason -
it tries to look up __file__ without it.
2021-10-28 18:58:20 +10:00
Damien Elmes
8c830f3eea make console optional on Windows 2021-10-28 18:57:21 +10:00
Damien Elmes
73160fd16c updated package scripts 2021-10-28 18:46:45 +10:00
Damien Elmes
61f103f522 use ResourceReader for serving bundled web files 2021-10-28 18:31:12 +10:00
Damien Elmes
8b706c8141 add missing wheel/helper for darwin-arm64 2021-10-28 18:29:18 +10:00
Damien Elmes
87b94a27fa support args to ts-run 2021-10-26 20:11:35 +10:00
Abdo
9e97ac1023 Strip isolation chars from deck options warnings to fix RTL display (#1457)
Co-authored-by: Damien Elmes <dae@users.noreply.github.com>
2021-10-26 20:11:25 +10:00
Damien Elmes
cf831587e1 mention glibc requirements
https://forums.ankiweb.net/t/wheel-not-supported-on-the-platform-which-built-it/14432
2021-10-26 18:08:08 +10:00
Damien Elmes
ed7d090097 bump version 2021-10-26 14:14:20 +10:00
Damien Elmes
eee17476e3 fix deprecation warning in latest svelte-preprocess 2021-10-26 08:43:02 +10:00
Damien Elmes
409804a717 update translations 2021-10-26 08:30:13 +10:00
Damien Elmes
6c3f4c167c fix missing dependencies on ftl:sync 2021-10-26 08:30:13 +10:00
Damien Elmes
fb3e6db1c7 update js deps 2021-10-26 08:30:13 +10:00