-
-
Notifications
You must be signed in to change notification settings - Fork 197
Fix detection of keys on emoji popups with long descriptions #1790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
How can I reproduce this issue? |
|
Try the hand with index finger and thumb crossed emoji. |
|
I don't think I can reproduce your issue. Though a description of expected vs observed behavior, plus more information that allows me to see where the emoji and popup are located might help. On my Android 10 phone I had to override the Android version that's used for emojis. Depending on what I use, the hand with index finger and thumb crossed emoji is either in the left column, or on second from right. When it's in the left column, everything seems to work fine, but this is obviously not where you descripted an issue. Anyway, in this case there is the minor change with this PR that the "default" popup key usually isn't selected when not moving the finger after long pressing. This may also happen without the PR, but only rarely. When the hand with index finger and thumb crossed emoji is in the second colum from the right, without the PR there is the already known offset between default popup and key on the emoji keyboard. |
|
For me, the hand with index finger and thumb crossed emoji is also in the second column from the right. Without the PR, the selected popup key is about 1.5 key widths to the right of my finger (initially, the rightmost key is selected). With this PR, the selected popup key is directly above my finger (initially, the second-from-right key is selected). |
This is an issue that should be fixed. I very much agree the offset is ugly and unnecessary, but switching from UI weirdness to unexpected long-press behaior is not a good deal. I don't know how the rearrangement of the popup keys is done / triggered, but using it should solve the issue.
Seems to happen because the initial coordinates may be outside the popup panel due to removal of coordinate translation. |
Why is it unexpected? Does the order of skin tones matter?
I can't reproduce this. Can you please share an example?
The problem is that in |
It's actually light by default, or none if the user set the default tone to light
I find this unexpected, and I just noticed it.
Can you please explain? In contrast to alpha keyboard popups, I think having a consistent emoji popup order is more important than having a consistent default emoji popup key. It's very tricky to fix both the offset and the default key. AFAICT, this issue only affects this one emoji, so maybe we can leave it as is? |
I had intended something else, but apparently failed to check properly. Anyway, now this behavior is default and I wouldn't change it without a good reason.
You cannot have constant order, always the same skin tone on long press, and initially selected popup on top of the base key.
I agree on this, but we need to take into account what people are used to. I find it even more important to avoid changes in behavior when no one is asking for it.
When you use a different default skin tone there are many more affected. There even is some misalignment when the base key is in one of the 3 leftmost colums and the text is so long the right edge alignment kicks in. |
Don't you and I count as users? 🙂
This gave me an idea. I reverted the previous commits, and cancelled the alignment, keeping the popup keyboard in its original location regardless of description length, which fixes both the offset and the default key. There are multiple ways to align the description above the popup keyboard:
Which one do you prefer? |
Oh we definitely do! On this particular thing though no one asked for a change in several years (counting OpenBoard), and also you didn't seem to notice until I pointed it out.
I didn't think it though, but I tested and like the committed version,. There is one minor glitch with the key shown as selected (on the first longpress without moving the finger), when often a wrong key is initially selected. As far as I understand, this happens because |
I can't reproduce this, but changing the order makes sense. Done. Looks like I broke it in #1542. I'm seeing a similar issue though: if I press the bottom part of the emoji key (especially with high Emoji view font scale values), no popup key is selected until I slide my finger up. Is that intentional? |
Definitely not. |
|
Fixed. |
|
Working great now, thanks! |

When an emoji with variants has a long description, which causes the popup keys to be justified to the right, keys were not detected correctly.