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

Improve the "Reposition new cards" dialog

Open ZornHadNoChoice opened this issue 8 months ago • 11 comments

The "Reposition new cards" dialog

Image

  • Put a limit on the numbers.
  • If either of the boxes is empty, the OK button should be disabled.
  • Replace "OK" with a more useful string, such as "Reposition".
  • Make the title bigger (see reference).

Reference dialog

Image

ZornHadNoChoice avatar Mar 14 '26 19:03 ZornHadNoChoice

Replace "OK" with a more useful string, such as "Reposition".

TR.actionsReposition() should be used here

david-allison avatar Mar 14 '26 19:03 david-allison

I'll work on this issue. ETA: 24 hours.

dagangtj avatar Mar 14 '26 19:03 dagangtj

Hi @david-allison I was also exploring this dialog while working on issue #18553.

I implemented the following changes locally:

  • Replaced OK with TR.actionsReposition()
  • Disabled the positive button when either input field is empty
  • Added an InputFilter to limit the number of digits that can be entered in the Start position and Step fields

I also tested the behavior in the Android Mobile, and these are the screenshots demonstrating the validation and input limits.

Since this issue is already assigned and a PR is open, I didn’t open a competing PR. If it would be helpful, I can submit a small follow-up PR with these changes or contribute them to the existing PR. Otherwise I’m happy to leave the implementation to the current assignee.

Thanks!

Screenshots

vinay-singh-dev avatar Mar 15 '26 04:03 vinay-singh-dev

Let's come back to this when the linked PR is closed. No point in making a decision now

Feel free to chime in on the PR with thoughts

david-allison avatar Mar 15 '26 14:03 david-allison

That was quick.

@vinay-singh-dev feel free to submit a PR, or request that you're unassigned.

Please explain the maximum number which was selected. InputFilter may not be sufficient, and you may want to use the maximum value which the backend will accept, along with testing to ensure that the backend 'max' value does not change

david-allison avatar Mar 15 '26 14:03 david-allison

@vinay-singh-dev I added one more task: make the title bigger. Also, one of your screenshots shows a scrollbar in the dialog which doesn't look right.

ZornHadNoChoice avatar Mar 15 '26 14:03 ZornHadNoChoice

@ZornHadNoChoice I believe they're using a custom font on their phone and the title is a 'regular size'

david-allison avatar Mar 15 '26 14:03 david-allison

It still looks smaller than most dialog titles.

Image

ZornHadNoChoice avatar Mar 15 '26 14:03 ZornHadNoChoice

Right you are! Needs fixing

david-allison avatar Mar 15 '26 15:03 david-allison

i will raise a pr soon with suggested changes.

vinay-singh-dev avatar Mar 15 '26 19:03 vinay-singh-dev

@ZornHadNoChoice i will raise a pr with requested changes for review in 24 hours.

vinay-singh-dev avatar Mar 16 '26 08:03 vinay-singh-dev