fix(ios): bad initial in-app layout, delayed banner
Fixes #10859.
This fixes a layout issue that, upon the app's first load, can cause the keyboard to receive twice the intended adjustment for its vertical placement as intended, which tended to result in a clipped banner.
Additionally, now that we always show a banner no matter what, this PR also removes the logic that enabled us to change the keyboard size based upon whether or not we were showing it. (Before, that logic assumed "no banner" for its initial size values; the space was then allocated for the banner later.) This prevents the component of the issue in which the keyboard would be too short on the first load.
User Testing
TEST_IPHONE_13: Using the original test device from which #10859 was reported, verify that the issue is resolved.
- Install this PR's test artifact.
- Open Keyman In-app.
- Enable "Don't show again" radio button from the Get Started menu.
- If it is already enabled from a prior install, disable that toggle, force-quit the application, and restart from step 1.
- Force-quit the application.
-
To force-quit an app on an iPhone X-style device, drag up from the bottom about halfway and release. You should see a "carousel" of all apps open on the device.
Visual aid (dropdown)
- If using Simulator, you can also double-tap the Home button.
- If you return to the Home screen, you dragged too far.
-
From there, flick upward on the app (Keyman) you wish to close.
-
- Open Keyman In-app.
- Verify that the keyboard is properly laid out and looks "correct".
- Rotate the device to landscape and verify that the keyboard displays correctly.
- Return to portrait orientation and verify that the keyboard displays correctly.
- Verify that the system keyboard also displays correctly in both orientations.
TEST_IPHONE_SE: Using an iPhone SE test target (real or Simulated), verify that the keyboard displays correctly.
- Install this PR's test artifact.
- Open Keyman In-app.
- Enable "Don't show again" radio button from the Get Started menu.
- If it is already enabled from a prior install, disable that toggle, force-quit the application, and restart from step 1.
- Force-quit the application.
-
To force-quit an app on an iPhone SE-style device, simply double-tap the Home button. You should see a "carousel" of all apps open on the device.
Visual aid (dropdown)
-
From there, flick upward on the app (Keyman) you wish to close.
-
- Open Keyman In-app.
- Verify that the keyboard is properly laid out and looks "correct".
- Rotate the device to landscape and verify that the keyboard displays correctly.
- Return to portrait orientation and verify that the keyboard displays correctly.
- Verify that the system keyboard also displays correctly in both orientations.
Note: this PR does not fix #10847. You may experience related issues when swapping the active keyboard in system-keyboard mode; that should not fail these user tests.
User Test Results
Test specification and instructions
- ✅ TEST_IPHONE_13 (PASSED): Tested with the attached PR build (17.0.281-beta-test-10929) on an iPhone 13 Mobile device (iOS 17.3.1) and here is my observation: 1. Opened the Keyman In-app. 2. Enable the "Don't show again" radio button from the Get Started menu. 3. Closed the application. 4. Re-opened Keyman In-app and verified that the predictive text appeared properly and the keyboard layout appeared correctly. 5. Rotate the device to landscape and verified that the keyboard is displayed correctly. 6. Returned to portrait orientation and verified that the keyboard displayed correctly. Also, verified that the system keyboard displayed correctly in both orientations. (notes)
- ✅ TEST_IPHONE_SE (PASSED): Tested with the attached PR build (17.0.281-beta-test-10929) on an iPhone SE (3rd generation / iOS 17.0) and here is my observation: 1. Opened the Keyman In-app. 2. Enable the "Don't show again" radio button from the Get Started menu. 3. Closed the application. 4. Re-opened Keyman In-app and verified that the predictive text appeared properly and the keyboard layout appeared correctly. 5. Rotate the device to landscape and verified that the keyboard is displayed correctly. 6. Returned to portrait orientation and verified that the keyboard displayed correctly. Also, verified that the system keyboard displayed correctly in both orientations. (notes)
Test Artifacts
-
iOS
- Keyman for iOS (simulator image)
- FirstVoices Keyboards for iOS (simulator image)
-
TestFlight internal PR build version -
17.0.281 (0.10929.10634)
Ack, merged a child PR into this one early. Only realized after the fact.
Test Results
- TEST_IPHONE_13 (PASSED): Tested with the attached PR build (17.0.281-beta-test-10929) on an iPhone 13 Mobile device (iOS 17.3.1) and here is my observation: 1. Opened the Keyman In-app. 2. Enable the "Don't show again" radio button from the Get Started menu. 3. Closed the application. 4. Re-opened Keyman In-app and verified that the predictive text appeared properly and the keyboard layout appeared correctly. 5. Rotate the device to landscape and verified that the keyboard is displayed correctly. 6. Returned to portrait orientation and verified that the keyboard displayed correctly. Also, verified that the system keyboard displayed correctly in both orientations.
..Keyboard layout appeared correctly
..System keyboard displayed correctly
Test Results
- TEST_IPHONE_SE (PASSED): Tested with the attached PR build (17.0.281-beta-test-10929) on an iPhone SE (3rd generation / iOS 17.0) and here is my observation: 1. Opened the Keyman In-app. 2. Enable the "Don't show again" radio button from the Get Started menu. 3. Closed the application. 4. Re-opened Keyman In-app and verified that the predictive text appeared properly and the keyboard layout appeared correctly. 5. Rotate the device to landscape and verified that the keyboard is displayed correctly. 6. Returned to portrait orientation and verified that the keyboard displayed correctly. Also, verified that the system keyboard displayed correctly in both orientations.
..Keyman in Portrait view
..System Keyman keyboard in Landscape view
@sgschantz
Ack, merged a child PR into this one early. Only realized after the fact.
🎶 Oops, I did it again... 🎶
Of course I spot-checked the base branch after clicking the big green button. Thanks, jetlag.
You should be able to review all but the last two commits to get this PR's original contents, at least.
Changes in this pull request will be available for download in Keyman version 17.0.297-beta