Commit graph

5705 commits

Author SHA1 Message Date
Arthur Milchior
5c7dbdf72b NF: Add a hook to change the default search from reviewer
The goal here is to simplify my add-on which show a single card or the whole deck when the browser open
2021-01-02 19:49:11 +01:00
Damien Elmes
cb646cb71e remove old symlink before installing a new version
https://forums.ankiweb.net/t/ubuntu-command-anki-not-found/6083/4
2020-12-30 20:56:28 +10:00
Damien Elmes
8b0588916e add aarch64-linux to BUILD.request.bazel 2020-12-30 20:39:27 +10:00
Damien Elmes
c3ff88ab88 fix media attachment
insertHtmlRemovingInitialBR() was removed in a previous PR
2020-12-30 19:30:23 +10:00
Damien Elmes
9b92d3ce1f Revert "Merge pull request #873 from hgiesel/otherjsdeps"
This reverts commit ad7491a9ae, reversing
changes made to 5a79515f2a.

- Standard graphs render incorrectly on latest version - the wrong number
of days are shown, and the grid lines look wrong. Any version after 0.8.3
seems to suffer from this problem.
- Pie graphs and stack graphs don't render - they are provided in separate
files, and plot.js in previous Anki versions has them included in the one
file. To maintain compatibility with add-ons, we'd need to create a single
file as before, instead of importing multiple files.

If the above issues are fixed I'd be happy to merge this in again, but
as the old graphs are on the way out, it's probably not worth the effort.
2020-12-30 14:13:52 +10:00
Damien Elmes
03dc6ac8fd fix typo in docs
Thanks to Gustavo for the report

Closes #876
2020-12-30 13:54:27 +10:00
Damien Elmes
c11e9c45d7 Merge pull request #875 from stayingpeachy/help-link
Update help link
2020-12-30 13:52:50 +10:00
Damien Elmes
fcffad3535 Merge pull request #874 from hgiesel/jqueryreview
Update _updateQa
2020-12-30 13:51:54 +10:00
Damien Elmes
ad7491a9ae Merge pull request #873 from hgiesel/otherjsdeps
Update plotting library to 4.2.1 and include in Bazel build
2020-12-30 13:49:01 +10:00
Damien Elmes
5a79515f2a support overriding pyqt via env var
Documentation to come later.
2020-12-30 13:36:57 +10:00
Damien Elmes
26c13f6dba add aarch64 Linux to cargo; update deps 2020-12-30 13:33:16 +10:00
Meredith
32f3e45205 add self as contributor 2020-12-29 11:11:05 -05:00
Meredith
adc54c71e3 update help link
old help link was outdated
2020-12-29 11:09:28 -05:00
Henrik Giesel
633d20f9fd Satisfy prettier 2020-12-29 14:45:20 +01:00
Henrik Giesel
05425c666f Hook functions may also return void 2020-12-29 14:01:09 +01:00
Henrik Giesel
9b844a469a Replace ts-ignore with declare var 2020-12-29 13:43:47 +01:00
Henrik Giesel
a1d389a5b8 Fix typing of reviewer hooks 2020-12-29 13:42:30 +01:00
Henrik Giesel
244219ab27 Use async/await syntax in _updateQa 2020-12-29 13:34:39 +01:00
Henrik Giesel
7ecdb2859e Remove plot.js 2020-12-29 12:16:50 +01:00
Henrik Giesel
644ae453d7 Redirect references to old plotting library version 2020-12-29 12:15:46 +01:00
Henrik Giesel
a9f533a852 Use new version of plotting library in stats.py 2020-12-29 12:13:25 +01:00
Henrik Giesel
fe7d1aef2b Copy flot file to vendor directory 2020-12-29 12:11:28 +01:00
Henrik Giesel
3a64d47786 Install flot 4.2.1
Old version was 0.8.3
2020-12-29 12:02:41 +01:00
Damien Elmes
2e4434df4f add linux_arm64 platform 2020-12-29 18:40:39 +10:00
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