keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
372 stars 102 forks source link

feat(web): `&newLayer` and `&oldLayer` #6366

Closed mcdurdin closed 2 years ago

mcdurdin commented 2 years ago

Fixes #6364. Fixes #6112. (I think).

Removes &layerChanged and adds &newLayer and &oldLayer system stores with the additional nuances around values as described in #6364.

User Testing

Setup

Android/IOS: Run these tests with the obolo_chwerty_6351 keyboard available in the Test-14.0 (Keyman - Windows (Desktop/Developer)) artifacts.

Web: The obolo_chwerty_6351 keyboard for these tests is available under English.../obolo_chwerty_6351 in the globe menu.

  1. touch English... first:

    image

  2. Then obolo_chwerty_6351 should be available in the submenu that appears:

    image

Base Configurations

These tests should be run on Android, iOS and Web.

GROUP_ANDROID: Run the Keyman app, either in Android emulator or real device. Version of Android is not important. Test the System keyboard and In-App keyboard. GROUP_IOS: Run the Keyman app, either in iPhone simulator or real device. Version of iOS is not important. Test the System keyboard and In-App keyboard. GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator. The obolo_chwerty_6351 keyboard for this test is available under English.../obolo_chwerty_6351 in the globe menu.

Tests

SUITE_SOS_IOS

keymanapp-test-bot[bot] commented 2 years ago

User Test Results

Test specification and instructions

πŸŸ₯ SUITE_SOS_IOS:

Test Artifacts

mcdurdin commented 2 years ago

It's a shame that we have to re-define TSS_NEWLAYER and TSS_OLDLAYER over and over again...

Definitely. I think in the future the list in Compiler.h should be able to instead use kmx_file.h, and the KMBinaryFileFormat.h header should disappear completely.

bharanidharanj commented 2 years ago

GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator.

bharanidharanj commented 2 years ago

GROUP_ANDROID: Run the Keyman app, either in Android emulator or real device. Version of Android is not important. Test the System keyboard and In-App keyboard.

In-App Keyboard - with Shift Key

In-App Keyboard - Caps

System Keyboard - with Shift Key

System Keyboard - Caps

bharanidharanj commented 2 years ago

GROUP_IOS: Run the Keyman app, either in iPhone simulator or real device. Version of iOS is not important. Test the System keyboard and In-App keyboard.

In-App - with Shift

In-App - Caps

System Keyboard - with Shift

System Keyboard - Caps

mcdurdin commented 2 years ago

Thank you for running these tests @bharanidharanj. I am sorry that they didn't pass!

GROUP_WEB

One note: I note that the GROUP_WEB test wasn't run with the mobile emulation mode. To run mobile emulation mode in Chrome:

  1. Press F12

  2. Click the mobile emulation button at the top of the Developer Tools window:

    image

  3. Back in the page, select the appropriate device from the dropdown at top (e.g. iPhone 12):

    image

  4. Reload the page to reset the environment for KeymanWeb to mobile device.

GROUP_IOS and GROUP_ANDROID

However ... there is more to this! The keyboard attached in this build looks like it was not correct. I have made a couple of fixes, and the obolo_chwerty_6351.kmp package that will be available from the Test Keyboards link in the User Test Results should now be the correct one. Make sure you install that keyboard (uninstall old ones first) before testing.

@keymanapp-test-bot retest all

bharanidharanj commented 2 years ago

Thank you for running these tests @bharanidharanj. I am sorry that they didn't pass!

GROUP_WEB

One note: I note that the GROUP_WEB test wasn't run with the mobile emulation mode. To run mobile emulation mode in Chrome:

  1. Press F12
  2. Click the mobile emulation button at the top of the Developer Tools window: image
  3. Back in the page, select the appropriate device from the dropdown at top (e.g. iPhone 12): image
  4. Reload the page to reset the environment for KeymanWeb to mobile device.

GROUP_IOS and GROUP_ANDROID

However ... there is more to this! The keyboard attached in this build looks like it was not correct. I have made a couple of fixes, and the obolo_chwerty_6351.kmp package that will be available from the Test Keyboards link in the User Test Results should now be the correct one. Make sure you install that keyboard (uninstall old ones first) before testing.

@keymanapp-test-bot retest all

@mcdurdin Okay, Thanks Marc. I will re-test as per your suggestion.

