-
-
Notifications
You must be signed in to change notification settings - Fork 746
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
Add option to swap A/B buttons in Settings menu with minimal changes (fix for #2034) #2103
Conversation
if (xTaskGetTickCount() + (*autoRepeatAcceleration) > (*autoRepeatTimer) + PRESS_ACCEL_INTERVAL_MAX) { | ||
(*autoRepeatTimer) = xTaskGetTickCount(); | ||
(*autoRepeatAcceleration) += PRESS_ACCEL_STEP; | ||
} else { | ||
break; | ||
newMode = moveToNextEntry(cxt); |
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.
Just to make sure...
It seems I did everything right here, didn't I?
I'm talking about that fall-through towards newMode = moveToNextEntry(cxt);
in case BUTTON_B_SHORT:
but only if this condition above here is true
, right?
I still do some manual tests & checks, but at least it seems it works just like before. :)
Hmmm... I think there may be a way to keep nearly original |
…tch/case intact but adding another one
Just to make the rationale for this option more straightforward and simple:
The same logic works if a user prefers left-hand orientation, but in a reverse button order obviously. From the code base point of view, the provided solution here for this option seems as the less invasive and the more appropriate. |
Since you asked I had to answer. However, this logic does not hold true for the navigation in the debug menu. It would be beneficial to invert that too, in order to maintain consistency throughout. |
Thank you for your time...
... and thank you for your support!
EXACTLY!!! YES, thanks, that's exactly I was talking about all that time, and that's why I'm so supportive to solve the original bug report #2034 with this option! That's why my brain still just can't adjust to default buttons' "mappings" in the Settings menu, even after all of these years of using my iron.
Hmm... interesting notion - I've never thought of that to be fully honest with you, because I use debug menu very rarely, i.e. way much more rarely than Settings menu, especially when I test & debug some new features and/or options. I will check how it scrolls now and how it will be scrolled with swapped buttons.
Oh, wait... is there any other menus, where there is a way to scroll something being inside of a menu? Settings and Debug only, right? If so, then how about this: we could describe it (in the moving text "tooltip" for the option) as "swap A/B buttons for natural pressing in menus"! As in settings for a touchpad in any modern OS - "natural scrolling": some users like to scroll the screen content sliding fingers upside-down, someone - down-upside. It could be like a checkbox option for touchpads. ;) P.S. Pardon for my nerdiness, and for the fact that I dedicate too much to this, but I like usability & ergonomics made right, and I don't like inconvenient things, because when they are done objectively right & reasonable, it's just a mental pleasure to use them at work, and when they aren't done properly, this is a mental torture for a brain - just look at most of modern interfaces around us today, especially on modern web :/ |
Aha, I see how it works... when I use Debug menu rarely, I don't have any problems, so that's why I even don't remember what buttons do what there... now I see. Well, since Debug menu is displayed by long The only one thing which I would change, though, is the direction of sliding animation for Debug menu (since we're here talking about this) - from down to up, because in general, such information as version, build, etc. is placed on the bottom of interface usually (look at Android or iOS, for example, right?). Build version/date/number is always at the bottom, so from down to up animation would create that natural familiar feeling that a user is scrolling menu down for a debug information. What do you think? |
@Ralim, could you, please, check this pull request for code review, when you have time? Thanks. |
@@ -6,7 +6,7 @@ OperatingMode showDebugMenu(const ButtonState buttons, guiContext *cxt) { | |||
ui_draw_debug_menu(cxt->scratch_state.state1); | |||
|
|||
if (buttons == BUTTON_B_SHORT) { | |||
cxt->transitionMode = TransitionAnimation::Down; |
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.
Any big logic reason for flipping direction?
I dont massively care but curious?
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.
Any big logic reason for flipping direction?
Yeap!... I did decide to use a creative approach for this little glimpse of "usability moment", mentioned it briefly above, I hope it makes sense:
"in general, such information as version, build, etc. is placed on the bottom of interface usually (look at Android or iOS, for example, right?). Build version/date/number is always at the bottom, so from down to up animation would create that natural familiar feeling that a user is scrolling menu down for a debug information."
P.S. Thank you a lot for approving this! I already use this option as always on, and for me this is waaaay much more convenient & easy [for my brain]. 🙏
What kind of change does this PR introduce?
Add option to swap A/B buttons in Settings menu with minimal changes.
What is the current behavior?
In Settings menu
B
/back button works as next/scroll andA
/front as enter/change, while to go to Settings a user must pressB
/back button from Home screen, therefore in the Settings menu - to keep that mental model just created in a brain of a user - the furtherB
/back button press should mean "go in the setting further/change a setting (as enter)", while pressingA
/front button should work as scroll/going back, since a user on a reflex would press front button, because physically & logically it's located as "back" button when a user in the Settings menu. At least already a few users reported, that they would like to have this feature as an option. Original bug reportWhat is the new behavior (if this is a feature change)?
There is a new option to swap A/B buttons for Settings menu.
Other information:
switch/case
operator, I use it everywhere I can myself (partially because it's the essence of the infinite state machine concept), but in this case I don't know how much simpler to implement this option otherwise;if/else
here, we get the less invasive solution possible without a need to overwrite different parts of code all over the code base to track down presses and messing with other functions & methods, and to support all of that with a headache in the future;logic/SettingsMenu
and there is a logic for mechanics in Settings menu including buttons processing (only in the Settings menu), I guess there is no more perfect spot to implement this option;