Skip to content

Conversation

@BrayanDSO
Copy link
Member

@BrayanDSO BrayanDSO commented Jan 8, 2026

Purpose / Description

On Anki Desktop, the "Answer" keybinds only work on the answer side, and that can be a source of confusion between the apps.

As we now allow setting gestures/keybinds to an specific card side, restricting the "Answer [again/hard/good/easy]" commands to the answer side makes sense.

to avoid disrupting the users' workflow because of their previous "show answer" functionality, the bindings are correctly copied to "Show answer" if set to the question side

Also, there's a new dialog for setting the previous Flip and answer behavior

Approach

In the commits

How Has This Been Tested?

Unit tests + Emulator 31

Before upgrade Screenshot_20260108_133704
After upgrade Screenshot_20260108_134156
Screen_recording_20260108_211222.mp4

Checklist

Please, go through these checks before submitting the PR.

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

@BrayanDSO BrayanDSO force-pushed the ref/centralize-actions branch from ebff259 to 6686efb Compare January 8, 2026 17:12
@BrayanDSO BrayanDSO marked this pull request as draft January 8, 2026 17:16
@BrayanDSO BrayanDSO force-pushed the ref/centralize-actions branch from 6686efb to 685a0cd Compare January 8, 2026 17:20
@BrayanDSO BrayanDSO marked this pull request as ready for review January 8, 2026 17:20
@BrayanDSO BrayanDSO force-pushed the ref/centralize-actions branch from 685a0cd to ca8dea1 Compare January 8, 2026 18:09
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just doing a quick first-pass review:

Is this a UX regression, in that a user now has to select two actions to perform a 'flip and answer X'

If so, is there any way we can special-case these actions with a checkbox/dialog to save the user time and confusion?

@BrayanDSO
Copy link
Member Author

BrayanDSO commented Jan 8, 2026

Is this a UX regression, in that a user now has to select two actions to perform a 'flip and answer X'

If it is a UX regression, depends on what the user expects. Based on the familiarity with AnkiDroid, they may expect "flip and answer". Based on the familiarity with Anki Desktop and the command names, they may expect "answer"

Besides the preference upgrade, putting 1, 2, 3, 4, etc as default keybindings for the answer buttons may reduce most of the rest of the AnkiDroid familiarity issue.

But in general, it is something that people will complain at the beginning and get used to the more correct approach later.

If so, is there any way we can special-case these actions with a checkbox/dialog to save the user time and confusion?

I'm not sure how are you envisioning that. My first impression is to wait for the confusion to pass.

@david-allison
Copy link
Member

david-allison commented Jan 8, 2026

I'm not sure how are you envisioning that.

After a user submits a gesture, we currently show the 'Select card side' dialog

image

Replace this with a similar dialog asking if the command should also flip the card if selecting the answer buttons

@david-allison
Copy link
Member

There's no point in having the Q: and A: specifiers on Show answer and Answer X if the commands are unambiguous

@BrayanDSO BrayanDSO force-pushed the ref/centralize-actions branch from ca8dea1 to e009f2e Compare January 9, 2026 00:12
@BrayanDSO
Copy link
Member Author

BrayanDSO commented Jan 9, 2026

Feedback addressed. Thanks for the push!

Screen_recording_20260108_211222.mp4

@BrayanDSO BrayanDSO changed the title feat: restrict "Answer" commands to the answer side feat: change "Answer" commands setup Jan 9, 2026
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent, thank you!!!!

@david-allison david-allison added Strings Needs Author Reply Waiting for a reply from the original author labels Jan 9, 2026
@BrayanDSO BrayanDSO force-pushed the ref/centralize-actions branch from e009f2e to 545a450 Compare January 9, 2026 10:22
@BrayanDSO BrayanDSO removed the Needs Author Reply Waiting for a reply from the original author label Jan 9, 2026
Copy link
Member

@david-allison david-allison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cheers

@david-allison david-allison added Needs Second Approval Has one approval, one more approval to merge and removed Needs Review labels Jan 9, 2026
removed some tests in ReviewerKeyboardInputTest as fixing them isn't worth it given that the old study screen will be eventually removed
instead of the ViewerCommand Enum, which will be eventually removed
instead of the ViewerCommand Enum, which will be eventually removed
which is more correct and matches Anki Desktop

to avoid disrupting the users' workflow because of their previous "show answer" functionality, the bindings are correctly copied to "Show answer" if set to the question side
should be squashed with the last commit.

Split to ease the reviewing process
@BrayanDSO BrayanDSO force-pushed the ref/centralize-actions branch from 545a450 to 5e0aed2 Compare January 10, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Second Approval Has one approval, one more approval to merge Strings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants