ankidroid / Anki-Android

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

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

Open Arthur-Milchior opened 2 months ago

Arthur-Milchior commented 2 months ago

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

Closed issues

shamim-emon commented 2 months ago

Please assign it to me!

Aditya13s commented 2 months ago

I am working on it.

Arthur-Milchior commented 2 months ago

@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

shamim-emon commented 2 months ago

@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.

Aditya13s commented 2 months ago

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".

Arthur-Milchior commented 2 months ago

@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

shamim-emon commented 2 months ago

@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.

Arthur-Milchior commented 2 months ago

I added one entry for the browser options

Aditya13s commented 2 months ago

@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

Arthur-Milchior commented 1 month ago

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.

Aditya13s commented 1 month ago

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 commented 1 month ago

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

Giyutomioka-SS commented 1 month ago

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

Giyutomioka-SS commented 1 month ago

@mikehardy It's not completely closed.

mikehardy commented 1 month ago

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

Aditya13s commented 1 month ago

@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.

Arthur-Milchior commented 1 month ago

@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:

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 commented 1 month ago

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.

Giyutomioka-SS commented 1 month ago

@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

Arthur-Milchior commented 1 month ago

Thank you very much for the feedback.. extremely interesting

lakshay6907 commented 1 month ago

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

Aditya13s commented 1 month ago

@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.

shamim-emon commented 1 month ago

@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.

Aditya13s commented 1 month ago

Working on The browser options should probably be scrollable.

Giyutomioka-SS commented 1 month ago

Working on The browser options should probably be scrollable.

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

Aditya13s commented 1 month ago

Working on bigger button to select the answer.

Aditya13s commented 1 month ago

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

lakshay6907 commented 1 month ago

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

david-allison commented 1 month ago

@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

Arthur-Milchior commented 4 weeks ago

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

Aditya13s commented 4 weeks ago

I'm looking into it.

Arthur-Milchior commented 4 weeks ago

I edited the description to separate the few issues that remains at the top, the infeasible issues in the middle and the closed one at the bottom.

I want to keep the infeasible one listed so that any one else that found the issue would know we are aware of it and it's a deliberate choice

Arthur-Milchior commented 3 weeks ago

I just added Image

Giyutomioka-SS commented 3 weeks ago

I just added Image

Looking into this.