-
-
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
Focus library directly #4369
Focus library directly #4369
Conversation
069e1f0
to
574e8f2
Compare
This would allow to map dedicated navigation buttons found on some controllers. |
I'm not sure this is a great idea. There is no guarantee that future GUI designs will have all of these widgets which could break controller mappings. |
I don't understand the concern. Future GUI designs will still use |
There is no guarantee there will be a sidebar in future designs, or if it exists, that it would always be showing. |
Furtthermore, I think I have some understanding how |
Indeed. But sure there'll be some kind of feature bar or alike, like in https://github.com/mixxxdj/mixxx/tree/jmigual-library-redesign. |
I disagree. I think this is a very useful addition for lots of mappings that were made for serato. If we for some reason don't have a sidebar (or something comparable) we can just ignore the CO. The mapped button on the hardware does become useless, but it kinda was so already at the beginning when there was no CO. Rejecting this PR for a hypothetical in the far future leads to stagnation of progress just as much as bikeshedding. We just need to agree/document that we can drop these COs in the future again otherwise this will lead to lots of bikeshedding too. |
That's a good point. It's not that big of a deal if those buttons stop working. In the worst case scenario the user can use their mouse anyway. |
Can you elaborate? Which specific controllers would this be useful for? It is already confusing how many different ControlObjects there are for navigating the library. What is the benefit of these new ones? Why should they be used instead of the old ones? Should the old ones ever be used?
I don't understand. What does this have to do with the S4 Mk3? |
What is confusing you? The The Reloop Terminal Mix series for example has 4 buttons above the Trax push encoder: As I mentioned a few times already: consider this PR a first step to allow more fine-grained library control. Next step I'm working on: read-only controls for the focus state
I hope that finally clarifies my intention and the value of the new controls. |
I think this is more complexity than mapping developers should have to think about. |
Again, I am skeptical it is a good idea to make mappings responsible for this. If there are different use cases for the same controller designs, I think those should be handled by preferences in Mixxx, not offloaded to users to edit their mappings if they don't like how it works. |
made some stupid mistakes I need to iron out. |
Why not make a preference option to skip the search bar with MoveHorizontal? I'm really skeptical that introducing a third way to map library navigation or leaking implementation details of the library to controller mappings are good ideas. What exactly is the problem this PR solves? Is it unfixable by changing the behavior of the existing controls?
The View button on the S4 Mk3 is designed to maximize the library. I don't understand what that has to do with this PR. |
It seems there are a few common patterns for library navigation on controllers (excluding deck load buttons):
I think there should be exactly one recommended way to map these common patterns. Currently I cannot figure out what that is nor do I understand how this PR helps. |
574e8f2
to
d223291
Compare
You have noticed a use case yourself where current controls are not sufficient to have a satisfying experience with the S4 Mk3. Thus you started https://mixxx.zulipchat.com/#narrow/stream/247619-UI-.26.20UX.20design/topic/library.20search.20.26.20controller.20mappings
The reason you ran into this issue:
you want to map I propose to add a Btw, by now at least 3 devs + me appreciate that. |
What does this have to do with this PR? Without this PR I have to press a button to move focus back to the track table. With this PR there is a different button that could be used for that. Either way I have one button to press... so how is this an improvement?
That is unrelated. That has no impact on the behavior of If the reason for this PR is to move focus from the search bar after typing in it, this branch doesn't do anything to change that.
I have already done this... what do you mean it's not possible?? |
TraktorS4mk3.tracksEncoderTurn(...) {
if (engine.getValue("[Library]", "searchbarHasFocus")) {
script.triggerControl("[Library]", "focusLibraryView", 50);
} else if (engine.getValue("[Library]", "libaryViewHasFocus")) {
engine.setValue("[Library]", "MoveVertical", value - 64);
}
...
}
TraktorS4mk3.tracksEncoderPush(...) {
if (value) {
...
} else { // button release
if (was_longpressed) {
if (engine.getValue("[Library]", "libaryViewHasFocus")) {
script.triggerControl("[Library]", "focusSearchbar", 50);
}
} else { // quick release
if (!engine.getValue("[Library]", "searchbarHasFocus")) {
script.triggerControl("[Library]", "focusSidebar", 50);
} else if (engine.getValue("[Library]", "sidebarHasFocus")) {
script.triggerControl("[Library]", "focusLibraryView", 50);
}
}
}
// etc.
oh, sorry for the confusion. You were asking for simplicity so I was proposing to do all that with just the encoder turn + push only. |
I did not agree this was a design goal or desirable. Whether I have to push the encoder or a different button doesn't really matter; I still have to press something either way. I do not think it is a good idea to make the code so complicated for this slightly different behavior that isn't really better than what is already possible. |
d223291
to
fe2cc41
Compare
Currently only a single button is required to move focus, either |
Update: get COs, read-only, bound to focusEvents so they work with mouse and keyboard focus change, too. This can be tested without controllers with the demo buttons in the lateNight top row. |
Unsure if this is a good name, as we are planning to move away from widgets (and use QML instead) in the future :D But I struggle to come up with a better one, so I guess it's okay. Maybe |
FWIW QML has nothing to do with QWidget, but the QML docu I read so far uses examples like "MySliderWidget", so I think it doesn't make any difference for users how we name this controls. |
8d12415
to
5e29903
Compare
@Be-ing I renamed the CO and the internal control. |
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.
Thank you for you efforts. I have left some comments.
5e29903
to
22bb5b2
Compare
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.
waiting for @daschuer's approval
@daschuer Anything left to do? |
I will do a brief manual test. |
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.
Works good, thank you.
Waiting for the final commit to remove the demo skin. |
without the indirection via sidebar, and without assuming the library is next/after the sidebar.
22bb5b2
to
94f324b
Compare
Thanks, all done. |
Thank you. |
Waiting for CI |
1 Implements an old ToDo in librarycontrol:
focus library directly, without the indirection via sidebar, and without having to assume the library is next/after the sidebar,
2 Adds
[Library], focus_widget
control which allows mappings with more fine-grained library control.For example Trax encoder turn or press can now trigger specific actions per context.
The control holds the internal number of the current lib focus widget:
Internally it's updated by
[widget]FocusChange([widget] | NONE)
signal emitted by each widget'sfocusInEvent
/focusOutEvent
.Valid external updates (from scripts) are 1...n only, verified by each widget's
hasFocus()
functions.ToDo