keyman
keyman copied to clipboard
fix(android): globe key tip repositioning on keyboard height change
Fixes #6734.
An important aspect of #6734 was that the known reproduction involved swapping from a keyboard with predictive text to one without it. This causes an adjustment for the total amount of height 'reserved' for the keyboard, as the predictive text banner is treated as part of the keyboard's area. So, the core of the issue: if the help tip is positioned before the keyboard's height is adjusted, there was no logic to reposition it based on the keyboard's new height.
User Testing
TEST_HELP_TIP_POSITION: on a fresh install of the Keyman app, install a keyboard without predictive text.
- Perform a fresh install of the Keyman app. (Delete any previously-installed version first!)
- When the "Get Started" menu shows up, select the first option and add a keyboard using the keyboard search.
- A couple of good options:
- Tamil99 (
ekwtamil99uni
) - Plains, Cree Syllabics (
nrc_crk_cans
)
- Tamil99 (
- The important part: only pick keyboards that don't have any matching lexical models.
- A couple of good options:
- Follow the standard package installation process from there, clicking "Install" and "Done" as soon as the options are available.
- Rotate the device and ensure the help tip is properly displayed for the new layout.
- This test PASSES if and only if the globe key's help tip is properly aligned over the globe key in both steps 3 and 4. For example,

User Test Results
Test specification and instructions
- 🟥 TEST_HELP_TIP_POSITION (FAILED): the tip is not alighted correctly in both portrait and landscape modes. (notes)
Retesting Template
@keymanapp-test-bot retest TEST_HELP_TIP_POSITION
Test Artifacts
- TEST_HELP_TIP_POSITION (FAILED): After installing Tamil99 Keyboard, I noticed that the Tool tip appears far away from the globe key button. The tool tip properly displayed after rotating the device. But, I got different result while testing it in emulator.
TamilPortrait (Mobile)
TamilLandscape (Mobile)
TamilPortrait (API 30 / Android 11)
TamilLandscape (API 29 / Android 10)
Plains, Cree Portrait(Mobile)
Plains, Cree Landscape (Mobile)
OK, so it may take specific setups to reproduce the failures seen from those tests. I set up a Pixel 4 API 30 (noting the details in the "TamilPortrait" screenshot and was able to get this result with the suggested Cree keyboard:
Interestingly, the opposite rotation resulted in a properly-aligned tooltip:
It's only this one rotation that causes an issue... likely (somehow) due to the system tri-button bar being on the left-hand side. I can rotate the device back and forth; the tooltip's misplacement is very consistent here. The same behavior occurs with the suggested Tamil keyboard as well.
Note: so far, I have been unable to reproduce the behavior seen in this test-result screenshot:
TamilPortrait (API 30 / Android 11)
I'm only getting a properly-aligned tooltip so far; this part is not reproducing for me.
But, at least I do have one reproducible behavior, so... maybe fixing that one will also correct the other? At least there's something to pursue here.
Uh... uh-oh.
It ain't just the globe key having problems in that orientation. That said... this is probably a significant hint regarding the underlying cause of the issue. The subkey menu has similar positioning issues, though it's less obvious from the most readily-accessible screenshots I could take. (sil_euro_latin
tends to have large subkey menus.)
Interestingly, this only happens for the in-app keyboard. The system keyboard is apparently unaffected by both the globe key issue and the subkey menu & key-tip issue mentioned in the previous comment.
While the help tip is blocked for the system keyboard in our release builds, I temporarily enabled & forced it in a dev build on my machine; it is positioned correctly with no effort beyond that.
@bharanidharanj Is the behavior you reported here consistent for you, or does it only trigger sometimes? I've had no luck trying to reproduce this.
- TEST_HELP_TIP_POSITION (FAILED): After installing Tamil99 Keyboard, I noticed that the Tool tip appears far away from the globe key button. The tool tip properly displayed after rotating the device. But, I got different result while testing it in emulator.
TamilPortrait (Mobile)
Tested on Pixel 4 - API30 - Android 11.0.
- TEST_HELP_TIP_POSITION (FAILED): the tip is not alighted correctly in both portrait and landscape modes.
Portrait:
Landscape:
Replaced by #7473.