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
Henrik Giesel
aa924ac821
Add semicolon in js message
2021-01-29 19:48:17 +01:00
Henrik Giesel
3559834bc9
Make forEditorField more cheaper to execute by avoiding casting to Array
2021-01-29 19:38:55 +01:00
RumovZ
c299e271e8
Refactor search_string() and FilterToSearchIn
...
See #955 .
2021-01-29 18:27:33 +01:00
Henrik Giesel
79dc0ecf86
Remove explicit ids, as they are not necessary anymore
2021-01-29 18:07:31 +01:00
Henrik Giesel
5e67e706fb
No need to set initial values for editing area base CSS
2021-01-29 17:51:26 +01:00
Henrik Giesel
32ee863577
Remove checking for class names for instance checks
2021-01-29 17:41:27 +01:00
Henrik Giesel
982372beae
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
0beefc0699
Move setting of index to connectedCallback
2021-01-29 14:54:59 +01:00
Henrik Giesel
fe87f986d3
Remove user styling in editor again for now
2021-01-29 14:54:59 +01:00
Henrik Giesel
594fc9bebd
Fix focus change on tab
2021-01-29 14:54:59 +01:00
Henrik Giesel
6e907fd8b6
Move styling attributes from editor to editing-area that are for editing area
2021-01-29 14:54:58 +01:00
Henrik Giesel
a620bf91a8
Make button highlight white in nightMode
2021-01-29 14:54:58 +01:00