Skip to content
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

[Bug] Same gesture cannot be assigned to more than one action #13816

Closed
4 tasks done
shundred opened this issue May 8, 2023 · 9 comments
Closed
4 tasks done

[Bug] Same gesture cannot be assigned to more than one action #13816

shundred opened this issue May 8, 2023 · 9 comments
Labels

Comments

@shundred
Copy link

shundred commented May 8, 2023

Reproduction Steps
  1. Go to Settings -> Controls
  2. Assign double touch gesture to "Show answer"
  3. Now Assign double touch gesture to "Answer recommended (green)"
Expected Result

Gesture assigned to both actions

This used to work on last stable release. FRONT AND BACK OF A CARD CAN HAVE SAME GESTURE FOR DIFFERENT ACTION WITHOUT ANY PRACTICAL CONFLICT.

Although if a gesture is assigned to "Answer recommended (green)" it also works for "Show answer" even if it is not set for that.

So, a simple solution can be to add a note there to mention this behaviour.

Actual Result

"Already bound to show answer"

Screenshot_20230508-051336_AnkiDroid.png

Debug info

Refer to the support page if you are unsure where to get the "debug info".

Research

Enter an [x] character to confirm the points below:

  • I have read the support page and am reporting a bug or enhancement request specific to AnkiDroid
  • I have checked the manual and the FAQ and could not find a solution to my issue
  • I have searched for similar existing issues here and on the user forum
  • (Optional) I have confirmed the issue is not resolved in the latest alpha release (instructions)
@timrae
Copy link
Member

timrae commented Jul 17, 2023

Just picked up the app for the first time in a while, and noticed this issue very quickly. It's quite annoying as swipe left used to be the default for both show answer and 'good'... I'm wondering if any of the current maintainers are using gestures? 🤔

P.s. Thanks for the workaround OP, I'd forgotten about this

if a gesture is assigned to "Answer recommended (green)" it also works for "Show answer" even if it is not set for that

@BrayanDSO
Copy link
Member

I don't see more use cases where that would be useful besides show answer/answer X, while I can imagine a lot of misbehaviors with multiple actions for the same gesture.

Would being able to separe gestures in the question and answer modes, like assigning keys, work for you?

@BrayanDSO BrayanDSO added the Needs Author Reply Waiting for a reply from the original author label Aug 31, 2023
@mikehardy
Copy link
Member

mikehardy commented Aug 31, 2023

This may be a case where we respect the user's intelligence + intention rather than trying to put guardrails around things

I can imagine a few different gesture combinations where it is legitimate to have the same gesture bound to multiple actions, but I can't think of a way to cleanly separate what we should allow and what we should not allow. (would we mark certain actions as "okay to multiple bind", if so, in what circumstances? we should maintain a list per gesture of where the multiple binding is okay? and keep that up to date? something else? )

So what if we redefine the problem as "binding the same gesture to multiple actions could be problematic", then rather than prevent it, accept as a solution user education followed by user trust.

Specifically - if a user attempts to bind a gesture to an action and the gesture is already bound, open a dialog explaining "this gesture already has one or more bindings:", list the current bindings, then have a prompt that says something like "are you sure you want to bind this gesture to this action as well?" then a yes no

Thoughts?

@timrae
Copy link
Member

timrae commented Aug 31, 2023 via email

@shundred
Copy link
Author

Allowing user to experiment and break app is not a good idea, because in some cases they may not get any error notification at all.

I see two main "conditions" here

  1. User is on the front side of card
  2. User is on the back side of the card

Based on these "conditions" in this case we can divide the gestures into three categories

  1. Gestures required only on front side. eg. Show answer
  2. Gestures required only on back side. eg. Answer recommended (green)
  3. Gestures required on both side. eg. Bury card

But the main question here is if there is a way for app to get side of the card being shown to user and take action base on :-

  1. side being shown
  2. input gesture
  3. and the action set for that gesture in settings

I see two reasons to do some development on this side

  1. with the ability to distinguish between the side shown to user and take action based on that will be useful for other input types also eg keyboard, or any remote control.
  2. This will give ability to hide the buttons on the bottom completely which is good for small screens (flip/fold phones)

@dae
Copy link
Contributor

dae commented Sep 1, 2023

The way AnkiMobile handles this for taps is that the front and back side are treated as distinct, so if you want the same thing to happen on front and back, you have to set both of the gestures to do the same thing. Its swipe gestures are global though.

(off topic: @timrae: saw you're working at NI these days, which is cool - my wife is into music, and uses one of their keyboards. Also, the dream you mentioned in #5805 (comment) is finally here with #14171! Hope you're well.)

@BrayanDSO
Copy link
Member

But the main question here is if there is a way for app to get side of the card being shown to user and take action base on :

Yeah, all of that is possible

@BrayanDSO BrayanDSO removed the Needs Author Reply Waiting for a reply from the original author label Sep 1, 2023
Copy link
Contributor

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

Copy link
Contributor

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Feb 28, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants