Commit graph

5681 commits

Author SHA1 Message Date
Damien Elmes
aff95c7709 add cpu qualifier to Linux protobuf
Just to make the following change a little more clear.
2020-12-29 18:38:50 +10:00
Damien Elmes
b58c5ea603 typo 2020-12-29 15:26:06 +10:00
Damien Elmes
f42e62aca6 controller should be marked nullable
While 'SvelteComponent | null' seems to make it into the .tsx file
created by svelte2tsx, the subsequent tsc call seems to discard the
'| null' part when creating the .d.ts file. Hack around it with a cast
for now; this may be fixed if we move to ts_project in the future.
2020-12-29 15:21:46 +10:00
Damien Elmes
8388b1d838 use local strategy for Svelte on CI
Allows some type errors to surface that were only being picked up
on Windows.

The root cause seems to be TypeScript picking up other .d.ts/.tsx
files in the same folder, which it can only do on Windows due to the
lack of sandboxing. On other platforms the other files can't be found,
and tsc changes the types into 'any'.

I experimented with modifying rules_svelte to build all .tsx files up
front and convert them to .d.ts in bulk, but ran into further issues
with conflicting types, as the typings in svelte2tsx seem to conflict
with Svelte's built-in types, and passing the dependencies in explicitly
causes them to be checked even though --skipLibCheck is passed in to
TypeScript.

Forcing sandboxing off is an ugly hack, and our best approach moving
forward may be to switch to ts_project for the Svelte generation -
it does appear that rules_nodejs favours it over ts_library anyway.
2020-12-29 14:50:33 +10:00
Damien Elmes
0d3b80abd7 Merge pull request #866 from guillem-palau-salva/master
Update consts.py
2020-12-29 10:15:42 +10:00
Damien Elmes
34884a2e8f Merge pull request #864 from hgiesel/graphs
Decouple GraphsPage from individual graphs and RangeBox
2020-12-29 10:14:04 +10:00
Damien Elmes
ff0382ce11 Merge pull request #872 from RumovZ/fix-deck-check
Fix deck check and thus blue sync arrow bug
2020-12-29 10:11:59 +10:00
Damien Elmes
b68c513cac Merge pull request #856 from hgiesel/jquery
Update jQuery from 1.12.4 to 3.5.1, include in Bazel build process
2020-12-29 10:00:33 +10:00
Damien Elmes
41222e0ba6 fix legacy js remapping
Thanks to Henrik for catching it.
2020-12-29 09:57:34 +10:00
RumovZ
b4fa13aa0e Fix deck check and thus blue snyc arrow bug
Cast col.decks.selected() to int so the return type fits the annotation.
Thus, fix the comparison in col.decks.select() which was leading to
a superfluous db modification and in turn to a false indication of a
necessary sync right after another one in certain cases.
2020-12-29 00:29:36 +01:00
Guillem Palau-Salvà
6422dc1af4 Update CONTRIBUTORS
adding myseld to contributors
2020-12-28 21:51:04 +01:00
Henrik Giesel
c5fd2d2a55 Fix formatting 2020-12-28 14:56:41 +01:00
Henrik Giesel
d9256c2c2e Add mapping in redirectWebExport for new jquery file 2020-12-28 14:52:44 +01:00
Henrik Giesel
b9dfab79dd Avoid building jquery to its own directory 2020-12-28 14:18:07 +01:00
Henrik Giesel
0b5ee75861 Rename references from vendor/jquery.js to vendor/jquery/jquery.min.js 2020-12-28 13:16:12 +01:00
Henrik Giesel
b6fba45ad5 Remove jquery from Anki repo and replace with Bazel BUILD 2020-12-28 13:16:12 +01:00
Damien Elmes
7e3e9b4682 add --force-delete to ./run
Excluded files in folders were preventing stale folders from being
removed when deps were updated, leading to warnings on run.
2020-12-28 17:23:52 +10:00
Damien Elmes
6eced8c01d Merge pull request #871 from Arthur-Milchior/test_symbol_remain_in_name
NF: test # / and ^ can remains at end of string
2020-12-28 17:08:24 +10:00
Arthur Milchior
98276f1e71 NF: test # / and ^ can remains at end of string 2020-12-28 07:58:15 +01:00
Damien Elmes
05a0c3c40e Merge pull request #869 from Arthur-Milchior/trip_new_field_name
New field name checks are more specific
2020-12-28 16:53:32 +10:00
Damien Elmes
184d5ab368 Merge pull request #858 from hgiesel/editorwhitespace
Remove placeholder `<br>`s in empty fields in editor
2020-12-28 16:50:23 +10:00
Arthur Milchior
ebd4938507 Reject field name with : { or }
More than {{ is acceptable to start a tag, which means that `{{{Foo}}` won't be interpreted as "the content of `Foo`"
and should be rejected. For the sake of clarity and parsing, I suspect that those symbol should be rejected elsewhere
too.

Similary `{{Foo}}}` won't be interpreted as "Show the content of field `Foo}`" even if this field exists, so it's better
to reject `}`. It's clearly necessary to reject "}}" inside the field name, rejecting "}" seems easier to explain and
avoid future unexpected problem if the templates change.

The ":" are used to separate filters, and rejecting it in field name would ensure that there is no ambiguity.
2020-12-28 07:33:26 +01:00
Arthur Milchior
b2e0d0b968 Rejects field names starting with #, ^ and / 2020-12-28 06:23:49 +01:00
Arthur Milchior
ae489b1278 New field are stripped
Otherwise, you can rename "Back" to " Front" and then get unexpected result
2020-12-28 06:18:42 +01:00
Damien Elmes
e2be0c2cbd simplify NoteField init in test; add other bad chars 2020-12-28 13:19:37 +10:00
Damien Elmes
e14198fad7 fix comment and add basic unit test 2020-12-28 13:14:49 +10:00
Damien Elmes
ed32a66a6b Merge pull request #870 from Arthur-Milchior/trim_start_field_name
Trim the start of field name if it is #, /, ^ or a whitespace
2020-12-28 13:06:57 +10:00
Arthur Milchior
98d0136921 Trim the start of field name if it is #, /, ^ or a whitespace
I actually need to trim whitespace again to deal with a field name of the form "# foo"
2020-12-28 03:32:05 +01:00
Damien Elmes
f33a001859 Merge pull request #868 from Arthur-Milchior/contributing_sh
Contributing shell code in backtick
2020-12-28 10:46:34 +10:00
Damien Elmes
7bda223999 Merge pull request #865 from hgiesel/configaction
Open AddonsDialog via dialog manager
2020-12-28 10:36:02 +10:00
Damien Elmes
e80674b793 Merge pull request #863 from hgiesel/statsoverscroll
Prevent stats screen from overscrolling
2020-12-28 10:34:06 +10:00
Damien Elmes
680ded95f6 Merge pull request #862 from hgiesel/reviewerbottombuttons
Hide stats buttons in reviewer bottom bar, if window width is too small
2020-12-28 10:33:14 +10:00
Damien Elmes
fa5d0bcaef update translations 2020-12-28 10:25:00 +10:00
Damien Elmes
2074bb03b6 update prost to new 0.7 release+auto stage changes
Allows us to drop slow git repo.
2020-12-28 10:12:35 +10:00
Damien Elmes
992a20c05c remove reference to 'make pull-i18n', it's no longer required 2020-12-27 18:26:14 +10:00
Arthur Milchior
154a99a15b Contributing shell code in backtick
Currently, on ffd28e00e0/docs/contributing.md the
whole code is on a single line. Copying does not work, as the test is commented
2020-12-27 08:57:40 +01:00
Henrik Giesel
71149656fc Fix typo 2020-12-27 02:04:45 +01:00
Guillem Palau-Salvà
2b5a6be3fa Update consts.py
I notices that type 4 is added in the revlog when rescheduling. Reviews are logged as 0 time and type 4.
2020-12-27 01:02:32 +01:00
Henrik Giesel
20c2d55059 Fix formatting 2020-12-26 18:24:24 +01:00
Henrik Giesel
b7556281d0 Open AddonsDialog via dialog manager 2020-12-26 18:07:37 +01:00
Henrik Giesel
3db9dec76b Hide "Edit" and "More" buttons in reviewer bottom bar, if window width is too small 2020-12-26 15:50:32 +01:00
Henrik Giesel
0afed11159 Prevent stats screen from overscrolling 2020-12-26 15:29:45 +01:00
Henrik Giesel
d8f57cecd0 Add svelte lib as bazel dependency 2020-12-26 15:17:30 +01:00
Henrik Giesel
f9229be1ff Pass in RangeBox as an argument, decoupling it from GraphsPage 2020-12-26 14:40:55 +01:00
Damien Elmes
ffd28e00e0 bump version 2020-12-26 10:36:42 +10:00
Henrik Giesel
4309b6f7a5 Fix displaying issue with active spinner 2020-12-26 00:16:54 +01:00
Henrik Giesel
1b4fd39d70 Make Year/All display correctly 2020-12-26 00:08:24 +01:00
Henrik Giesel
4f28750dff Move spinner back to RangeBox 2020-12-25 22:59:11 +01:00
Henrik Giesel
13acbe131c Put RangeBox into its own component 2020-12-25 22:29:42 +01:00
Henrik Giesel
3373cf7ad0 Make spinner's position sticky in relation to graphsContainer 2020-12-25 21:49:56 +01:00