Damien Elmes
de16039b48
tweaks to the parent matching behaviour
...
- move logic out of the storage layer - its job is only to read
and write data from the DB
- avoid the Result within a Result
- return the preferred case as an option, so we can avoid a copy
in the unchanged case
- return a Cow when normalizing, so we can avoid copying in the
unchanged case
- add tags directly in clear_unused_tags(), so we avoid doing
lookups for every tag in the tag list
2021-01-19 11:52:24 +10:00
abdo
ee32ec4d25
Make tags match their parents case
...
https://github.com/ankitects/anki/pull/900/#issuecomment-762018745
2021-01-19 02:29:09 +03:00
Damien Elmes
d92ba2c246
Merge pull request #900 from abdnh/tagtree
...
Hierarchical tags
2021-01-18 16:36:22 +10:00
abdo
c4725cc908
Fix wrong tag collapse state being used
2021-01-18 06:50:29 +03:00
Damien Elmes
8e50cfc404
skip the schema warning on template rename
...
https://forums.ankiweb.net/t/unnecessary-full-upload-notification/6611
2021-01-18 12:03:07 +10:00
abdo
a6234d1b66
clear_tag() should be case-insensitive
2021-01-18 03:52:28 +03:00
Damien Elmes
4e6cbe742c
Merge pull request #926 from hgiesel/ratedextension
...
Introduce "prop:rated" and "prop:resched"
2021-01-18 09:09:53 +10:00
Henrik Giesel
232f5b5e79
Adjust unit tests for new InvalidRatedEase
2021-01-18 00:05:20 +01:00
Henrik Giesel
df3995e688
Generalize InvalidRatedEase error for rated and prop:rated
2021-01-17 23:55:05 +01:00
Henrik Giesel
a15ed65b8e
Use explicit unreachable in rust pattern matching
2021-01-17 22:18:12 +01:00
Henrik Giesel
6ace112cad
Add resched to tags
2021-01-17 21:44:56 +01:00
Henrik Giesel
fb497ea2e6
Reintroduce false removed limits
2021-01-16 17:38:02 +01:00
abdo
a96c410c52
Remove unused set_filter()
2021-01-16 18:51:31 +03:00
abdo
4dfaf06308
Use new backend filters in rename_tag()
2021-01-16 18:49:48 +03:00
Henrik Giesel
cb7df2c71f
Change argument order of write_rated to be more in line with the logic
2021-01-16 15:24:22 +01:00
Henrik Giesel
915cde892b
Lift the 365 limit from rated/resched searches
2021-01-16 15:08:15 +01:00
Henrik Giesel
682ab23482
Fix issues after rebasing
2021-01-16 13:07:35 +01:00
Henrik Giesel
216ca28cb2
Being overly correct with the review ids
2021-01-16 12:45:02 +01:00
Henrik Giesel
ac0c5a1d00
Fix formatting
2021-01-16 12:45:02 +01:00
Henrik Giesel
0c71487973
Pass in the the negative offset day to write_rated
2021-01-16 12:44:59 +01:00
Henrik Giesel
401796ffbe
Port prop:rated to EaseKind
2021-01-16 12:44:03 +01:00
Henrik Giesel
c84a75b4a5
Implement functioning prop:rated
2021-01-16 12:42:08 +01:00
Henrik Giesel
6da38dc719
Add nonfunctional "prop:rated" as possible search query
2021-01-16 12:42:06 +01:00
Damien Elmes
b3f57754df
use of 'self' in function name was confusing
2021-01-16 21:14:55 +10:00
Damien Elmes
ff8c8a3bca
simplify unused tags and DB check
...
- backend routines should contain minimal logic, and should call
into a routine on the collection
- instead of copying the giant-string approach the Python code was taking,
we use a HashSet to keep track of seen tags as we loop through the
notes, which should be more efficient
2021-01-16 20:38:16 +10:00
Damien Elmes
7f4850659d
no need for separate all_tags_sorted()
...
tag is the primary key, so sqlite will give it back to us in
sorted order already.
2021-01-16 19:46:58 +10:00
Damien Elmes
f41eb90c21
custom ord/partialeq is not required; fix clippy lint
2021-01-16 19:44:37 +10:00
Damien Elmes
1288191743
handle missing parent names with varying case
...
Also convert to \x1f before sorting, so that numbers (with have a lower
ascii order than '::') don't mess up the sort.
2021-01-16 19:42:25 +10:00
Damien Elmes
82f9143171
add a (currently failing) test for duplicate parent names
2021-01-16 19:04:25 +10:00
Damien Elmes
96bd39f13e
search error tweaks
...
- use markdown instead of HTML, to make editing and translating easier
- use a shared prefix
- a few very minor wording tweaks
- we don't need to translate undocumented command errors
- share a string for positive number of days
- share a string for invalid property and state arguments, and avoid
listing them out
Related discussion: https://github.com/ankitects/anki/pull/922
2021-01-16 15:59:19 +10:00
Damien Elmes
5c5f7d98ff
Merge pull request #922 from RumovZ/search-errors
...
Custom search errors
2021-01-16 13:11:54 +10:00
Damien Elmes
c6f38733ed
Merge pull request #925 from hgiesel/preferbr
...
Prefer <br> over <div></div> in Editor
2021-01-16 13:03:28 +10:00
Damien Elmes
db045fb1b9
restore shortcuts that got lost in Fluent conversion
...
They were missed as they were not marked 'notr'.
https://forums.ankiweb.net/t/home-and-end-keys-no-longer-work-in-browse-window/6524
2021-01-16 10:03:29 +10:00
Henrik Giesel
131d71682b
Deal with div insertion on deleting list item
2021-01-15 18:46:37 +01:00
Henrik Giesel
b5e26f7e51
Consider list edge case for line breaks
...
* Enter makes a new bullet point
* Shift+Enter makes a line break in current bullet point
2021-01-15 18:46:37 +01:00
Henrik Giesel
93b429a21b
Prefer <br> over <div></div>
2021-01-15 18:46:37 +01:00
RumovZ
bdb7948406
Add resched error tests
2021-01-15 10:57:55 +01:00
RumovZ
b9f7643100
Merge branch 'master' into search-errors
...
Add error support for new resched node, update rated error.
2021-01-15 10:50:02 +01:00
RumovZ
bdc46a2124
Fix HTML formatting for search errors
2021-01-15 09:43:36 +01:00
RumovZ
ea5fb56f3f
Add translatable search error strings
2021-01-15 09:10:19 +01:00
RumovZ
9d641bcb76
Include context in search error test
2021-01-15 09:09:54 +01:00
abdo
112aa44c90
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-15 01:12:01 +03:00
RumovZ
e0168c8216
Encode HTML entities in search errors
2021-01-14 23:02:39 +01:00
RumovZ
6f8a9ba2ff
Add search context for certain error kinds
2021-01-14 22:40:07 +01:00
RumovZ
74c2ce8df1
Rename ParseErrorKind to SearchErrorKind
2021-01-14 22:00:52 +01:00
RumovZ
6cbb4b48b2
Add errorkind test
2021-01-14 19:10:12 +01:00
RumovZ
8c6fbd828d
Add FailKinds for unopened/unclosed groups
2021-01-14 19:09:31 +01:00
abdo
53736b7b9d
Pass escaped name to bulk_update in rename_tag
2021-01-14 18:38:46 +03:00
RumovZ
ae22b78534
Make AnkiError::SearchError work with ParseError
...
Use mock ftl strings for now.
2021-01-14 11:14:55 +01:00
RumovZ
5e971759cf
Fix text node parsers, add FailKind alias
2021-01-14 11:10:33 +01:00