Commit Graph

8860 Commits

Author SHA1 Message Date
Damien Elmes
cbc358ff0b add aliases to run vendored python and node from command line
You can then do './scripts/python -m venv /path/to/venv' to create
a virtual env based on the bundled Python, which can be handy if
you don't happen to have the appropriate version of Python installed
separately.
2021-10-18 19:50:41 +10:00
Damien Elmes
5e604df306 pip/ -> python/ 2021-10-18 19:50:40 +10:00
Damien Elmes
75932db734 enable eslint on aqt/data/web/js 2021-10-18 19:39:45 +10:00
Damien Elmes
89279f7f5e use ts_project for aqt/data/web/js
We're now ts_project only, and are less likely to run into issues
with future rules_nodejs updates.
2021-10-18 19:39:45 +10:00
Damien Elmes
3d416b4a68 convert sql_format to ts_project; move into separate folder 2021-10-18 19:39:45 +10:00
Damien Elmes
5eb1208714
Merge pull request #1431 from RumovZ/non-modal-card-info
Non modal card info
2021-10-18 18:09:52 +10:00
RumovZ
9b1d53e359 Use null for missing stats 2021-10-18 09:36:31 +02:00
RumovZ
0b3b3a5f33 sentCardId -> requestedCardId 2021-10-18 09:12:10 +02:00
RumovZ
8eed005db6 Use null for unset cardId 2021-10-18 09:11:00 +02:00
RumovZ
dc4f5adc44 Default to includeRevlog = true 2021-10-18 09:04:49 +02:00
RumovZ
ca57cb964c Format 2021-10-18 09:01:25 +02:00
RumovZ
2a93868922 Center placeholder 2021-10-18 09:01:25 +02:00
RumovZ
b6104fa10b Use language that mypy understands 2021-10-18 09:01:25 +02:00
RumovZ
cbeb992175 Fix _legacy_card_stats() 2021-10-18 09:01:25 +02:00
RumovZ
bbba21126f Improve clarity in card info code a tiny little bit 2021-10-18 09:01:25 +02:00
RumovZ
ec02a4218e Keep Card Info Dialog open even if no card is set 2021-10-18 09:01:24 +02:00
RumovZ
3c5e149176 Move update logic into CardInfo.svelte
Also use a simpler and faster way to avoid race conditions.
2021-10-18 09:01:24 +02:00
RumovZ
5062024974 Move update logic into CardInfo.svelte 2021-10-18 09:01:24 +02:00
RumovZ
4b5ea6c110 Make CardStats a separate component 2021-10-18 09:01:23 +02:00
RumovZ
1d63253b4f Make window titles more user-friendly 2021-10-18 09:01:23 +02:00
RumovZ
7eec241c82 Add utility func for setting window icon 2021-10-18 09:01:23 +02:00
RumovZ
f0d7e6f4d1 Use updating card infos in browser and reviewer 2021-10-18 09:01:23 +02:00
RumovZ
13024fcccc Add update handler for Card Info Dialog 2021-10-18 09:01:22 +02:00
RumovZ
859b1d1a39 Make Card Info Dialog non-modal 2021-10-18 09:01:22 +02:00
RumovZ
a47453d5f3 Implement reactively updating Card Info 2021-10-18 09:01:22 +02:00
Damien Elmes
800975b0db
Merge pull request #1434 from ankitects/sveltecheck
Svelte build improvements
2021-10-18 13:13:54 +10:00
Damien Elmes
fed5c3da0e drop ts_library() requirement in ts/svelte 2021-10-18 13:00:55 +10:00
Damien Elmes
bb5053990b pass ts deps into most Svelte packages; remove redundant deps
Henrik, I've left editable/editor alone to avoid causing a conflict;
please add them in your PR instead when you get a chance.
2021-10-18 12:44:31 +10:00
Damien Elmes
1f876cfe39 Svelte build improvements
1. All Svelte files in a package are compiled in one step now, which
ensures that properties that use types from a different Svelte file in the
same package are typed correctly. The single-file svelte() has been removed,
and compile_svelte() may be renamed to svelte() in the future.

