Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

Improve the dialogs in the Controls screen

Open ZornHadNoChoice opened this issue 8 months ago • 40 comments

Bugs

  • When adding a gesture/key binding to one of the 4 answer actions, a dialog is supposed to appear to ask the user whether they want the action to also show the answer (see reference 1). When tapping on the "Previews" tab then "Reviews", this dialog doesn't appear.
  • When adding a gesture/key binding to one of the 4 answer actions, that is already assigned to the show answer action, or vice versa, a warning appears (see reference 2).
  • The logic for overriding gestures/actions is flawed.
    • See reference 3 with the "Touch bottom right" gesture.
    • There should be only one action corresponding to a given gesture at a time.
    • Assigning an already used gesture to a another action on the same side (or both sides) should add it to this new action and remove it from the old one.
  • Not sure if this counts as a bug, but I noticed in https://github.com/ankidroid/Anki-Android/pull/20701 that the dialog which asks the user if they want the gesture to be "Only answer" or "Flip and answer" does nothing when the gesture is already assigned to "Show answer". Possible solutions:
    • The gesture is removed from "Show answer" if the user selects "Only answer".
    • The dialog isn't shown at all in this case.
    • Change the wording of the dialog to something like "Also assign to Show answer?" and have "Yes"/"No" buttons.

Other tasks

The following dialogs' titles should be bigger like the others:

  • Toggle orange, green, turquoise, and purple flags (in both the "Reviews" and "Previews" tabs).
  • Previous card info.
  • Close study screen.
  • Toggle whiteboard.
  • Toggle auto advance.
  • Toggle backside only.

Reference dialogs

Image

Image

Image

ZornHadNoChoice avatar Mar 17 '26 03:03 ZornHadNoChoice

@22oo1cso56mansoorkhan-cell Hi, if you're still looking for an issue, you can take this one.

I can't assign you for some reason, so maybe you need to comment here first.

I feel like this one is a bit bigger than the other sub-issues. I hope you don't mind.

ZornHadNoChoice avatar Mar 17 '26 03:03 ZornHadNoChoice

Ok I Gladly accept the issue...pls assign me.

https://github.com/user-attachments/assets/36527f7b-e506-44a6-be6f-1192e03bb522 The second half of the Issue is working fine already.....

If I misunderstood the 2nd half issue pls explain me.....

I'm not sure what you mean by the second half since your video seems to be about the third bug.

Steps to reproduce the third bug:

  1. Add the touch bottom gesture to the good action.
  2. Add the question only touch bottom gesture to the red flag action.
  3. Add the double sided touch bottom gesture to the orange flag action.
  4. Add the answer only touch bottom gesture to the green flag action.

You can also do other variations such as using the show answer action instead of the good action.

ZornHadNoChoice avatar Mar 17 '26 17:03 ZornHadNoChoice

Got it 👍🏻... If any help required I will make sure to ping

https://github.com/user-attachments/assets/d69f497a-70cd-4288-b9ed-46d5b30ef5cc

I have solved the 1st bug....1). When tapping on the "Previews" tab then "Reviews", this dialog doesn't appear. Should I make the pr

Could you explain me the 2nd bug ...In detail....I didnt get properly..

My understanding of 2nd bug: Show answer can have same gesture/key/joystick(MOTION) as 4 answer actions and vice versa....So no need to raise the warning

The show answer action only works on the front side of a card. The 4 answer actions only work on the back. Thus, there is no way they can overlap and the user is allowed to use the same gesture for the show answer action and the good action at the same time, for example.

However, a warning still appears. This is the bug.

Note that the warning between the 4 answer buttons is intended (e.g. you can't have swipe right, for both "Good" and "Again").

ZornHadNoChoice avatar Mar 19 '26 10:03 ZornHadNoChoice

Should I make the pr for the 1st bug...Or at a time 3 bugs one pr..???

I have no idea! I guess you can ask the maintainers on their discord server or just open a PR with all three and see what they have to say.

ZornHadNoChoice avatar Mar 19 '26 17:03 ZornHadNoChoice

Should I make the pr for the 1st bug...Or at a time 3 bugs one pr..???

Yes, please create separate PRs for each bug. It makes the review process clearer and faster, and helps us merge changes more easily

sanjaysargam avatar Mar 19 '26 17:03 sanjaysargam

Image

pls help me out,,,,,when I am making a pr.. I am getting this error....I have gone through the guide but still didnt get any help

Finally sent the PR....for the 1st bug....

Image

Review is required

I can try solving this issue kindly assign this issue to me

chiragdebugs avatar Mar 20 '26 11:03 chiragdebugs

Read the comments above.

ZornHadNoChoice avatar Mar 20 '26 11:03 ZornHadNoChoice

https://github.com/user-attachments/assets/dff5d9c0-08ba-44ac-b468-08654b95147f

I have solved the 2nd Bug: When adding a gesture/key binding to one of the 4 answer actions, that is already assigned to the show answer action, or vice versa, a warning appears

can i proceed for the pr....???

3rd Bug: The gestures for each flag and must be different including the actions (Question and answer, Question, Answer)...If used the same gestures then that new should be updated and old one should be removed..

Example: Red flag added gesture "Touch Bottom" and clicked on question..It should be updated first..since by default no other gestures were given previously ....

Then Orange flag added gesture "Touch Bottom" and clicked on question..It should be removed from the red flag and fix that to Orange Flag (This feature is already Ok as I disscussed this earlier in chat)

Now the main thing: Then green flag added gesture "Touch Bottom" and clicked on answer...It is directly being updated which is the bug.. The Orange flag gesture should be removed (This is the main task to solve the bug)

Did I go correct?? Any suggestions in my understanding....

The bug 2 fix video looks good.

I don't think you followed the steps for bug 3 correctly. See https://github.com/ankidroid/Anki-Android/issues/20504#issuecomment-4076805885. You can get to the state in the screenshot in the issue description, that is, three flags with the same gesture, but one is question only, one is answer only, and one is both.

ZornHadNoChoice avatar Mar 20 '26 14:03 ZornHadNoChoice

I have make the pr regarding the 2nd bug

I am making 1 commit for fixing 1 bug and then directly making a push and then pr.....Should I make more commits for 1 bug....Since I got this msg "You might consider squashing the commits to keep the history clean. Maintainers usually prefer that."