RumovZ
251fe50660
Fix search calls in addcards
2021-01-28 20:01:20 +01:00
RumovZ
423d7e5098
Use backend filter for findDupes and handle excep.
2021-01-28 19:49:16 +01:00
RumovZ
a930aa41f0
Use backend nid filter in addcards and mediacheck
2021-01-28 18:59:20 +01:00
RumovZ
407358ab68
Use backend nid filter in browser
2021-01-28 16:21:56 +01:00
RumovZ
1635f20af3
Prevent search prompt from being saved as a filter
...
Normalisation would render it useless.
2021-01-28 13:31:08 +01:00
RumovZ
99cb68513c
Use backend filter for search prompt
2021-01-28 13:26:52 +01:00
RumovZ
77765d4896
Replace remaining literal searches in aqt
2021-01-28 11:19:07 +01:00
RumovZ
ea46e24662
Use col instead of backend in aqt for search strs
2021-01-28 11:17:24 +01:00
Damien Elmes
2224fce936
fix crashes when activating context menu/items while searching
2021-01-28 19:12:07 +10:00
Damien Elmes
b148095243
basic match highlighting
2021-01-28 18:58:51 +10:00
Damien Elmes
8b08687b0c
basic tree-based filtering with a sort proxy
...
Some things left to do:
- instead of searching on each keystroke, have the keystroke start
a timer and wait 600-1000ms before performing the search
- handle the case .refresh() is called while searching
It would also be nice to have some visual distinction between matching
rows and their non-matching parents.
2021-01-28 18:51:18 +10:00
Damien Elmes
fbf2f673f4
fix sidebar model.parent() returning invalid values
...
Triggered a crash when using a model proxy.
2021-01-28 17:48:33 +10:00
Damien Elmes
f45d51c92d
Merge pull request #952 from hgiesel/fieldsflex
...
Deal with inline content vs block content and <br> in editor.ts
2021-01-28 15:49:31 +10:00
Damien Elmes
a03da5ce89
add type check to textFormat arg
2021-01-27 14:22:17 +10:00
Henrik Giesel
bf7ff65af6
Rename fieldIsInInlineMode to fieldContainsInlineContent
2021-01-27 02:35:14 +01:00
Henrik Giesel
d9f00c4839
Remove unused helper functions
2021-01-27 00:55:00 +01:00
Henrik Giesel
b2b17f4c3d
Recreate border-spacing with margins for #fields
2021-01-27 00:50:26 +01:00
Henrik Giesel
9b5d915983
Change nodeIsInline logic to be more typesafe
2021-01-26 23:49:48 +01:00
Henrik Giesel
feddf96f2a
Change logic to detect inline elements, as the display style property may not be set after setting innerHTML
2021-01-26 23:42:04 +01:00
abdo
208c713e39
Add search bar to the sidebar
...
https://github.com/ankitects/help-wanted/issues/6
2021-01-27 01:41:57 +03:00
Henrik Giesel
520c4a3b4d
Make #fields display correctly
2021-01-26 23:17:50 +01:00
Henrik Giesel
e481452114
Make fields div instead of table + implement fieldIsInInlineMode logic
2021-01-26 23:00:55 +01:00
Henrik Giesel
335267d42e
Strip trailing newline if inline elements logic
2021-01-26 21:26:04 +01:00
Damien Elmes
322788133b
tooltip() instead of print() when no tts tag matches
...
Can help with debugging user error like an incorrectly-typed language
code. Don't ask me how I know. :-)
2021-01-26 20:37:24 +10:00
Damien Elmes
e324f06348
Merge pull request #944 from Arthur-Milchior/help
...
NF: HelpPage in an enum
2021-01-26 11:33:39 +10:00
Damien Elmes
644cc46dea
Merge pull request #897 from hgiesel/statssearch
...
Triggering searches from the stats screen.
2021-01-26 11:31:36 +10:00
Arthur Milchior
e0a2d90a68
NF: HelpPage in an enum
...
Hopefully, this can help with updating on next manual update and maybe even linking to manual translation
2021-01-26 02:16:37 +01:00
Damien Elmes
0a0de2ce7b
Merge pull request #945 from RumovZ/dyndeck-search
...
Normalize dyndeck search and handle exception
2021-01-26 09:24:56 +10:00
Damien Elmes
a82744a3e5
load sidebar in background
...
Allows the UI to repaint during processing, but will still block
DB operations until the call completes.
2021-01-26 09:02:08 +10:00
RumovZ
52c27e7b99
Normalize dyndeck search and handle exception
2021-01-25 23:21:32 +01:00
RumovZ
060fdc824b
Move show_invalid_search_error to utils
2021-01-25 23:19:19 +01:00
Henrik Giesel
759ed17963
Move dispatch logic from Histogram to individual graphs
2021-01-25 16:34:44 +01:00
Henrik Giesel
a7c8b021dd
Satisfy formatter
2021-01-25 13:46:44 +01:00
Henrik Giesel
fdf4c6628f
Add browserSearch bridge command
2021-01-25 13:44:19 +01:00
Damien Elmes
31a3add848
fix finished screen not showing when learning cards due later
2021-01-25 21:12:57 +10:00
Arthur Milchior
5c69f2c324
Correct browse help link
2021-01-23 14:48:29 +01:00
Damien Elmes
2a875ffc55
Merge pull request #934 from hgiesel/graphprefs
...
Add GraphsPreferences API to graphs for setting persistent preferences
2021-01-23 21:24:41 +10:00
Damien Elmes
37ca8afaf6
minor wording tweak: GraphsPreferences -> GraphPreferences
2021-01-23 20:47:45 +10:00
Damien Elmes
b16f6cbcce
Merge pull request #938 from hgiesel/editorflex
...
Small refactor of topbar buttons
2021-01-23 20:09:42 +10:00
Damien Elmes
8d5dca4bda
move sidebar code from browser.py to sidebar.py and tidy up
...
https://github.com/ankitects/help-wanted/issues/6
Some notes:
- use our own routine to toggle the sidebar, which avoids a useless
refresh on browser close, and allows us to limit the delayed loading
to initial browser load.
- add-ons that limited themselves to the browser_will_build_tree hook
should theoretically continue working; ones that were monkey patching
will likely break. A few appear to be broken at the moment anyway,
so it's probably a good time to be making this change.
2021-01-23 19:59:12 +10:00
Damien Elmes
9db3f0dd19
drop tags/decks/etc from Filter button
...
https://github.com/ankitects/help-wanted/issues/6
These are a relic from when the sidebar defaulted to off, and I don't
think enough people are using them to bother keeping them around.
Once the the card state and saved filter functionality moves into the
sidebar and top menus, we may be able to remove the Filter button
completely.
2021-01-23 18:21:44 +10:00
Henrik Giesel
bf130d1da0
Change the function name in genbackend.py
2021-01-22 20:05:28 +01:00
Henrik Giesel
de71123ab4
Rename GraphsPreferencesOut to simply GraphsPreferences
2021-01-22 19:39:03 +01:00
abdo
0110102ea2
Render card templates as trees in the sidebar
...
Reusing the note type icon and not caring about saving collapse state
for now.
2021-01-22 17:49:20 +03:00
Henrik Giesel
d1ada88657
Successfully send post request to rust
2021-01-22 14:37:24 +01:00
Henrik Giesel
054c30a695
Add non-functioning logic for settings graphs preferences
2021-01-22 13:14:35 +01:00
Henrik Giesel
665a13e378
Add GraphsPreferences endpoint to backend
2021-01-22 13:13:48 +01:00
Henrik Giesel
1df6c5f596
Avoid highlighting of toprightbuttons to shift the topbar
2021-01-22 12:53:45 +01:00
Henrik Giesel
9226d50185
Space items by using margins instead of spaces
...
* also changed name of topbutton container back to topbutsOuter as it is clearer
* starting with Chromium 83, `row-gap` would be better suited for this
2021-01-22 12:17:10 +01:00
Henrik Giesel
97f8f1b89e
Switch from floating windows and clearfix to flex and justify-content: space-between
2021-01-22 11:37:11 +01:00
Damien Elmes
0c35d30979
Merge pull request #935 from abdnh/sidebar-nt
...
Add manage note types menu item to the sidebar
2021-01-22 14:21:28 +10:00
abdo
426ea1aba9
Move the logic for selecting a note type to models.py
2021-01-22 05:56:39 +03:00
Henrik Giesel
1f4de7fe4b
Adjust the positioning of the editor toolarea via CSS
2021-01-21 21:36:33 +01:00
Henrik Giesel
2946843b81
Remove image click event handler, as it never takes place
...
* className of fields will be "field clearfix", never just "field"
2021-01-21 20:50:17 +01:00
Henrik Giesel
e91a4b4362
Remove javascript resizing code from editor.ts
2021-01-21 19:59:16 +01:00
abdo
918bba6365
Add manage note types menu item to the sidebar
2021-01-21 20:27:20 +03:00
Damien Elmes
6d8a9a7ef5
Merge pull request #930 from hgiesel/editorts
...
Refactor editor.ts
2021-01-21 10:44:11 +10:00
Henrik Giesel
6262997599
Explicitly execute code deactivating button focus from editor.py
2021-01-20 17:06:08 +01:00
abdo
0fc4c21dcc
Add filter remove/rename actions to the sidebar
2021-01-20 03:26:53 +03:00
Henrik Giesel
cfc8e34cf0
Remove jQuery from most top functions, and avoid waiting for jquery load
2021-01-19 03:52:46 +01:00
Henrik Giesel
5b24e5c522
Remove some unnecessary jQuery, replace some toggles with classList.toggle
2021-01-19 03:06:44 +01:00
Henrik Giesel
27a1e81088
Remove code which supposedly fixing focus, but which is not functional
2021-01-19 02:54:15 +01:00
Henrik Giesel
47d26126e7
Switch to iterables for elem.style and elem.attributes
2021-01-19 02:48:41 +01:00
Henrik Giesel
a4921a36dd
Satisfy formatter
2021-01-19 01:08:15 +01:00
Henrik Giesel
4deeb798ca
Prefer template string and addEventListener
over string concatenation and .on<event>
2021-01-18 17:42:29 +01:00
Henrik Giesel
150de7a683
Use more strict TypeScript in editor.ts
2021-01-18 17:18:35 +01:00
Henrik Giesel
a898224d3d
Switch to KeyboardEvent.code rather than KeyboardEvent.which, which is deprecated
2021-01-18 15:19:57 +01:00
Damien Elmes
318cc01c73
Merge pull request #900 from abdnh/tagtree
...
Hierarchical tags
2021-01-18 16:36:22 +10:00
abdo
5ac69d6dc6
Fix wrong tag collapse state being used
2021-01-18 06:50:29 +03:00
Damien Elmes
a57e326906
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
dbd0334f97
Remove unused set_filter()
2021-01-16 18:51:31 +03:00
Damien Elmes
9686cd99ec
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
a674712916
Merge pull request #925 from hgiesel/preferbr
...
Prefer <br> over <div></div> in Editor
2021-01-16 13:03:28 +10:00
Damien Elmes
f1a4c57dc1
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
0db8a14497
Deal with div insertion on deleting list item
2021-01-15 18:46:37 +01:00
Henrik Giesel
4e1139021b
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
5c6694950d
Prefer <br> over <div></div>
2021-01-15 18:46:37 +01:00
abdo
e018ea94b6
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-15 01:12:01 +03:00
RumovZ
7b9cc017c4
Use backend to set dupe filter
2021-01-14 10:42:37 +10:00
Damien Elmes
633034b24d
add local sync server frontend
2021-01-13 11:42:00 +10:00
abdo
72e8f9d640
Merge branch 'master' of https://github.com/ankitects/anki into tagtree
2021-01-12 23:31:58 +03:00
abdo
9a68d84483
Keep tags in human form and update the tags table structure
...
See https://github.com/ankitects/anki/pull/900#issuecomment-758284016
- Leave tag names alone and add the collapsed and config columns to the tags table.
- Update The DB check code to preserve the collapse state of used tags.
- Add a simple test for clearing tags and their children
2021-01-12 23:12:35 +03:00
Damien Elmes
1425379d41
drop basicCheck()
...
It can considerably slow down syncing on large collections
2021-01-12 18:47:08 +10:00
Damien Elmes
5f02be4943
Merge pull request #914 from hgiesel/previewineditor
...
Preview Button in Editor instead of Browser
2021-01-11 19:12:06 +10:00
Damien Elmes
7883ea0396
Merge pull request #915 from RumovZ/fix-template-filter
...
Fix _template_filter and update want_release_gil()
2021-01-11 16:20:50 +10:00
Kyle Mills
a0dc33c0e8
typo
2021-01-10 07:18:08 -08:00
Henrik Giesel
cf1240bb18
Make keys parameter requiring func parameter in _addButton explicit
2021-01-10 13:42:23 +01:00
RumovZ
388e958f39
Don't add 1 when calling _template_filter()
...
See #913 .
2021-01-10 11:30:14 +01:00
Henrik Giesel
fce536f205
Close previewer if there is no card to render
2021-01-10 02:01:24 +01:00
Henrik Giesel
ace61835de
Fix formatting, use shortcut on preview before displaying
2021-01-10 01:50:00 +01:00
Henrik Giesel
097fa16783
Allow closing the Preview Dialog with Ctrl+Shift+P
2021-01-10 01:34:59 +01:00
Henrik Giesel
6431f0b6b1
Prevent error when browser is closed with previewer open
2021-01-10 01:21:52 +01:00
Henrik Giesel
6afc495035
Activate toggle on hotkey invocation
2021-01-10 01:10:23 +01:00
Damien Elmes
8b877f0a08
add type to _named_filter()
...
The ...Value types generated by mypy-protobuf are only available
at typechecking time, and pylint chokes on them despite the use
of annotations from __future__ - so we either need to quote them,
or use # pylint: disable=no-member
2021-01-10 09:11:48 +10:00
Henrik Giesel
59d0e8f036
Add shortcut to new preview button
2021-01-10 00:00:19 +01:00
Henrik Giesel
fe118197a3
Improve styling of new preview button on light and nightMode
2021-01-09 23:55:39 +01:00
Henrik Giesel
28278fcc40
Remove preview button from browser.py top bar
2021-01-09 23:25:56 +01:00
Henrik Giesel
ece753991e
Make button show its toggle state
2021-01-09 23:16:01 +01:00
Henrik Giesel
f5d429a5ca
Put Preview button into editor inside browser
2021-01-09 22:34:53 +01:00
RumovZ
f83553c82a
Merge branch 'master' into backend-filters
...
Adapt new formatting.
2021-01-09 19:03:43 +01:00
RumovZ
b763fc5b2a
Use explicit wrapper functions to get filters
2021-01-09 16:48:47 +01:00
abdo
f7f509c70d
Move tag collapse method to the backend
2021-01-09 17:10:16 +03:00
abdo
b33267f754
Do not check for missing tag parents at registration time
2021-01-09 17:10:16 +03:00
abdo
b276ce3dd5
Hierarchical tags
2021-01-09 17:10:13 +03:00
RumovZ
b99d9cda74
Prettify frontend filter code
2021-01-09 12:34:46 +01:00
RumovZ
fda2bfdb4e
Use backend filters instead of literal searches
2021-01-09 10:51:15 +01:00
wallgrenen
e001cd4d3a
remove unused variables and commented-out code
2021-01-08 20:53:27 +01:00
RumovZ
d30062a8a5
Compare and save filters normalised
...
When checking whether the current search is a saved filter, compare the
searches normalised to allow the detection of equivalent expressions.
Invalid searches are accepted unaltered to allow the deletion of invalid
saved filters.
As for saving new filters, do so normalised, respectively, reject
invalid searches.
2021-01-07 22:11:21 +01:00
RumovZ
478a3bd0bc
Format
2021-01-07 18:20:14 +01:00
RumovZ
efd554ea29
Provide ConcatSeparator through rsbackend.py
2021-01-07 17:48:30 +01:00
Damien Elmes
b30b7c3073
fix qt/ pylints
2021-01-07 16:21:50 +10:00
Damien Elmes
f4c8462b97
fix another broken setWindowFlags
2021-01-07 14:46:55 +10:00
Damien Elmes
94064b8230
convert setWindowFlags call into helper, and fix invalid variables
...
"type: ignore" was masking the invalid references to self in places
like showText()
2021-01-07 14:24:49 +10:00
Damien Elmes
a1c17d114a
Merge pull request #860 from RumovZ/norm-search
...
Normalise search
2021-01-07 10:51:36 +10:00
Damien Elmes
f667521ee0
only adjust search on left button click
...
Closes #898
2021-01-07 10:08:23 +10:00
wallgrenen
52a2447f09
replace broken link
2021-01-07 09:56:25 +10:00
Damien Elmes
5c08bd8fb8
Merge pull request #899 from BlueGreenMagick/remove-context-help-btn
...
remove context help button
2021-01-07 09:52:12 +10:00
RumovZ
6ee9e4f58c
Merge branch 'master' of https://github.com/ankitects/anki into norm-search
2021-01-06 20:57:24 +01:00
RumovZ
cbf68da630
Format
2021-01-06 20:35:11 +01:00
RumovZ
539f701573
Add exception handling for filter modifications
2021-01-06 20:25:13 +01:00
RumovZ
d9f7d2e70d
Add tests for writer.rs
...
Also minor adjustments to concatenate_searches.
2021-01-06 19:39:34 +01:00
RumovZ
07499dd890
Implement search replacing via Ctrl+Shift combo
...
Also switch to using the new backend functions for concatenating and
negating searches.
2021-01-06 18:32:29 +01:00
wallgrenen
78601d29ba
replace broken link
2021-01-06 17:03:39 +01:00
BlueGreenMagick
6224658c0d
remove context help button
2021-01-06 22:15:48 +09:00
RumovZ
6d6cd87b8f
Adjust frontend to normalized search syntax
2021-01-06 14:05:28 +01:00
Damien Elmes
d464d97f10
Merge pull request #891 from BlueGreenMagick/sidebar-delete-deck
...
Sidebar delete deck
2021-01-06 18:56:15 +10:00
Damien Elmes
25858c212c
fix unhandled sync error
...
Thanks to Abdo:
https://forums.ankiweb.net/t/sync-anki-on-desktop-error/6299/2
2021-01-06 18:51:28 +10:00
BlueGreenMagick
adb8be92a0
format ask_delete_deck method more readable
2021-01-05 21:33:59 +09:00
BlueGreenMagick
95a62b20d3
delete deck in background
2021-01-05 21:33:59 +09:00
BlueGreenMagick
ada8c505f6
add BrowserDeleteDeck to ResetReason
2021-01-05 21:33:48 +09:00
BlueGreenMagick
2a1b6f90ae
add delete_deck to sidebar context menu
2021-01-05 20:09:55 +09:00
BlueGreenMagick
f6f06986d0
seperate ask_delete_deck and _delete method
2021-01-05 20:09:47 +09:00
Damien Elmes
83136d2491
Merge pull request #890 from hgiesel/addonclose
...
Add closeWithCallback method to Addons dialog
2021-01-04 21:16:01 +10:00
Henrik Giesel
5f75d5694d
Add silentlyClose method to Addons dialog
2021-01-04 11:52:00 +01:00
Damien Elmes
94fe1f898f
Merge pull request #888 from hgiesel/studiedtoday
...
Wrap studied_today in deckbrowser in div and span
2021-01-04 14:27:35 +10:00
Damien Elmes
f3fa9daae2
do tag rename and tag clearing in background; move logic to tags.py
...
Because the logic is in rename_tag() now, it means we create a
checkpoint even if the tag is orphaned. This is because currently
checkpointing is a GUI responsibility. In the future we need to introduce
multi-level undo, and should move responsibility for managing it
to the backend.
2021-01-04 14:14:39 +10:00
Damien Elmes
35ce1b0d29
types don't need quoting, as annotations is imported from future
2021-01-04 13:46:00 +10:00
Damien Elmes
03b10b0d44
Merge pull request #887 from BlueGreenMagick/deck-rename-checkpoint
...
don't set checkpoint when deck rename is cancelled
2021-01-04 13:44:28 +10:00
Henrik Giesel
0a121077de
Wrap studied_today in div and span in deckbrowser
2021-01-03 14:54:44 +01:00
BlueGreenMagick
35d3d89705
escape tags when finding notes
2021-01-03 17:34:44 +09:00
BlueGreenMagick
46346d01a0
add rename_tag to browser sidebar contextmenu
2021-01-03 16:36:54 +09:00
BlueGreenMagick
53edeaf07f
don't set checkpoint when deck rename is cancelled
2021-01-03 16:30:14 +09:00
Damien Elmes
b27259096e
refreshing should happen outside of except clause
2021-01-03 10:09:42 +10:00
Damien Elmes
48ee35f6ad
Merge pull request #885 from Arthur-Milchior/hook_default_search
...
NF: Add a hook to change the default search from reviewer
2021-01-03 10:09:08 +10:00
Damien Elmes
e9c58382be
Merge pull request #884 from BlueGreenMagick/refresh-deckchooser
...
refresh deck browser after renaming deck in browser sidebar
2021-01-03 10:08:45 +10:00
Arthur Milchior
9166330618
NF: Add a hook to change the default search from reviewer
...
The goal here is to simplify my add-on which show a single card or the whole deck when the browser open
2021-01-02 19:49:11 +01:00
BlueGreenMagick
708d94714c
refresh deck browser on renaming deck
2021-01-02 23:21:41 +09:00
BlueGreenMagick
1afbf4212e
no need to call show()
2021-01-02 23:07:57 +09:00
Damien Elmes
5ec5a47708
merge separate vendor rules into single rule
...
Rather than creating a separate rule for each package, we can just
create a generic one and reuse it. Also switch to keyword arguments
in the resulting macros, as it's easier to read.
2021-01-02 11:14:00 +10:00
Henrik Giesel
450ff60815
Fix input type for _drawFlag
2021-01-01 14:14:50 +01:00