-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Library sidebar: customize hover expand delay #15447
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
base: main
Are you sure you want to change the base?
Conversation
|
This PR is marked as stale because it has been open 90 days with no activity. |
|
The code looks good. Do we have a demand for a short delay especially? I can confirm that it is quite quick. So I think we should pick a higher value by default. Testing all this, the behaviour does not feel 100 % natural.
The normal use case is:
Here collapse is counter intuitive. |
333a63f to
fe5e1ca
Compare
|
I have rebased to resolve the conflicts, and I also fixed restoring the value from config. I also set the minimum to 500 ms |
I can confirm something strange is going with the timer. After the cursor left the sidebar (drag canceled) I saw Crates expand, even though that shouldn't be possible (cursor pos can't be resolved to a sidebar item).
I don't understand, please explain. Btw the original Qt implementation does only expand, but collapse does make sense in Mixxx in case you accidentally expanded a branch with loooooooots of items. |
fe5e1ca to
41f6288
Compare
|
With normal use case I ment users that don't expect auto expand. This should be a first class citizen. Unintended open or closing branches create the annoyance. |
|
Got it. How about introducing that change in QML, like when the entire GUI is new to everyone? |
|
I don't mean to make it opt in. I actually would prefere to make the auto open feature work just "right" without any preference option. But I don't have stong demands. |
|
Well, "just right" varies.. by I guess I konw what you mean.
How should the sidebar know what the target is? I think an even longer delay would help avoid more accidents (1 s ??) while still keeping auto-expand/collapse functional for those how use it regularly. |
|
I need to test, but 500 ms sounds like a reasonable time reach the target crossing other folders without collapsing. |
Hmm, I think this depends on the column width which is determined by the widest item, which is full view width by now (with the stretched items #15330) |
Sure that is feasible, just requires a QStyleOption and computing some of the item/text metrics to get the rect of what we see when the item is selected. Though a proper SidebarItemDelegate would be better, eg. to allow styling drag-hover only with qss. |
|
This does not sound like a no brainer. If you prefer to not spend the time any other improvement is also fine. |
|
The delay customization is ready for testing. |
|
I did a test to get a stylable drag-only hover effect and it seems to work well. Will publish when it's ready. FWIW I already added SidebarItemDelegate for #14508 and the Computer library data view PR. I think this is a solid base for the 'expand when hovering label only' function, but it may collide (UX-wise) with the full-width click responsiveness. |
|
This is ready btw, the issues we discovered are no regressions. |
The default 250 ms is too short for my taste and is a bit annyoing especially when using a trackpad where I not always hit the target on first attempt.
And when this came up in the forums recently I made it customizable.
IMO this is a property like the double-click interval that should be customizable to suits users's needs / capabilities.
Looks like this
