Commit Graph

6399 Commits

Author SHA1 Message Date
RumovZ
cd9767be80 Remove unused BackendNoteTypeID 2021-01-31 08:57:10 +01:00
RumovZ
3e69d39a25 Add missing sidebar onClicks 2021-01-31 08:56:34 +01:00
Damien Elmes
cb805cf355 Merge branch 'more-backend-search' into main 2021-01-31 14:21:51 +10:00
Damien Elmes
126b642115 disable multiple selection for now 2021-01-31 14:02:38 +10:00
Damien Elmes
18f0b78716 disable dragging of unsupported items 2021-01-31 13:46:31 +10:00
Damien Elmes
4579740df6 support dragging multiple decks at once 2021-01-31 13:46:31 +10:00
Damien Elmes
49a40e7178 add missing check for on_done==None in with_progress() 2021-01-31 13:46:31 +10:00
Damien Elmes
28ff061c19 support drag&drop of decks in sidebar 2021-01-31 13:46:31 +10:00
Damien Elmes
8410330f94 move drag/drop deck logic to backend 2021-01-31 13:46:31 +10:00
Damien Elmes
0bd94659f1
Merge pull request #963 from hgiesel/ease130
Coerce ease graph min to 130 if applicable
2021-01-31 09:22:01 +10:00
Damien Elmes
f1ffc11fb7
Merge pull request #961 from hgiesel/editorfocus
Fix focus on first field upon opening editor
2021-01-31 09:21:11 +10:00
Damien Elmes
4307badc95
Merge pull request #960 from hgiesel/easegraphfix2
Fix ease graph building wrong query omitting ease edge cases
2021-01-31 09:19:30 +10:00
Henrik Giesel
bf953d69c5 Coerce ease graph to 130 if applicable 2021-01-30 22:09:00 +01:00
RumovZ
9bfe8e3840 Remove search button and reword search bar hint 2021-01-30 19:23:40 +01:00
RumovZ
692aa16f6b Rename EaseKind to RatingKind 2021-01-30 19:03:50 +01:00
RumovZ
b0890b0e47 Manually namespace enum variants in SearchTerm
In protobuf "...enum values use C++ scoping rules, meaning that
enum values are siblings of their type, not children of it.
Therefore, [an enum variant] must be unique within [a message],
not just within [the enum.]"
So we must prefix enum variants with their enum's name, but can
also call them directly from the message namespace.
The protobuf crate is smart, though, and strips the prefixes.

(Simultaneously change some SearchTerm variant names.)
2021-01-30 17:56:29 +01:00
RumovZ
375794893f Replace leftover _named_filter with _filter_func 2021-01-30 17:39:21 +01:00
Henrik Giesel
126af1fef3 Fix focus on first field upon opening editor 2021-01-30 14:20:14 +01:00
Henrik Giesel
aeff3d7fac Fix ease graph building wrong query omitting ease edge cases
E.g. search for "prop:ease>=2.5" AND "prop:ease<2.55" instead of
                "prop:ease>=2.5" AND "prop:ease<2.54"
2021-01-30 13:19:27 +01:00
RumovZ
9e9d8b9c7a Build list in focusCid and specify exception
model.cards may be a protobuf sequence but focusCid needs list's index
method, so convert to list, but only if needed.
2021-01-30 13:15:46 +01:00
RumovZ
4745b55d27 Revert addition of pb.NoteIDs 2021-01-30 12:59:18 +01:00
RumovZ
5425b00d2b Import SearchTerm from collection in aqt 2021-01-30 12:51:24 +01:00
RumovZ
26e5235846 Fix type annotations in browser search 2021-01-30 11:24:33 +01:00
RumovZ
63e8b44629 Update docstrings for browser search 2021-01-30 11:05:48 +01:00
RumovZ
9c4cc88b47 Auto search and check input before model search
- Search for current deck automatically on browser setup.
- Hide current deck and current card searches.
- Check user search input before passing it on to the model, so invalid
  searches don't change TableView.
2021-01-30 10:53:42 +01:00
RumovZ
80a4a85510 Remove redundant docstring 2021-01-30 10:37:46 +01:00
Damien Elmes
b66bedbc9f
Merge pull request #957 from hgiesel/fieldsshadow
Implement editor as Web Component
2021-01-30 15:13:58 +10:00
Damien Elmes
9f06f37194
Merge pull request #948 from hgiesel/graphtyping
Replace individual d3 libraries with encompassing d3
2021-01-30 14:55:54 +10:00
Damien Elmes
d86ec40c4c bump version
2.1.39 will become a cherry-picked bugfix release
2021-01-30 14:38:58 +10:00
Damien Elmes
705012164b move Rating up a level
More ergonomic, and will allow reuse if we expose prop:rated in
the future.
2021-01-30 11:54:39 +10:00
Henrik Giesel
cf474f7428 Fix histogram-graph building invalid query 2021-01-30 02:46:26 +01:00
Damien Elmes
082b807c2e shorten search bar hint
There's a 'whole collection' link in the top left, so the latter part
is probably not required, and shortening this will bring it into line
with the sidebar placeholder. Open to suggestions on the wording,
just think it's probably best to keep it short.

Also remove unused string.
2021-01-30 11:37:39 +10:00
Damien Elmes
cb6b88da0f simplify nid/nids searches, and ditch helper function
- IdList could be re-used for a cids: search in the future if required.
- Embedding the message means it's easy to access from Python as
an attribute of SearchTerm.
2021-01-30 11:37:00 +10:00
Henrik Giesel
9c3473e6b4 Fix graphs tooltip position 2021-01-30 02:35:48 +01:00
Henrik Giesel
3701abe06a Install types for lodash.throttle 2021-01-30 02:12:44 +01:00
Damien Elmes
1adc9952f4 simplify Dupe message and ditch helper function
Calling code doesn't need to know about the existence of such helpers;
it can just rely on code completion to discover the required arguments.
2021-01-30 11:10:26 +10:00
Henrik Giesel
3c906977b9 Make histogram show bars again 2021-01-30 02:08:01 +01:00
Damien Elmes
5e6dd54c8e export SearchTerm from collection.py, and avoid exporting embedded items 2021-01-30 11:01:11 +10:00
Damien Elmes
73b897c754 rename FilterToSearchIn in backend to match frontend 2021-01-30 10:54:21 +10:00
Damien Elmes
52bac7a7a1 use a separate enum for the is:* searches 2021-01-30 10:49:00 +10:00
Damien Elmes
22b80c2dd5 combine forgot_in_days and studied_today into a more general 'rated' 2021-01-30 10:26:23 +10:00
Henrik Giesel
3290e5373b Remove modular d3 imports for imports from d3 bundle 2021-01-30 01:13:47 +01:00
Damien Elmes
177036d0c1
Merge pull request #958 from hgiesel/zindexedtopbar
Make sticky topbar have a positive z-index
2021-01-30 09:14:50 +10:00
Henrik Giesel
ecbfd898d3 Remove d3 libraries from BUILD.bazel 2021-01-30 00:04:44 +01:00
Henrik Giesel
6bf38236b9 Replace individual d3 libraries with encompassing d3 2021-01-30 00:00:22 +01:00
RumovZ
2ca4f31fc8 Update search history only after successful search
Ergo, don't save invalid searches, but also save searches normalised so
equivalent searches get saved only once.
2021-01-29 23:05:51 +01:00
RumovZ
671c6a7b3e Rework search initialisation
- Remove _searchPrompt.
- Add placeholder prompt.
- Move search for current card from browser to caller. (Thus, support
  current card search even with opened browser.)
2021-01-29 21:07:42 +01:00
Henrik Giesel
61346cf1f7 Rename editingContainer -> editingArea; editingArea -> editable
* Custom elements are now namespaces with `anki-`
* The element names are inspired by summernote, which have the same
  naming scheme of "editingArea > editable"
2021-01-29 20:32:21 +01:00
Henrik Giesel
2e72de4af0 Reorder methods / properties 2021-01-29 20:13:02 +01:00
Henrik Giesel
e37fd2e091 Remove unnecessarily observed attribute 2021-01-29 20:11:00 +01:00