Glutanimate
713c8f619d
Add three filtered deck dialog hooks
...
Similar to deckconf hooks
2021-03-25 02:28:01 +01:00
Damien Elmes
4b5944f181
move markdown dep into pylib
2021-03-24 22:19:14 +10:00
Damien Elmes
d382b33585
rework filtered deck screen & search errors
...
- Filtered deck creation now happens as an atomic operation, and is
undoable.
- The logic for initial search text, normalizing searches and so on
has been pushed into the backend.
- Use protobuf to pass the filtered deck to the updated dialog, so
we don't need to deal with untyped JSON.
- Change the "revise your search?" prompt to be a simple info box -
user has access to cancel and build buttons, and doesn't need a separate
prompt. Tweak the wording so the 'show excluded' button should be more
obvious.
- Filtered decks have a time appended to them instead of a number,
primarily because it's easier to implement. No objections going back to
the old behaviour if someone wants to contribute a clean patch.
The standard de-duplication will happen if two decks are created in the
same minute with the same name.
- Tweak the default sort order, and start with two searches. The UI
will still hide the second search by default, but by starting with two,
the frontend doesn't need logic for creating the starting text.
- Search errors now have their own error type, instead of using
InvalidInput, as that was intended mainly for bad API calls. The markdown
conversion is done when the error is converted from the backend, allowing
errors to printed as a string without any special handling by the calling
code.
TODO: when building a new filtered deck, update_active() is clobbering
the undo log when the overview is refreshed
2021-03-24 22:04:35 +10:00
Damien Elmes
181cda1979
rename&simplify the deck/config type aliases
...
- QueueConfig is only used by the scheduler
- DeckConfig was being used in places that Config should have been used
- Add "Dict" to the name so that the bare name is free for use with a
stronger type.
2021-03-24 16:29:02 +10:00
Damien Elmes
5a1b00b6e6
dyndeckconf -> filtered_deck
2021-03-24 13:17:12 +10:00
Damien Elmes
12597e1094
support undo of filtered deck build/empty
2021-03-24 12:56:06 +10:00
Damien Elmes
2a168adb66
move filter code into scheduler/
2021-03-23 23:55:28 +10:00
Damien Elmes
b5c58ff8e6
nest search term message/order enum
2021-03-23 23:28:50 +10:00
Damien Elmes
6db47c2ea5
Merge pull request #1088 from RumovZ/overwrite-saved-search
...
Add context action 'Update with Current Search'
2021-03-23 20:56:18 +10:00
RumovZ
76b4b7f6b1
Add context action 'Update with Current Search'
2021-03-23 11:20:46 +01:00
Damien Elmes
5d67265658
tweak AbortAddonImport docstring
2021-03-23 19:31:24 +10:00
Damien Elmes
2d48479f4f
Merge pull request #1086 from glutanimate/abort-addon-import-exception
...
Add an exception that allows add-ons to abort early
2021-03-23 19:28:13 +10:00
Damien Elmes
1bf19d581f
Merge pull request #1084 from hgiesel/svelte-hooks
...
Svelte "hooks" - Streamline method of getting async data
2021-03-23 19:22:46 +10:00
Damien Elmes
3199dcb54d
add hook to modify browser row content
2021-03-23 19:13:52 +10:00
Damien Elmes
9c456dd7b0
only declare rows deleted if they're the result of a NotFound error
...
If it's some other error like the DB suddenly becoming accessible,
we don't want to scare the user into thinking their data was deleted,
and we want to know what the error was without popping up tens of
message boxes for each row.
2021-03-23 19:04:15 +10:00
Damien Elmes
ff0d346927
move browser_row method into search service
...
For want of a better place to put it. Also split the node conversion
into a separate file.
2021-03-23 18:55:05 +10:00
Damien Elmes
95dea7f20a
move activeCols into config/
2021-03-23 18:40:50 +10:00
Damien Elmes
5fd79d9246
Merge pull request #1082 from RumovZ/backend-rows
...
Backend rows
2021-03-23 18:31:42 +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
Glutanimate
fa6a0a1283
Add an exception that allows add-ons to abort early
2021-03-22 14:53:04 +01:00
Damien Elmes
84b0c8ba88
switch DeckID to a NewType
...
Not sure at this point whether this will buy us much in the Python
codebase over a simple int alias, but let's give it a go.
2021-03-22 23:43:54 +10:00
Damien Elmes
01161c8ed2
use perform_op() for deck creation
2021-03-22 23:17:07 +10:00
RumovZ
03b9667789
Use raw sort field text in note_field_str() ...
...
... instead of the preprocessed note.sort_field. That means we always
have to load the note with fields.
2021-03-22 12:12:52 +01:00
RumovZ
9151bfb53e
Return input if decode_entities() encounters error
2021-03-22 12:08:22 +01:00
Damien Elmes
0123a382ec
deck rename with perform_op()
2021-03-22 20:38:51 +10:00
RumovZ
a6fb72780a
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
6a11c0398c
use perform_op() for deck drag&drop
2021-03-22 18:23:56 +10:00
RumovZ
de73232f0d
Fix date_string using FixedOffset instead of Local
2021-03-22 08:50:54 +01:00
Henrik Giesel
9bbdc616c4
Remove assignment to preferencesPromise: getPreferences will only be called once
2021-03-22 04:03:52 +01:00
Damien Elmes
b1f4ea562a
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
10b8a1c3cb
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
c3145977f0
delay scrolling to answer until images load
2021-03-22 12:05:18 +10: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
Damien Elmes
87801668e9
fix .csv import not using faster QPlainTextEdit
2021-03-22 11:26:49 +10:00
Damien Elmes
ba1742aee2
fix text not appearing after .apkg import
2021-03-22 11:24:53 +10:00
Damien Elmes
7273996041
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
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