Commit Graph

6006 Commits

Author SHA1 Message Date
Henrik Giesel
0b955c3699 Fix formatting 2021-01-10 16:38:20 +01:00
Henrik Giesel
adf969d37f Add a few rslib unit tests 2021-01-10 16:29:10 +01:00
Henrik Giesel
250b89be60 Adjust pyblib test_find 2021-01-10 16:25:52 +01:00
Henrik Giesel
8f01887fe7 Remove coercion in write_rated 2021-01-10 16:23:53 +01:00
Kyle Mills
a0dc33c0e8
typo 2021-01-10 07:18:08 -08:00
Henrik Giesel
87bc1e69b0 Coerce added/edited:0 to 1, constrain rated:n to 1 <= 365 2021-01-10 16:16:17 +01:00
Henrik Giesel
cf1240bb18 Make keys parameter requiring func parameter in _addButton explicit 2021-01-10 13:42:23 +01:00
RumovZ
942632d579 Also add FilterToSearch to want_release_gil() 2021-01-10 11:31:00 +01:00
RumovZ
388e958f39 Don't add 1 when calling _template_filter()
See #913.
2021-01-10 11:30:14 +01:00
Henrik Giesel
fce536f205 Close previewer if there is no card to render 2021-01-10 02:01:24 +01:00
Henrik Giesel
ace61835de Fix formatting, use shortcut on preview before displaying 2021-01-10 01:50:00 +01:00
Henrik Giesel
097fa16783 Allow closing the Preview Dialog with Ctrl+Shift+P 2021-01-10 01:34:59 +01:00
Henrik Giesel
6431f0b6b1 Prevent error when browser is closed with previewer open 2021-01-10 01:21:52 +01:00
Henrik Giesel
6afc495035 Activate toggle on hotkey invocation 2021-01-10 01:10:23 +01:00
Damien Elmes
5f70d718b8 favour readability over brevity in filter conversion 2021-01-10 09:19:33 +10:00
Damien Elmes
8b877f0a08 add type to _named_filter()
The ...Value types generated by mypy-protobuf are only available
at typechecking time, and pylint chokes on them despite the use
of annotations from __future__ - so we either need to quote them,
or use # pylint: disable=no-member
2021-01-10 09:11:48 +10:00
Henrik Giesel
59d0e8f036 Add shortcut to new preview button 2021-01-10 00:00:19 +01:00
Damien Elmes
4ba4e8ca78
Merge pull request #913 from RumovZ/fix-write-template
Fix ordinal case in write_template
2021-01-10 08:58:00 +10:00
Damien Elmes
3f9604457d
Merge pull request #911 from RumovZ/backend-filters
Backend filters
2021-01-10 08:56:57 +10:00
Henrik Giesel
fe118197a3 Improve styling of new preview button on light and nightMode 2021-01-09 23:55:39 +01:00
Damien Elmes
4d471612ec fix protobuf formatting adding carriage returns on Windows 2021-01-10 08:48:20 +10:00
Henrik Giesel
28278fcc40 Remove preview button from browser.py top bar 2021-01-09 23:25:56 +01:00
Henrik Giesel
ece753991e Make button show its toggle state 2021-01-09 23:16:01 +01:00
Henrik Giesel
f5d429a5ca Put Preview button into editor inside browser 2021-01-09 22:34:53 +01:00
RumovZ
0629f80aeb Format backend.proto 2021-01-09 20:09:47 +01:00
RumovZ
f83553c82a Merge branch 'master' into backend-filters
Adapt new formatting.
2021-01-09 19:03:43 +01:00
RumovZ
ca62f3ef80 Fix ordinal case in write_template
Internal card ordinals start at 0, so add 1 again when writing a
template search string from a parsed ordinal.
2021-01-09 17:30:12 +01:00
RumovZ
b763fc5b2a Use explicit wrapper functions to get filters 2021-01-09 16:48:47 +01:00
abdo
0b5bb711a1 Remove unused backend methods & formatting 2021-01-09 17:48:34 +03:00
abdo
5919d9273f Fix tag collapse state not getting updated 2021-01-09 17:46:52 +03:00
abdo
97b4c2124c sql formatting 2021-01-09 17:38:16 +03:00
abdo
f7f509c70d Move tag collapse method to the backend 2021-01-09 17:10:16 +03:00
abdo
1be789f25f Move sql code for upgrading to schema 17 to a separate file 2021-01-09 17:10:16 +03:00
abdo
c6e3d55400 fill_missing_tags's input should be sorted
I assumed that fill_missing_tags will work correctly with un unsorted
tag list previously so I replaced the all_tags_sorted call, but take the following the list for example:

["foo::bar", "foo"]

This will cause "foo" to be counted like a missing tag, since it's
encountered the first time when looking at "foo::bar"", and its config
and other associated data will be lost.
2021-01-09 17:10:16 +03:00
abdo
b33267f754 Do not check for missing tag parents at registration time 2021-01-09 17:10:16 +03:00
abdo
b276ce3dd5 Hierarchical tags 2021-01-09 17:10:13 +03:00
RumovZ
b99d9cda74 Prettify frontend filter code 2021-01-09 12:34:46 +01:00
RumovZ
fda2bfdb4e Use backend filters instead of literal searches 2021-01-09 10:51:15 +01:00
RumovZ
9ef691c06f Provide filter searches through backend 2021-01-09 10:50:08 +01:00
Damien Elmes
8c6d0e6229 move exports_files call into ts/BUILD.bazel
Suspect it has caused a regression when building from an external
repo.
2021-01-09 18:03:26 +10:00
Damien Elmes
c6e23dbdc5 document extra formatter 2021-01-09 17:42:26 +10:00
Damien Elmes
fc948d3e83 add clang-format for backend.proto formatting 2021-01-09 17:08:50 +10:00
Damien Elmes
e0c3949ef9 format backend.proto with standard Google style 2021-01-09 15:50:24 +10:00
Damien Elmes
c3b1266f47 fix some comments in wrong position after format 2021-01-09 14:26:51 +10:00
Damien Elmes
3dad3c90d0 add .sql file formatter
Uses the logic from the sqltools VSCode add-on, with a workaround
for the use of 'type' in some table columns.

By detecting the presence of 'BUILD_WORKSPACE_DIRECTORY' we can tell
if the rule is running in test mode or was run directly, avoiding the
need for separate check and fix rules. It might be nice to extend this
to other formatting rules in the future as well.
2021-01-09 14:22:49 +10:00
Damien Elmes
56e4e2d518 reformat .sql files 2021-01-09 14:08:55 +10:00
Damien Elmes
f452d56e02
Merge pull request #910 from abdnh/exclude-gen
Exclude aqt/hooks_gen.py from formatting
2021-01-09 10:27:10 +10:00
abdo
7b58120eb2 Exclude aqt/hooks_gen.py from formatting 2021-01-09 03:01:48 +03:00
Damien Elmes
1731f71998
Merge pull request #907 from hgiesel/easegraph
Include many more cards in the ease graph
2021-01-09 09:22:42 +10:00
Damien Elmes
b3c690aa06
Merge pull request #908 from hgiesel/easereset
Reset ease to 0 for after rescheduling cards as new
2021-01-09 09:21:22 +10:00