RumovZ
c5b8813b4e
Show tooltip on browser cells
...
Oftentimes, a cell's text is too long to be fully displayed inside the
table, so show it as a tooltip.
2021-03-22 09:31:07 +01:00
Damien Elmes
42d007d94d
use perform_op() for deck drag&drop
2021-03-22 18:23:56 +10:00
RumovZ
38f03650c9
Fix date_string using FixedOffset instead of Local
2021-03-22 08:50:54 +01:00
Henrik Giesel
12123fc68b
Remove assignment to preferencesPromise: getPreferences will only be called once
2021-03-22 04:03:52 +01:00
Damien Elmes
13255ed096
remove the default question fade
...
Fading was primarily motivated by wanting to prevent ugly redraw,
but we wait for both MathJax and images now.
2021-03-22 12:11:00 +10:00
Henrik Giesel
0368bac9be
Move async and asyncReactive to sveltelib
...
- sveltelib is a lib for component-agnostic svelte utils
2021-03-22 03:06:53 +01:00
Damien Elmes
815fd2df0b
delay scrolling to answer until images load
2021-03-22 12:05:18 +10:00
Henrik Giesel
c44340e761
Avoid duplicate initial fetching with asyncReactive
2021-03-22 02:58:19 +01:00
Henrik Giesel
8232e2f5ed
Make sure RangeBox does not trigger update on stores on creation
2021-03-22 02:50:16 +01:00
Henrik Giesel
8cb7d4a8ad
Create search and days writable in GraphsPage to allow browserSearch to work
2021-03-22 02:44:08 +01:00
Damien Elmes
095d655a50
fix .csv import not using faster QPlainTextEdit
2021-03-22 11:26:49 +10:00
Damien Elmes
2c76e70b32
fix text not appearing after .apkg import
2021-03-22 11:24:53 +10:00
Damien Elmes
b9421ac38b
fix note importing detecting changes due to unicode differences
...
https://forums.ankiweb.net/t/python-checksum-rust-checksum/8195/16
2021-03-22 10:56:24 +10:00
Henrik Giesel
c7a6665307
Fix syntax error introduced by rebase
2021-03-22 01:44:07 +01:00
Henrik Giesel
1e5bb2f226
Create BrowserSearch component, because we cannot read from stores within slotted content
2021-03-22 01:42:23 +01:00
Henrik Giesel
abdf8a464f
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
6d2d40472d
Use preferencesPromise, as refreshing is handled over stores
2021-03-22 01:42:23 +01:00
Henrik Giesel
4468938dfd
Use $-assignments instead of store.set
2021-03-22 01:42:23 +01:00
Henrik Giesel
fbf2c6f6fc
Rename search and days to initialSearch and intitialDays in GraphsPage
2021-03-22 01:42:23 +01:00
Henrik Giesel
4ef0b3c977
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
26d4854502
Compiles with WithGraphData
2021-03-22 01:42:23 +01:00
Henrik Giesel
c6ba8f779e
Move Graph-specific html from GraphsPage to Graph.svelte
2021-03-22 01:42:21 +01:00
Henrik Giesel
cfaf0e587b
Add WithGraphData
2021-03-22 01:40:51 +01:00
Henrik Giesel
aebb665164
Rename asyncRefresh to asyncReactive
2021-03-22 01:40:51 +01:00
Henrik Giesel
92658495ad
Improve implementation of asyncRefresh
2021-03-22 01:40:51 +01:00
Henrik Giesel
b0116aa3a9
Add (probably non-working) asyncRefresh
2021-03-22 01:40:51 +01:00
Henrik Giesel
159f6dc4e1
Add Svelte async hook
2021-03-22 01:40:51 +01:00
Damien Elmes
e437bec8bc
Merge pull request #1083 from hgiesel/pagesrestructure2
...
Move ticks.scss directly into Graph.svelte
2021-03-22 10:13:42 +10:00
Damien Elmes
3bb8848104
fix profile dumping on platforms other than Macs
...
https://github.com/ankitects/anki/pull/1082#issuecomment-803660818
2021-03-22 09:44:06 +10:00
RumovZ
0ca8434744
Fix card_due_str()
2021-03-21 21:18:56 +01:00
RumovZ
d07c7e1d94
Strip question from answer string
2021-03-21 21:17:38 +01:00
RumovZ
a1ea88bc67
Readd browser.model.getCard()
...
Actually, the new model has no truck with card objects, but since it may
hold an invalid id, it takes responsibility for catching the exception.
2021-03-21 18:44:31 +01:00
Henrik Giesel
5b1eb98b86
Add comment where to find global styles
2021-03-21 16:04:38 +01:00
Henrik Giesel
794642b2f2
Move ticks.scss directly into Graph.svelte
2021-03-21 15:59:11 +01:00
Damien Elmes
7c76693618
merge in Henrik's TS/Svelte refactor with some changes
...
- The previous commits moved the majority of the remaining global css
into components; move the remaining @emotion/css references into
ticks.scss and the styling of the Graph.svelte. This is not as elegant
as the emotion solution, but builds a whole lot faster, and most of
our styling can be scoped to a component anyway.
- Leave the .html files in ts/ for now. AnkiMobile uses them, and
AnkiDroid likely will in the future too. In the long run we'll likely
move to loading the JS into an existing page instead of loading a
separate page, but at that point we can just exclude the .html file from
copy_files_into_group() without affecting other clients.
Closes #1074
2021-03-21 23:01:18 +10:00
Damien Elmes
13afaaa770
move some cumulative-overlay-specific styling out of shared css
2021-03-21 20:18:05 +10:00
Damien Elmes
ba4e5d834c
add HoverColumns.svelte for hoverzone styling
2021-03-21 19:58:39 +10:00
Damien Elmes
cdf326d45d
add CumulativeOverlay.svelte for area styling
2021-03-21 19:50:35 +10:00
Damien Elmes
d4f0661e16
add Tooltip.svelte so we can encapsulating styling
2021-03-21 19:35:38 +10:00
Damien Elmes
c02823b488
bundle all Svelte css into separate file
...
- svelte compilation outputs a separate .css file for each component
- compilation also adds an "import foo.css" to the top of each generated
.mjs file
- when the .mjs files are bundled into app.js, esbuild creates an app.css
as well
- graphs.scss was renamed to graphs_shared.scss and imported in the
top level GraphsPage. Henrik's style refactoring would be a better path
forward, but I needed to make this change for now, as the filenames were
conflicting.
2021-03-21 16:06:36 +10:00
Damien Elmes
2ffb210ca4
add support for declaring css output in esbuild call
2021-03-21 16:06:36 +10:00
Damien Elmes
d5c088175f
add upstream esbuild impl so we can add css output support
...
Taken from 4a26898023/packages/esbuild/esbuild.bzl
2021-03-21 16:06:36 +10:00
Damien Elmes
460a071fe4
switch from rollup to esbuild
...
brings the 2+ second bundle on a module like the graphs down to 90ms
2021-03-21 16:06:36 +10:00
Damien Elmes
e1233ac156
ESM import issue on Windows came back again
...
Not sure if I just missed this in the previous change, or whether
the patch_resolver change broke things again.
Previous issue:
7ae6837cfa
2021-03-21 16:06:07 +10:00
Damien Elmes
27feb0688a
output embedded Svelte css into separate .css file for bundling
2021-03-21 16:06:01 +10:00
Damien Elmes
b6f95c0e5e
fixes for Svelte compilation
...
- enable resolver patch on worker binary to ensure js imports work
on subsequent worker requests
- cache ts library content, and use unified interface for cache
- prepare for separate css outputs
2021-03-21 16:05:46 +10:00
RumovZ
88f39fe081
Check original_deck_id rather than original_deck()
...
in card_due_str() as we don't necessarily have to load that deck.
2021-03-20 18:12:00 +01:00
RumovZ
72138a9528
Refactor browser_rows.rs
...
* Make RowContext taking functions methods
* Make RowContext constructor a method
* Rename 'with_fields' to 'card_render'
2021-03-20 18:02:41 +01:00
RumovZ
14bd8181b3
Rename browser_rows/RowColor to Color
2021-03-20 17:31:16 +01:00
RumovZ
aed19da451
Rename render_card_inner() to render_card()
2021-03-20 17:26:30 +01:00