fix(controls): improve post-assignment dialog - #21571
Conversation
|
First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to AnkiDroid! Please have patience with us as we are all volunteers - we will get to this as soon as possible. |
|
Important Maintainers: This PR contains Strings changes
|
david-allison
left a comment
There was a problem hiding this comment.
Handle the case where the binding is already assigned to 'Show answer': - 'No' will remove it without confirmation.
I'd question using yes/no over more descriptive strings. Material design used to discourage yes/no.
@manocormen FYI - I'll defer to your thoughts here
| val items = | ||
| arrayOf( | ||
| getString(R.string.only_answer), | ||
| getString(R.string.flip_and_answer), | ||
| getString(R.string.dialog_yes), | ||
| getString(R.string.dialog_no), | ||
| ) |
There was a problem hiding this comment.
nit: inline this, we're no longer calling setItems(items)
|
Material 3 seem to still discourage yes/no, so instead we could use:
|
|
@manocormen since we are discussing a more descriptive alert dialog, perhaps you could reconsider my earlier implementation: @david-allison Happy to update the PR once changes are decided. |
|
@Sanjeev-Narang In your earlier design, I liked the concision of "Keep" / "Remove", but I found the dialog at tad confusing in context: we've just assigned a gesture to action1, and now we're told "The gesture is already assigned to action2": to me, it makes it sound like a conflict, so I'd favor Zorn's simpler design (but with descriptive buttons). @david-allison I'm not sure this is on the table, but we could also simplify: remove the secondary dialog altogether. |
Purpose / Description
The 'Only answer' option is supposed to remove the binding from 'Show answer' but it was not doing that. The dialog's appearance was not consistent with the previous subsequent dialogs in controls. Also need to implement option 3 mentioned in the issue.
Fixes
Approach
Before:

After:

How Has This Been Tested?
Unit test, API36
Learning (optional, can help others)
Learnt about controls setting and the issue related codebase of AnkiDroid
Checklist
Please, go through these checks before submitting the PR.