Skip to content

fix(web): restore flick functionality#12187

Merged
jahorton merged 3 commits intomasterfrom
fix/web/fix-flicks
Aug 16, 2024
Merged

fix(web): restore flick functionality#12187
jahorton merged 3 commits intomasterfrom
fix/web/fix-flicks

Conversation

@jahorton
Copy link
Copy Markdown
Contributor

@jahorton jahorton commented Aug 15, 2024

Turns out that #12176 actually broke flicks due to a side-effect of no longer rebuilding the gesture-parameterization object when swapping keyboards. The culprit:

const doRoaming = params.roamingEnabled ||= !flags.hasFlicks;

If rebuilding the parameter object from scratch, this is all well and good. If not, however... we run the risk of keeping 'roaming' mode in place if the previous keyboard had roaming enabled. This was the only spot that ever set the flag, so... it would never turn 'off' once turned 'on'. Short version: due to certain initialization patterns, it was basically always turned on. (When the OSK initializes during standard use, there's no actual Keyman keyboard ready yet... and so the engine builds a default, blank one to match a standard US English keyboard... a keyboard without flicks and thus with roaming support.)

The solution? Ignore any previous value for the setting and just override it with the value appropriate to the current keyboard. #12176 made comment changes noting this behavior for longpress.flickEnabled as well; now that there are two such members on the overall structure, I felt it worth some type work to hide them from the type visible from the gesture-parameterization API, since they are not to be externally set.

I also did a second check for anything needing similar changes to #12176, just in case, and discovered that the multitap 'sustain' timer needed a similar pattern, so I threw that in.

User Testing

TEST_GENERAL_GESTURES: Using the EuroLatin (SIL) keyboard on an Android device, verify that gestures work normally.

  • Be sure to test flicks, longpresses, and numeric-key multitap.
  • Also test flicks and longpresses while holding down the numeric key with a different finger.

@keymanapp-test-bot keymanapp-test-bot bot added the user-test-required User tests have not been completed label Aug 15, 2024
@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S8 milestone Aug 15, 2024
@jahorton jahorton requested a review from darcywong00 August 15, 2024 02:16
Copy link
Copy Markdown
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@dinakaranr
Copy link
Copy Markdown

dinakaranr commented Aug 16, 2024

Test Results

I tested this issue with the attached "Keyman 18.0.90-alpha-test-12187" build on the Android 14 physical device. Here is my observation.

  • TEST_GENERAL_GESTURES (Passed):
  1. Installed the "Keyman-18.0.90.apk" file and gave all permissions to the application.
  2. Checked the "Enable Keyman as system-wide keyboard" and set the keyboard as the default keyboard box on the settings page.
  3. Selected the "SIL EuroLatin" default keyboard.
  4. Open the Keyman app. Enable the "Predictions" to install the "Dictionary."
  5. Added a sentence to the notepad and Chrome (search).
  6. The gestures work well when pressing & pull down the key. I can select the numeric and special characters. It works when handing the multiple fingers.
    I have seen an error on the toast message when selecting keys more than 5 (by long-press & pull down the key.)
    Please refer to the screenshot below. Thanks.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Aug 16, 2024
@jahorton jahorton merged commit e136724 into master Aug 16, 2024
@jahorton jahorton deleted the fix/web/fix-flicks branch August 16, 2024 07:16
@jahorton
Copy link
Copy Markdown
Contributor Author

Did a quick check on Sentry, but I don't see any error reports that line up with the timestamp of your comment. Even with a few hours' fudge-factor, there's nothing even close to related that I can see. Ah well.

@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 18.0.91-alpha

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.

6 participants