Damien Elmes
79239c89b7
move saved search code into sidebar.py, and remove from Filter button
2021-01-29 23:05:30 +10:00
Damien Elmes
132bb5ff36
add expand/collapse children options
2021-01-29 22:54:00 +10:00
Damien Elmes
6ba5ff5a01
place each sidebar section under its own collapsible parent node
...
- Allows for group operations like "clear unused tags"
- Allows users to hide groups they're not interested in
2021-01-29 22:11:05 +10:00
Damien Elmes
57c53632a6
Revert "Make sidebar search matching work with full_name instead of name"
...
This reverts commit 6850e0f78e
.
Using the full name caused issues with highlighting:
https://github.com/ankitects/anki/pull/951#issuecomment-769516003
Let's revert this for now and see if demand presents itself.
2021-01-29 13:18:28 +10:00
Damien Elmes
151cf52718
vary sidebar highlight with theme
2021-01-29 13:15:38 +10:00
abdo
903008f2bd
Handle sidebar refreshing while searching
2021-01-29 04:20:15 +03:00
abdo
9492c8305e
Wait for some time before performing sidebar search
2021-01-29 03:45:16 +03:00
abdo
6850e0f78e
Make sidebar search matching work with full_name instead of name
2021-01-29 02:36:13 +03: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
abdo
208c713e39
Add search bar to the sidebar
...
https://github.com/ankitects/help-wanted/issues/6
2021-01-27 01:41:57 +03: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
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
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
abdo
426ea1aba9
Move the logic for selecting a note type to models.py
2021-01-22 05:56:39 +03:00
abdo
918bba6365
Add manage note types menu item to the sidebar
2021-01-21 20:27:20 +03:00
abdo
0fc4c21dcc
Add filter remove/rename actions to the sidebar
2021-01-20 03:26:53 +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
Damien Elmes
b30b7c3073
fix qt/ pylints
2021-01-07 16:21:50 +10:00
Damien Elmes
f667521ee0
only adjust search on left button click
...
Closes #898
2021-01-07 10:08:23 +10: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
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
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
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
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
ffa26fe4bc
fix remaining _() references; remove unused imports
2020-11-18 12:43:46 +10:00
Damien Elmes
6418993840
merge bulk of qt/ - designer files still to do
2020-11-17 17:42:43 +10:00
abdo
4f5fdc192a
Move new sidebar code to a separate file
...
- Move the new sidebar code and SidebarTreeView implementation to a
new file. Old sidebar can be accessed with the shift key. The "new" sidebar
doesn't add much for now.
- Make rename_deck work with subdecks
- Fix an issue when trying to open context menu over areas not populated
with sidebar items
2020-10-10 04:42:49 +03:00