Skip to content
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

fix(web): default subkey forwarding 🐵 #9952

Merged
merged 3 commits into from
Nov 14, 2023

Conversation

jahorton
Copy link
Contributor

@jahorton jahorton commented Nov 7, 2023

I'd forgotten that default subkey selection logic is not available on the gesture-engine level, so KMW longpress handling has to override the gesture's selected-key output when a default subkey should be selected.

Technically, we could make it override only when the "select default" mode is on; that wouldn't actually be that difficult. But... it's not really necessary to toggle the directlyEmitsKey property, and not doing so results in somewhat simpler code.

User Testing

TEST_SPECIAL_DEFAULT: if a subkey exists with an explicitly-marked 'default' subkey, it should be auto-selected when the subkey menu is first displayed.

  1. On a mobile device (or when emulating one in a desktop browser), visit the testing page marked "Tests handling of new default-subkey feature (feat(developer): define long-press default key 🐵 #9430)."

  2. Longpress the d key.

  3. When the subkey menu is displayed, verify that the fifth subkey - "default" - is selected. The text may be cropped.

    image

  4. Without moving the touchpoint/finger, release the touchpoint / lift your finger. This should output the text default.

    • Note: if significant movement occurs, the text will not be output. (A small "fudge factor" is allowed before this occurs.)

TEST_MATCHING_ID_DEFAULT: if a subkey exists with an ID perfectly matching its base key, it should be auto-selected in the absence of a specified subkey.

  1. On a mobile device (or when emulating one in a desktop browser), visit the testing page marked "Tests handling of new default-subkey feature (feat(developer): define long-press default key 🐵 #9430)."

  2. Longpress the a key.

  3. When the subkey menu is displayed, verify that the third subkey - "a" - is selected.

  4. Without moving the touchpoint/finger, release the touchpoint / lift your finger. This should output the text a.

TEST_NONDEFAULT_SELECTION: the user should still be able to select a subkey that's not the default, of course.

  1. On a mobile device (or when emulating one in a desktop browser), visit the testing page marked "Tests handling of new default-subkey feature (feat(developer): define long-press default key 🐵 #9430)."
  2. Longpress the d key.
  3. Select the third d subkey: đ and release.
  4. Verify that đ is output.

TEST_IOS_SPECIAL_DEFAULT: the same as the first test above, but this time within the iOS app.

  1. Using Safari, download and then install the default-subkey keyboard package: default_subkey.kmp

  2. Within the iOS app, longpress the d key.

  3. When the subkey menu is displayed, verify that the fifth subkey - "default" - is selected. The text may be cropped.

    image

  4. Without moving the touchpoint/finger, release the touchpoint / lift your finger. This should output the text default.

    • Note: if significant movement occurs, the text will not be output. (A small "fudge factor" is allowed before this occurs.)

@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Nov 7, 2023
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Nov 7, 2023

User Test Results

Test specification and instructions

  • TEST_SPECIAL_DEFAULT (PASSED): Tested on a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Opened the test page Chrome browser. 2. Longpressed the 'd' key. 3. Verified that 'default' key is selected among the subkeys. 4. Without moving the touchpoint, release the touchpoint. Verified that the output text 'default' appears on the screen. (notes)
  • TEST_MATCHING_ID_DEFAULT (PASSED): Tested on a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Opened the relevant test page using Chrome browser. 2. Longpressed the 'a' key. 3. Verified that the third subkey 'a' is selected by default among the subkeys. 3. Without moving the touchpoint, release the touchpoint. Verified that the output text 'a' appeared on the screen. (notes)
  • TEST_NONDEFAULT_SELECTION (PASSED): Tested on a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Opened the relevant test page using Chrome browser. 2. Longpressed the 'd' key. 3. Selected the third d subkey, then released the touch point. Verified that the letter đ appeared on the screen. (notes)
  • TEST_IOS_SPECIAL_DEFAULT (PASSED): Tested with the Keyman 17.0.208-alpha build on iPhone 13 (ver ios 16.6) mobile device and here is my observation: 1. Download default_subkey.kmp file and installed the keyboard. 2. Set to "English -default -subkey" keyboard. 3. Longpressed the d key. Verified that the 'default' subkey appeared and it was already selected. 4. Without moving the touchpoint, released the touchpoint. Verified that the output text 'default' appears on the screen. It seems to be working as expected. (notes)

Test Artifacts

@bharanidharanj
Copy link

  • TEST_IOS_SPECIAL_DEFAULT (PASSED): Tested with the Keyman 17.0.208-alpha build on iPhone 13 (ver ios 16.6) mobile device and here is my observation: 1. Download default_subkey.kmp file and installed the keyboard. 2. Set to "English -default -subkey" keyboard. 3. Longpressed the d key. Verified that the 'default' subkey appeared and it was already selected. 4. Without moving the touchpoint, released the touchpoint. Verified that the output text 'default' appears on the screen. It seems to be working as expected.

@bharanidharanj
Copy link

Test Results

  • TEST_SPECIAL_DEFAULT (PASSED): Tested on a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Opened the test page Chrome browser. 2. Longpressed the 'd' key. 3. Verified that 'default' key is selected among the subkeys. 4. Without moving the touchpoint, release the touchpoint. Verified that the output text 'default' appears on the screen.

..default 1

..default 2

  • TEST_MATCHING_ID_DEFAULT (PASSED): Tested on a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Opened the relevant test page using Chrome browser. 2. Longpressed the 'a' key. 3. Verified that the third subkey 'a' is selected by default among the subkeys. 3. Without moving the touchpoint, release the touchpoint. Verified that the output text 'a' appeared on the screen.

.. a key 1

..a key 2

  • TEST_NONDEFAULT_SELECTION (PASSED): Tested on a mobile device (Samsung Galaxy A23 - Android 13) and here is my observation: 1. Opened the relevant test page using Chrome browser. 2. Longpressed the 'd' key. 3. Selected the third d subkey, then released the touch point. Verified that the letter đ appeared on the screen.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Nov 10, 2023
@mcdurdin mcdurdin modified the milestones: A17S25, A17S26 Nov 13, 2023
Base automatically changed from fix/web/gestures-old-android-compat to feature-gestures November 14, 2023 08:26
@jahorton jahorton merged commit 6205506 into feature-gestures Nov 14, 2023
14 of 15 checks passed
@jahorton jahorton deleted the fix/web/gestures-and-longpress-defaults branch November 14, 2023 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants