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

UI can't be entirely read when text size is big

Open Arthur-Milchior opened this issue 1 year ago • 36 comments

How to reproduce:

Increase the size of the text on your phone. The exact way to do it depends on the device. On my pixel, it's

Settings > Display > Display and text size > Font size > put the slider to the right (maybe not the exact wording, my device is in French

Then just use the app, and look at all the missing texts. Maybe you'll also need to switch to a language which is more verbose than English, such as French or German. Don't worry if you don't speak the language, the fact that there is text that can't be read or even clicked should still be obvious.

Here is all the issues I found. Please create one PR for each of the issue below, for the ease of review. Don't ask to be assigned to it, just tell us which issue you're working on, if any. If you find issues I missed, please add them in comment in this issue.

We'll be able to close this issue when all of the issues listed below are solved.

Open issues

  • [ ] Welcome page, the "Remember more" text is badly positioned.
    • Screenshot

      Image

  • [ ] Deck options
    • Related: https://github.com/ankidroid/Anki-Android/issues/17366

    • Screenshot

      Image

  • [ ] The footer of the deck picker should be multiple lines.
    • https://github.com/ankidroid/Anki-Android/issues/14641

    • Screenshot

      2024-09-21-172404_361x775_scrot

Probably infeasible issues

  • [ ] Menus should display the entire text of the entry, even if texts multiple lines. (Probably not feasible)
    • Screenshot

      2024-09-21-172053_361x811_scrot

  • [ ] Deck (Paquet de cartes) should potentially be multiline, and probably not take more than, let's say, 40% of the width. This display is nonsense. Probably not worth fixing it as this note editor will disappear
    • Screenshot

      image

Closed issues

  • [x] In this case, I think i'd like a bigger button to select the answer.
    • Screenshot

      image

  • [x] "rename" cover "delete", instead if there is not enough room, it should go to a new line.
    • Screenshot

      image

  • [x] I guess it's okay here if "ankidroid" can't be read entirely. But the subtitle with the number of cards to review seems like it should take multiple line. Or, if not possible, long pressing on it should show the content in a tooltip. This is a general issue that occurs in almost every activity.
    • Screenshot

      2024-09-21-172404_361x775_scrot

  • [x] "Navigateur de " and other text should potentially be multi-line if needed.
    • Screenshot

      image

  • [x] The browser options should probably be scrollable.
    • Screenshot

      2024-09-23-010524_373x838_scrot

Arthur-Milchior avatar Sep 21 '24 15:09 Arthur-Milchior

Please assign it to me!

shamim-emon avatar Sep 22 '24 07:09 shamim-emon

I am working on it.

Aditya13s avatar Sep 22 '24 12:09 Aditya13s

@shamim-emon Have you read the issue ? Fully read it? I literally wrote:

Don't ask to be assigned to it, just tell us which issue you're working on, if any.

Relatedly @Aditya13s I'd appreciate if you could tell us which of the many issue you're working on. Ideally, I'd prefer if you could only attack one the many issue I listed, unless you expect you can save all of them very quickly, just to ensure we can paralellize the work to multiple volunteers

Arthur-Milchior avatar Sep 22 '24 14:09 Arthur-Milchior

@shamim-emon Have you read the issue ? Fully read it? I literally wrote:

Don't ask to be assigned to it, just tell us which issue you're working on, if any.

@Arthur-Milchior apologies, my bad. I'm picking "Navigateur de " and other text should potentially be multi-line if needed.

shamim-emon avatar Sep 22 '24 14:09 shamim-emon

Relatedly @Aditya13s I'd appreciate if you could tell us which of the many issue you're working on. Ideally, I'd prefer if you could only attack one the many issue I listed, unless you expect you can save all of them very quickly, just to ensure we can paralellize the work to multiple volunteers

I am working on "rename" cover "delete".

Aditya13s avatar Sep 22 '24 16:09 Aditya13s

@shamim-emon and @Aditya13s can you also specify what solution you intend to use (if you already know). So that we can confirm whether the change is acceptable to us. After all, it's a UI decision. If you're on our discord server, ideally, just show a screenshot or a note in the ankidroid-ui room so anyon can react quickly

Arthur-Milchior avatar Sep 22 '24 16:09 Arthur-Milchior

@Arthur-Milchior I haven't had a chance to think this trough yet. Please bear with me as I'm new to the repo. Once I have something, I will be sure to ping in the ankidroid-ui room on discord server for confirmation. Hope that's alright.

shamim-emon avatar Sep 22 '24 16:09 shamim-emon

I added one entry for the browser options

Arthur-Milchior avatar Sep 23 '24 00:09 Arthur-Milchior

@Arthur-Milchior Please look this screenshot. I added maxWidth in buttons, is it looking fine or i have to change it.

WhatsApp Image 2024-09-25 at 23 52 32

Aditya13s avatar Sep 25 '24 18:09 Aditya13s

Hi,

As I mentioned in Discord, I'm not a huge fan. No offense meant.

Modifi er les cartes

is really bad.

Admittedly, it's better than the current state. And I assume that, in English, with standard text size, it does not change the way this is presented. Which is great, I want, ideally, that we don't change the version that is not broken

However, I'd also really love that "Modifier les cartes" appears on a single line. And same for the two other buttons. So, I guess that we should add keep "supprimer" (delete) on the same line if it is distant from "renommer" (rename), and put it on the line below if it's not possible. Then, same with "renommer". Given how long "Modifier les cartes" is, we may also want to push "renommer" to its own line if it does not fit.

Arthur-Milchior avatar Sep 28 '24 01:09 Arthur-Milchior

imgonline-com-ua-resizePERCrQYswUphM7tc imgonline-com-ua-resizePERCbdhLFjnYh3B4

@Arthur-Milchior there are the changes which i have done. I added a helper widget named flow which dynamically adjust the button itself according to the text length and size. Should i make a pull request if it's good?

Aditya13s avatar Sep 29 '24 08:09 Aditya13s

Working on Menus should display the entire text of the entry, even if texts multiple lines.

Aditya13s avatar Sep 30 '24 07:09 Aditya13s

Working on "The browser options should probably be scrollable."

Giyutomioka-SS avatar Sep 30 '24 12:09 Giyutomioka-SS

@mikehardy It's not completely closed.

Giyutomioka-SS avatar Sep 30 '24 16:09 Giyutomioka-SS

Indeed! Missed that the merge I just did marked it as Fixed vs just referencing it. Thanks @Giyutomioka-SS

mikehardy avatar Sep 30 '24 16:09 mikehardy

@Arthur-Milchior I was searching for the issue regarding the Menus should display the entire text of the entry, even if texts multiple lines and found out that there is no option to make menu titles multiline.

Aditya13s avatar Oct 01 '24 14:10 Aditya13s

@Arthur-Milchior I was searching for the issue regarding the Menus should display the entire text of the entry, even if texts multiple lines and found out that there is no option to make menu titles multiline.

Thank you for letting me know. I'd appreciate if you could be more explicit. There are two important informations that I'd love to have.

what are you expecting from me?

I can imagine that you'd want:

  • me to declare this issue closed.
  • That you want help to learn how to do it.
  • my opinion about whether I agree or not with you.
  • That you want to let someone else consider the issue.
  • That we find an alternative solution?

how did you discover that it's not possible?

Anyone that will try to solve the issue will need to do the same research. Anyone that try to find alternative needs to know exactly what is impossible.

With all due respect, I don't know you enough to be certain that I can close the issue as not fixable.

Arthur-Milchior avatar Oct 01 '24 21:10 Arthur-Milchior

I tried to take a look at menu entry. I admit what surprises me the most is not that the menu items can't get a new line. It's that when I search this problem online, I find no discussion of long text in menu entry.

The best I can find is that there is a android:titleCondensed property, that seems mostly useless as far as I can tell.

The best solution would be to ensure that all strings in menus are at most 29 characters long. (I counted the number of strings actually shown, on a small string, with text at max size), so adding maxLength="29". I guess 29 character seems reasonable for a menu entry anyway.

And then we'd have to hope the translators can actually find smaller strings (and maybe get a warning they need a new translation)

I considered adding tooltip. That each menu item has a tooltip with its title. I tried it both by adding the tooltip value in the xml, and by creating a function that, when a menu is inflated, also adds the tooltip when its missing. It just doesn't do anything when I long press the menu entry. It should show a tilte, but the title valu eis just ignored, I've no idea why.

Arthur-Milchior avatar Oct 02 '24 02:10 Arthur-Milchior

@Arthur-Milchior, I also tried adding a tooltip to the subtitle with the number of cards to review. I attempted various approaches, but the result was the same—on long press, nothing happened. However, when I tried this one particular method, the tooltip appeared, but it disrupted the title. I’ve attached a screen recording for reference.

                // Create a custom TextView for the subtitle
                val subtitleTextView = TextView(this)
                subtitleTextView.text = subTitle
                subtitleTextView.maxLines = 1
                subtitleTextView.ellipsize = TextUtils.TruncateAt.END

                // Check if the subtitle is too long, if so, set a tooltip
                if (!subTitle.isNullOrEmpty() && subtitleTextView.paint.measureText(subTitle) > subtitleTextView.width) {
                    TooltipCompat.setTooltipText(subtitleTextView, subTitle)
                }

                // Set the custom TextView as the subtitle
                supportActionBar!!.customView = subtitleTextView
                supportActionBar!!.setDisplayShowCustomEnabled(true)

https://github.com/user-attachments/assets/d65784cf-10bb-42c0-bf6e-b6250bd21d61

Giyutomioka-SS avatar Oct 02 '24 05:10 Giyutomioka-SS

Thank you very much for the feedback.. extremely interesting

Arthur-Milchior avatar Oct 02 '24 11:10 Arthur-Milchior

@Arthur-Milchior I am picking up the "Deck (Paquet de cartes)"

lakshay6907 avatar Oct 02 '24 14:10 lakshay6907

@shamim-emon Are are working on "Navigateur de " and other text should potentially be multi-line if needed? If not then i will work on this.

Aditya13s avatar Oct 07 '24 10:10 Aditya13s

@shamim-emon Are are working on "Navigateur de " and other text should potentially be multi-line if needed? If not then i will work on this.

Sure, go ahead with it.

shamim-emon avatar Oct 07 '24 10:10 shamim-emon

Working on The browser options should probably be scrollable.

Aditya13s avatar Oct 08 '24 17:10 Aditya13s

Working on The browser options should probably be scrollable.

@Aditya13s, The issue has already been fixed. Please look into the other ones.

Giyutomioka-SS avatar Oct 08 '24 17:10 Giyutomioka-SS

Working on bigger button to select the answer.

Aditya13s avatar Oct 08 '24 17:10 Aditya13s

@lakshay6907 Are you working on "Deck (Paquet de cartes)"?

Aditya13s avatar Oct 10 '24 13:10 Aditya13s

@Aditya13s No I am not working on this currently. If you want you can continue with this.

lakshay6907 avatar Oct 10 '24 13:10 lakshay6907

@Arthur-Milchior Given that 'Note Editor' shouldn't be open for work, is there anything left here?

If so, could this be split into a GitHub task list to make it easy to see remaining tasks

david-allison avatar Oct 11 '24 12:10 david-allison

Image is a new issue I just discovered. I'll move to task list, thanks

Arthur-Milchior avatar Oct 27 '24 13:10 Arthur-Milchior