bharanidharanj commented 2 years ago

GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator.

bharanidharanj commented 2 years ago

GROUP_ANDROID: Run the Keyman app, either in Android emulator or real device. Version of Android is not important. Test the System keyboard and In-App keyboard.

bharanidharanj commented 2 years ago

GROUP_IOS: Run the Keyman app, either in iPhone simulator or real device. Version of iOS is not important. Test the System keyboard and In-App keyboard.

mcdurdin commented 2 years ago

GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator.

I have updated the test keyboard for KeymanWeb; please retest this one. The keyboard is now called obolo_chwerty_6351.

@keymanapp-test-bot retest GROUP_WEB TEST_STARTS_WITH_SHIFT TEST_CAPS

mcdurdin commented 2 years ago
  • TEST_CAPS (FAILED): Tested this on iPhone 13 Pro simulator and it is failed in (In-App keyboard) the 3rd Step (Verify that the layer remains the Caps Lock layer) as it mentioned in the Test Steps.

Good catch! I have addressed this now in the latest update. What was happening was that the host app was resetting the edit context with each keystroke, returning us to a default state.

Given this change, I think we should re-run both the iOS tests. Thanks :grin:

@keymanapp-test-bot retest GROUP_IOS TEST_STARTS_WITH_SHIFT TEST_CAPS

bharanidharanj commented 2 years ago
  • TEST_CAPS (FAILED): Tested this on iPhone 13 Pro simulator and it is failed in (In-App keyboard) the 3rd Step (Verify that the layer remains the Caps Lock layer) as it mentioned in the Test Steps.

Good catch! I have addressed this now in the latest update. What was happening was that the host app was resetting the edit context with each keystroke, returning us to a default state.

Given this change, I think we should re-run both the iOS tests. Thanks 😁

@keymanapp-test-bot retest GROUP_IOS TEST_STARTS_WITH_SHIFT TEST_CAPS

@mcdurdin Okay, Thanks.

bharanidharanj commented 2 years ago

GROUP_IOS: Run the Keyman app, either in iPhone simulator or real device. Version of iOS is not important. Test the System keyboard and In-App keyboard.

In-App Keyboard

System Keyboard

In-App 1

In-App2

System Keyboard

bharanidharanj commented 2 years ago

GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator.

bharanidharanj commented 2 years ago

SUITE_SOS_IOS:

mcdurdin commented 2 years ago

GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator. TEST_STARTS_WITH_SHIFT (FAILED)

Sorry, my mistake. The instructions should have been clearer on this -- the keyboard to test is already available under English.../obolo_chwerty_6351 in the globe menu for KeymanWeb. I have updated the instructions!

@keymanapp-test-bot retest GROUP_WEB TEST_STARTS_WITH_SHIFT TEST_CAPS

mcdurdin commented 2 years ago

GROUP_IOS:

  • TEST_STARTS_WITH_SHIFT (FAILED): Re-tested this on iPhone 13 Pro Simulator and noticed that clicking on the Backspace key would enable the Shift Key changes to Caps.

I think this is intended behaviour? When deleting text to return to an empty text area, the keyboard should return to Shift state. You can tell it is Shift rather than Caps because the top left key is Sh, not SH!

GROUP_IOS TEST_STARTS_WITH_SHIFT PASSED

mcdurdin commented 2 years ago

SUITE_SOS_IOS:

  • TEST_6112 (FAILED): Tested this on iOS 15.2 (iPhone 13 Pro Simulator) and the Shift Key is not activated after I clicking on the text area. ie., it is still showing the default layer.

Okay, I believe I've fixed this now -- I've retested locally and it appears to be correct.

@keymanapp-test-bot retest SUITE_SOS_IOS TEST_6112

mcdurdin commented 2 years ago
  • GROUP_IOS ... TEST_CAPS (FAILED): Re-tested this on iPhone 13 Pro Simulator and it is passed. I found an issue at Step v (Press Shift again to return to the base layer.). Here, the Shift Key Color changes from light blue to dark blue after clicking the Shifty key. (In-App 1.png) However, clicking on any letter key would show the lower case letter on the Screen. (In-App2.png)

