-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use a combobox instead of a lineedit widget for library search history #3171
Conversation
selection mechanism for restoring and saving search queries. This allows to go back to earlier queries easily and also allows to restore the last search from a different feature. Entries in the combobox are added after a 5 second timeout or when the search is changed via api. Properly query the frame width from the stylesheet and not assume 1. The current data model is only in memory and not saved to disk.
Saving these persistently could be added later after the basic feature is merged. |
How about autocompletion? |
It was in a b2b session just a few days ago that I decided to take a stab on this because it is sooo annoying to retype queries like bpm:=122-128 or tech vocal. |
This comment has been minimized.
This comment has been minimized.
at least with arrow buttons recalling previous queries feels a bit defective
|
We should remove line 105 |
Applying the library font is fixed with ronso0@0d491ad I can help with auto-resizing the down button later on if you like. |
Update internal metrics to calculate button positions on font changes. Move the new entry to the top of the list when an old entry was found. This way the search behaves more like expected. Avoid duplicates when Enter is pressed. Save new query term if keydown is pressed or popup opened.
63f8825
to
b992c17
Compare
@ronso0 I fixed the resize problem and changed the history algorithm to move the old search entry to the top of the list and in general should behave more like expected. |
… searchbox-combo
Cancle timer when selection changes to prevent history being messed up with arrow keys/controls.
I think this is ready for review. I did some more testing and tweaked the behavior and think it behaves now as one would expect. |
...with Tab, Up, Down and existing library controls like |
With combobox reaching the search field is usefull again since it allows you to scroll previous filters.
@ronso0 fixed |
…ueries with [Library],MoveVertical, ..MoveDown & MoveUp controls.
...as well as 5797c14: have used this branch in a few sessions now and it's very handy. Thanks! |
text() does not exist anymore
@uklotzde anything left to do here? |
I will not re-review or test before the pre-commit issues have been fixed and the CI builds succeed. |
411a92a
to
8fdd642
Compare
@uklotzde it's green now :) |
nice! |
forget about it... I'll do this all at once later on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The width of the search box (and sidebar) grows with the longest search string. Suddenly the sidebar takes half of the screen's width and cannot be shrunk back.
Expected behavior: The width of the sidebar is controlled by the user and does not depend on the contents of the search combo box.
@uklotzde good catch. fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this powerful extension! Works really good now, especially in conjunction with the related tracks search.
I have only done a quick test, no keyboard navigation, no controller interaction.
🎉 |
@poelzi Please document the new controls and shortcut(s) in the PR description. |
Use a combobox instead of a lineedit widget and utalize the combobox
selection mechanism for restoring and saving search queries.
This allows to go back to earlier queries easily and also
allows to restore the last search from a different feature.
Entries in the combobox are added after a 5 second timeout or
when the search is changed via api.
Properly query the frame width from the stylesheet and not assume 1.
The current data model is only in memory and not saved to disk.