Damien Elmes
5710e4bbd0
move drag/drop deck logic to backend
2021-01-31 13:46:31 +10:00
Damien Elmes
dce6682086
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
14e1bef120
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
ba8427f72a
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
9a8dbbc275
Coerce ease graph to 130 if applicable
2021-01-30 22:09:00 +01:00
RumovZ
d3d18d34c5
Remove search button and reword search bar hint
2021-01-30 19:23:40 +01:00
RumovZ
25393466dd
Rename EaseKind to RatingKind
2021-01-30 19:03:50 +01:00
RumovZ
2539747115
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
cdabb0ecbe
Replace leftover _named_filter with _filter_func
2021-01-30 17:39:21 +01:00
Henrik Giesel
a94bcbcc74
Fix focus on first field upon opening editor
2021-01-30 14:20:14 +01:00
Henrik Giesel
2ff9e29a15
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
353355fb15
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
0374e8f4fe
Revert addition of pb.NoteIDs
2021-01-30 12:59:18 +01:00
RumovZ
540338cea3
Import SearchTerm from collection in aqt
2021-01-30 12:51:24 +01:00
RumovZ
a20ee1c844
Fix type annotations in browser search
2021-01-30 11:24:33 +01:00
RumovZ
9a1ff40b65
Update docstrings for browser search
2021-01-30 11:05:48 +01:00
RumovZ
fd07ef212a
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
8033cc6784
Remove redundant docstring
2021-01-30 10:37:46 +01:00
Damien Elmes
747075e9a7
Merge pull request #957 from hgiesel/fieldsshadow
...
Implement editor as Web Component
2021-01-30 15:13:58 +10:00
Damien Elmes
985185a8cf
Merge pull request #948 from hgiesel/graphtyping
...
Replace individual d3 libraries with encompassing d3
2021-01-30 14:55:54 +10:00
Damien Elmes
f3582e40c8
bump version
...
2.1.39 will become a cherry-picked bugfix release
2021-01-30 14:38:58 +10:00
Damien Elmes
190922666b
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
587f6dc96f
Fix histogram-graph building invalid query
2021-01-30 02:46:26 +01:00
Damien Elmes
ee1af6136b
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
2f1bbd44d2
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
0168736ad8
Fix graphs tooltip position
2021-01-30 02:35:48 +01:00
Henrik Giesel
8151156b98
Install types for lodash.throttle
2021-01-30 02:12:44 +01:00
Damien Elmes
f6f537e89f
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
993cca1902
Make histogram show bars again
2021-01-30 02:08:01 +01:00
Damien Elmes
cf1e2a2c0d
export SearchTerm from collection.py, and avoid exporting embedded items
2021-01-30 11:01:11 +10:00
Damien Elmes
b34d128560
rename FilterToSearchIn in backend to match frontend
2021-01-30 10:54:21 +10:00
Damien Elmes
dbe852431f
use a separate enum for the is:* searches
2021-01-30 10:49:00 +10:00
Damien Elmes
e3f2b77c5b
combine forgot_in_days and studied_today into a more general 'rated'
2021-01-30 10:26:23 +10:00
Henrik Giesel
dc62e56aef
Remove modular d3 imports for imports from d3 bundle
2021-01-30 01:13:47 +01:00
Damien Elmes
873bf7f505
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
0af6d559a8
Remove d3 libraries from BUILD.bazel
2021-01-30 00:04:44 +01:00
Henrik Giesel
0527beec98
Replace individual d3 libraries with encompassing d3
2021-01-30 00:00:22 +01:00
RumovZ
cad57423c5
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
df22e51d02
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
44351bc997
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
c44c1513a3
Reorder methods / properties
2021-01-29 20:13:02 +01:00
Henrik Giesel
da79acf685
Remove unnecessarily observed attribute
2021-01-29 20:11:00 +01:00
Henrik Giesel
9771b5394c
Add semicolon in js message
2021-01-29 19:48:17 +01:00
Henrik Giesel
e7a49d5c48
Make forEditorField more cheaper to execute by avoiding casting to Array
2021-01-29 19:38:55 +01:00
RumovZ
c7365abc9e
Refactor search_string() and FilterToSearchIn
...
See #955 .
2021-01-29 18:27:33 +01:00
Henrik Giesel
00a4d0357d
Remove explicit ids, as they are not necessary anymore
2021-01-29 18:07:31 +01:00
Henrik Giesel
1617565f2d
No need to set initial values for editing area base CSS
2021-01-29 17:51:26 +01:00
Henrik Giesel
36ce422119
Remove checking for class names for instance checks
2021-01-29 17:41:27 +01:00
Henrik Giesel
a33fa9c0cf
Put HTML initialization into web component constructor
...
* disconnectedCallback should remove event listeners and free other resources
* attributes belong to connectedCallback
2021-01-29 15:50:34 +01:00
Henrik Giesel
514d6b68b6
Move setting of index to connectedCallback
2021-01-29 14:54:59 +01:00