Henrik Giesel
519aea2ea8
Move html-filter into its own directory
2021-03-28 19:41:20 +10:00
Henrik Giesel
730dfdd527
Insert break statements into switch
2021-03-28 19:41:20 +10:00
Henrik Giesel
39aa549ac9
Create htmlFilter{Node,Styling} for better separation of concerns
2021-03-28 19:41:20 +10:00
Henrik Giesel
d3d3720b39
Put filterElement logic completely into its own file
2021-03-28 19:41:20 +10:00
Henrik Giesel
1d4d7fabec
Move most of tags allowed to its own file
2021-03-28 19:41:20 +10:00
Henrik Giesel
592d73c344
Refactor htmlFilter to use function declarations
2021-03-28 19:41:20 +10:00
Damien Elmes
76127126a6
use relative link to sass file
...
links relative to workspace root break when invoked from an external
repo
2021-03-28 12:37:21 +10:00
Damien Elmes
f3a3bb5467
add links to pending PRs
2021-03-28 12:32:40 +10:00
Damien Elmes
559d1a4793
fix(esbuild): files not being found when building external repo
...
An esbuild rule that ran fine in a local repo (eg bazel build //:my_esbuild_rule)
fails when built externally (eg bazel build @other_workspace//:my_esbuild_rule).
By prepending the workspace root to the bin path, the resulting base
URL works correctly in both local and remote repo invocations, allowing
esbuild output to be consumed by a different repo.
This change fixes remote repos in Bazel 4.0.0. 3.7.0 seems to require a
workspace_root.replace("external/", "") call first in order
to get the correct location. So while this patch should not break anything
that was not already broken, it only fixes/adds support for remote repos
in 4.0+.
2021-03-28 11:30:15 +10:00
Damien Elmes
08fd7a4747
add esbuild/helpers.bzl in from upstream
2021-03-28 11:12:23 +10:00
Damien Elmes
b23642d568
update $(location ...) in esbuild inject lines
2021-03-28 09:35:46 +10:00
Damien Elmes
944528d462
support expanding locations in esbuild arguments
2021-03-28 09:35:27 +10:00
Damien Elmes
fd324d4711
update TS deps
2021-03-27 15:02:02 +10:00
Damien Elmes
d2eb5c32f4
remove obsolete comment
2021-03-26 21:47:23 +10:00
Damien Elmes
b57e9be46f
allow js to request specific i18n modules
...
Brings the payload on the congrats page with a non-English language
down from about 150k to 15k
2021-03-26 21:43:36 +10:00
Damien Elmes
8920a6f9ea
fix handling of variables that don't match ts naming style
2021-03-26 21:34:24 +10:00
Damien Elmes
c039845c16
use singleton + free functions for i18n in ts
...
This allows for tree shaking, and reduces the congrats page from 150k
with the old enum solution to about 80k.
2021-03-26 20:38:44 +10:00
Damien Elmes
0de7ab87a5
drop legacy enum from ts/
2021-03-26 19:26:35 +10:00
Damien Elmes
2e704660d6
update remaining TR references in ts/
2021-03-26 19:24:48 +10:00
Damien Elmes
1ca25c563f
update most no-arg TR references in *.svelte
2021-03-26 19:13:30 +10:00
Damien Elmes
cd4572c3dd
update TR references with args in *.svelte
2021-03-26 19:13:30 +10:00
Damien Elmes
df93ed0b15
update TR references with args in *.ts; fix average answer time
2021-03-26 19:10:39 +10:00
Damien Elmes
b435658acb
convert no-arg TR references to method invocations in *.ts
2021-03-26 19:10:27 +10:00
Damien Elmes
264b9204c0
generate ts methods for translations
2021-03-26 18:11:58 +10:00
Damien Elmes
9aece2a7b8
rework translation handling
...
Instead of generating a fluent.proto file with a giant enum, create
a .json file representing the translations that downstream consumers
can use for code generation.
This enables the generation of a separate method for each translation,
with a docstring that shows the actual text, and any required arguments
listed in the function signature.
The codebase is still using the old enum for now; updating it will need
to come in future commits, and the old enum will need to be kept
around, as add-ons are referencing it.
Other changes:
- move translation code into a separate crate
- store the translations on a per-file/module basis, which will allow
us to avoid sending 1000+ strings on each JS page load in the future
- drop the undocumented support for external .ftl files, that we weren't
using
- duplicate strings in translation files are now checked for at build
time
- fix i18n test failing when run outside Bazel
- drop slog dependency in i18n module
2021-03-26 09:41:32 +10:00
Henrik Giesel
7655f14859
Satisfy svelte_check
2021-03-22 15:41:43 +01:00
Henrik Giesel
a418d36c7f
Add type signatures to asyncReactive
2021-03-22 15:30:35 +01:00
Henrik Giesel
6ec721d550
Satisfy formatter
2021-03-22 15:25:49 +01:00
Henrik Giesel
4cd60da7b8
Fix asyncReactive detection of loading
...
- Removed `success` store as it wouldn't work
- We should check for a value in error instead
2021-03-22 15:23:48 +01:00
Henrik Giesel
e23b1b77b7
Partially revert "Make sure RangeBox does not trigger update on stores on creation"
...
This reverts commit 15b19e44b9
.
2021-03-22 15:11:36 +01:00
Henrik Giesel
9bbdc616c4
Remove assignment to preferencesPromise: getPreferences will only be called once
2021-03-22 04:03:52 +01:00
Henrik Giesel
10b8a1c3cb
Move async and asyncReactive to sveltelib
...
- sveltelib is a lib for component-agnostic svelte utils
2021-03-22 03:06:53 +01:00
Henrik Giesel
3c5233297a
Avoid duplicate initial fetching with asyncReactive
2021-03-22 02:58:19 +01:00
Henrik Giesel
15b19e44b9
Make sure RangeBox does not trigger update on stores on creation
2021-03-22 02:50:16 +01:00
Henrik Giesel
0bbe38ebde
Create search and days writable in GraphsPage to allow browserSearch to work
2021-03-22 02:44:08 +01:00
Henrik Giesel
9a864120b2
Fix syntax error introduced by rebase
2021-03-22 01:44:07 +01:00
Henrik Giesel
7dc74004ae
Create BrowserSearch component, because we cannot read from stores within slotted content
2021-03-22 01:42:23 +01:00
Henrik Giesel
6d546b0bca
Remove pending, and resort to checking for value
...
- once value is set, it won't be unset
2021-03-22 01:42:23 +01:00
Henrik Giesel
b3851172ba
Use preferencesPromise, as refreshing is handled over stores
2021-03-22 01:42:23 +01:00
Henrik Giesel
3363c574c9
Use $-assignments instead of store.set
2021-03-22 01:42:23 +01:00
Henrik Giesel
dd2e180f9b
Rename search and days to initialSearch and intitialDays in GraphsPage
2021-03-22 01:42:23 +01:00
Henrik Giesel
672eb20321
Get it to work, if you change the input
...
- there's still an issue on initial load
2021-03-22 01:42:23 +01:00
Henrik Giesel
3f37153558
Compiles with WithGraphData
2021-03-22 01:42:23 +01:00
Henrik Giesel
c107090906
Move Graph-specific html from GraphsPage to Graph.svelte
2021-03-22 01:42:21 +01:00
Henrik Giesel
36e14cd525
Add WithGraphData
2021-03-22 01:40:51 +01:00
Henrik Giesel
e11b31c29d
Rename asyncRefresh to asyncReactive
2021-03-22 01:40:51 +01:00
Henrik Giesel
75a8b7d318
Improve implementation of asyncRefresh
2021-03-22 01:40:51 +01:00
Henrik Giesel
a9c16a3cd8
Add (probably non-working) asyncRefresh
2021-03-22 01:40:51 +01:00
Henrik Giesel
f82a02bd2e
Add Svelte async hook
2021-03-22 01:40:51 +01:00
Henrik Giesel
5b9981e04a
Add comment where to find global styles
2021-03-21 16:04:38 +01:00