2. The .ts files in the same package are included as part of the Svelte
compilation, so that types imported imported from .ts files in the
same package work.

3. Dependencies passed into the rule are now loaded into the TypeScript
compiler, so that properties referencing types from different packages
work. We'll need to update our compile_svelte() lines to list the
dependencies. For example, before this change:

% cat bazel-bin/ts/congrats/CongratsPage.svelte.d.ts
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
    props: {
        info: any;
    };
...

After adding //ts/lib to the deps of compile_svelte() in ts/congrats:

% cat bazel-bin/ts/congrats/CongratsPage.svelte.d.ts
import { SvelteComponentTyped } from "svelte";
import type { Scheduler } from "../lib/proto";
declare const __propDef: {
    props: {
        info: Scheduler.CongratsInfoResponse;
    };
...
2021-10-18 12:44:29 +10:00
Damien Elmes
a29bd7c9f0 unbury when rendering deck list
We were previously relying on the sched_timing_today() call in the
backend, but v3 doesn't call it, leading to cards remaining buried.
2021-10-16 21:11:09 +10:00
Damien Elmes
b87c4ee946
Merge pull request #1429 from ankitects/apple-arm
Initial aarch64-apple support
2021-10-16 18:22:01 +10:00
Damien Elmes
d39e7be451 fix qtwebengineprocess failing to load on darwin-aarch64 2021-10-16 18:07:39 +10:00
Damien Elmes
e577bd12b8 work around pyqt6.2.0's incorrect architecture label 2021-10-16 18:07:39 +10:00
Damien Elmes
3d1c2cb841 roll back regex due to unsigned wheel 2021-10-16 18:07:39 +10:00
Damien Elmes
7797f88553 add aarch64-apple to Rust targets 2021-10-16 18:07:39 +10:00
Damien Elmes
6f4b76ef01 use x86 binaries for clang format/protobuf on Mac 2021-10-16 18:07:39 +10:00
Damien Elmes
732852abb8 switch to node 16.x for macOS aarch64 support 2021-10-16 18:07:39 +10:00
Damien Elmes
e58646909f get PyQt working directly with ./run on macOS
It's no longer necessary to copy everything into bazel-copy, and you
can safely remove that folder.
2021-10-16 18:07:29 +10:00
Damien Elmes
424bb5bc68 remove unneeded namespace code from install_pyqt5/6.py 2021-10-16 18:07:29 +10:00
Damien Elmes
44d3584071 remove duplicate clang format file 2021-10-16 16:54:35 +10:00
Damien Elmes
cf71ebfe7c drop rules_pip
Our vendored Python includes a recent pip, so we no longer need rules_pip's
dependencies for our PyQt scripts.
2021-10-16 16:54:35 +10:00
Damien Elmes
d0feffde74 avoid pulling qt5 in unless requested 2021-10-16 16:54:34 +10:00
Damien Elmes
b697ef3044 update Python deps 2021-10-16 09:29:11 +10:00
Damien Elmes
281f1b2bf9 build all the UI files in one go
On macOS, the overhead of importing PyQt for each file far exceeds
any gains we get from incremental recompilation.
2021-10-16 09:20:20 +10:00
Damien Elmes
2c17105a35 use string replacements to generate Qt5 forms
They are mostly compatible, and this means a Qt5 install is not required
as part of the build process.
2021-10-16 08:59:09 +10:00
Damien Elmes
bdbcb6d7aa default to a vendored copy of Python
Brings Python in line with our other dependencies, and means users
no longer need to install it prior to building, or deal with
issues caused by having the wrong version available.
2021-10-15 22:14:05 +10:00
Damien Elmes
4a8e2bdc2d download wheels using rules_python 2021-10-15 16:02:26 +10:00
Damien Elmes
819ec40a3e update rules_python 2021-10-15 15:07:31 +10:00
Damien Elmes
63fe9097fa
Merge pull request #1406 from ankitects/qt6
PyQt6 support
2021-10-15 13:38:56 +10:00
Damien Elmes
b10aebc8b8 use separate header state for each Qt version
https://forums.ankiweb.net/t/new-toolkit-and-packaging-test-windows/14081/15
2021-10-15 13:15:38 +10:00