Anki/rslib/src/backend
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
..
scheduler support undo of filtered deck build/empty 2021-03-24 12:56:06 +10:00
search move browser_row method into search service 2021-03-23 18:55:05 +10:00
sync split out sync, notetypes and config code 2021-03-11 15:47:31 +10:00
adding.rs Simplify note adding and the deck/notetype choosers 2021-03-10 11:53:27 +10:00
card.rs undoable ops now return changes directly; add new *_ops.py files 2021-03-19 19:45:21 +10:00
cardrendering.rs split out remaining rpc methods 2021-03-11 17:04:32 +10:00
collection.rs more reset refactoring 2021-03-19 19:45:21 +10:00
config.rs fix note importing detecting changes due to unicode differences 2021-03-22 10:56:24 +10:00
dbproxy.rs move collection mtime bump into backend 2021-03-19 19:45:21 +10:00
deckconfig.rs undoable ops now return changes directly; add new *_ops.py files 2021-03-19 19:45:21 +10:00
decks.rs rework filtered deck screen & search errors 2021-03-24 22:04:35 +10:00
err.rs rework filtered deck screen & search errors 2021-03-24 22:04:35 +10:00
generic.rs use perform_op() for deck creation 2021-03-22 23:17:07 +10:00
i18n.rs split out remaining rpc methods 2021-03-11 17:04:32 +10:00
media.rs undoable ops now return changes directly; add new *_ops.py files 2021-03-19 19:45:21 +10:00
mod.rs move browser_row method into search service 2021-03-23 18:55:05 +10:00
notes.rs introduce separate routine to remove tags from specific notes 2021-03-19 19:45:21 +10:00
notetypes.rs split out sync, notetypes and config code 2021-03-11 15:47:31 +10:00
ops.rs use perform_op() for deck creation 2021-03-22 23:17:07 +10:00
progress.rs move progress and search backend code into separate files 2021-03-10 11:53:27 +10:00
stats.rs split out stats, media and search 2021-03-11 16:16:40 +10:00
tags.rs speed up tag drag&drop and finish tag tidyup 2021-03-19 19:45:21 +10:00