ankidroid / Anki-Android

AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
GNU General Public License v3.0
7.97k stars 2.16k forks source link

In "Set due date" dialog, label and border line of input boxes can overlap #16200

Closed snowtimeglass closed 1 month ago

snowtimeglass commented 1 month ago

Checked for duplicates?

Does it also happen in the desktop version?

What are the steps to reproduce this bug?

  1. Use a recent repository
  2. Open "Card browser"
  3. Long press a card
  4. Three-dots menu > "Set due date"
  5. Tap the left tab

Expected behaviour

The center has sufficient padding:

https://github.com/ankidroid/Anki-Android/pull/15699

Actual behaviour

In my device, the center doesn't have sufficient padding:

Debug info

AnkiDroid Version = 2.18alpha8-debug (910795a5cb1caa26b121b3d85cab32d4cc2e1b76)

Backend Version = 0.1.36-anki24.04 (24.04 429bc9e14cefb597646a0e1beac6ef140f226b6f)

Android Version = 11 (SDK 30)

ProductFlavor = amazon

Manufacturer = OPPO

Model = CPH2013

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 11; CPH2013 Build/RKQ1.200903.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/123.0.6312.118 Mobile Safari/537.36

ACRA UUID = f74d8c3b-b173-4337-ae0c-819d3934bd5e

FSRS Enabled = false

Crash Reports Enabled = false

(Optional) Anything else you want to share?

N/A

Research

david-allison commented 1 month ago

Thanks! I supplied minEms to ensure that the boxes do not increase/decrease in size, given the days suffix

https://github.com/ankidroid/Anki-Android/blob/8b3f2b07d082b5a25f776559d49f836fcc9d2642/AnkiDroid/src/main/res/layout/set_due_date_range.xml#L42

We can define a different layout based on screen width. Here's a couple of quick suggestions

key: ([xxx days] represents a textbox)

1. vertical

Show card(s) in range:
from:    [xxx days]
to:      [xxx days]

2. remove the days suffix

Show card(s) in range:
[xxx] - [xxx]

Do you have any other proposed designs, or a preference?

snowtimeglass commented 1 month ago

Thank you, too.

Another quick thought: image



Though the layout may be blamed from users who want to review the card next after more than 5 digits days (more than 27 years); conversely, I guess it would be fine for commonly expected number of days.

david-allison commented 1 month ago

In the above suggestion, I believe we'd still have the text boxes overlapping, rather than the dash

snowtimeglass commented 1 month ago

Ah, is that so. Then... I'd prefer "1. vertical" above without : after from and to, as follows

Show card(s) in range:
from    [xxx days]
to      [xxx days]
snowtimeglass commented 1 week ago

Thanks for the PR, but this issue still seems to be unresolved on 2.18beta2 in my device.

AnkiDroid Version = 2.18beta2 (dc5348852b15e0f27521acd3c5457595f4676f54)

Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)

Android Version = 11 (SDK 30)

ProductFlavor = play

Manufacturer = OPPO

Model = CPH2013

Hardware = qcom

Webview User Agent = Mozilla/5.0 (Linux; Android 11; CPH2013 Build/RKQ1.200903.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/123.0.6312.118 Mobile Safari/537.36

ACRA UUID = df169a4d-29ec-46b6-b114-141ca7e01ba3

FSRS Enabled = false

Crash Reports Enabled = true