I haven't been able to reproduce this. The dark blue colour normally appears as the 'down' touch action and then is replaced with a lighter blue to indicate that Shift is selected (or grey to indicate that Shift is not selected) once the user releases the touch. Can you try this again? If this continues to go wrong, we might list it as a separate issue to resolve.

@keymanapp-test-bot retest GROUP_IOS TEST_CAPS

MakaraSok commented 2 years ago

Test Results

GROUP_IOS: Run the Keyman app, either in iPhone simulator or real device. Version of iOS is not important. Test the System keyboard and In-App keyboard.

https://user-images.githubusercontent.com/28331388/159405946-473b4c84-7727-4b18-a527-1860ee76ea37.mov

MakaraSok commented 2 years ago

Test Results

GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator. The obolo_chwerty_6351 keyboard for this test is available under English.../obolo_chwerty_6351 in the globe menu.

Link used: id: 312043

Chrome desktop with mobile emulation:

image

Mobile device:

image

With Darcy's help, the keyboard, however, is found under View Keymanweb manual test pages.

image image

Can you please clarify which link to go to to test this PR? (1) View Keymanweb use samples. (2) View Keymanweb manual test pages.

My go to is (1) when not specified.

This test is still considered blocked until clarification needed is made. Thanks.

MakaraSok commented 2 years ago

Test Results

SUITE_SOS_IOS:

One main problem is that if adding more than two spaces after any of the three punctuations above, the keyboard shows the lower case layer instead.

In-app:

https://user-images.githubusercontent.com/28331388/159434972-5dd83948-8d99-40b0-8acf-162743bb5136.mov

System:

https://user-images.githubusercontent.com/28331388/159435156-9a76cee6-39d2-41dc-b763-309c52c00df4.mov

Note: A good to have feature - the keyboard should stay on Shift layer when pressing the return key after the ".!? + spaces". Currently, it switches to small caps in both in-app and system keyboard.

in-app (same for system):

https://user-images.githubusercontent.com/28331388/159436154-9538c1ba-c8d0-4705-b755-f829df3dadb0.mov

MakaraSok commented 2 years ago

Test Results

GROUP_WEB: Run testing/unminified, either in Chrome desktop, with mobile emulation, or mobile device/emulator. The obolo_chwerty_6351 keyboard for this test is available under English.../obolo_chwerty_6351 in the globe menu.

mcdurdin commented 2 years ago

I've revisited the context reset code and found a couple of inconsistencies. I think this addresses the starting shift state in iOS more cleanly. @MakaraSok can you retest with the new build?

@keymanapp-test-bot retest GROUP_IOS TEST_STARTS_WITH_SHIFT

mcdurdin commented 2 years ago

@keymanapp-test-bot retest SUITE_SOS_IOS TEST_6112

MakaraSok commented 2 years ago

Test Results

GROUP_IOS: Run the Keyman app, either in iPhone simulator or real device. Version of iOS is not important. Test the System keyboard and In-App keyboard.

in-app: πŸ‘Ž

The keyboard still doesn't show the Shift layer right off. Plus the predictive banner in particular is pushed up and cropped off. The keyboard itself seems to be pushed up leaving a huge empty gab at the bottom of the keyboard.

system: πŸ‘

The keyboard shows Shift layer right off after switching to the keyboard. The banner looks good, no cropped off like that of the in-app.

image

Clicking in the text area doesn't enable the Shift layer either. Note also

https://user-images.githubusercontent.com/28331388/159616240-e171c65c-50cf-43b4-9e5b-c144e4a7e85c.mov

SUITE_SOS_IOS:

in-app: πŸ‘Ž

The keyboard doesn't switch to the Shift layer at the start of a text field; however, it does after full stop (.), exclamation (!) or question mark (?) and one or two spaces (e.g. . ). Three spaces and a return key after one of the three punctuations doesn't keep the keyboard on the Shifter layer either, it actually is expected though to have the keyboard stay on the Shift layer.

system: πŸ‘ The keyboard does switch to the Shift layer at the start of a text field; however, it does after full stop (.), exclamation (!) or question mark (?) and one or two spaces (e.g. . ). Three spaces and a return key after one of the three punctuations doesn't keep the keyboard on the Shifter layer either, it actually is expected though to have the keyboard stay on the Shift layer.

mcdurdin commented 2 years ago

I have isolated the primary remaining issue (which is minor) into #6416 as we want to get this in front of beta users. Merging.