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): disabled autoaccept should not autohighlight suggestions #13068

Merged
merged 1 commit into from
Jan 30, 2025

Conversation

jahorton
Copy link
Contributor

I've written this PR in such a way that it should be fully compatible with #12893 when merged in.

There was no pre-existing issue for it, but I just realized that we still had a tiny bit of active autocorrect behavior enabled on master - the suggestion we would autocorrect to was being highlighted. It wouldn't trigger, but it could lead to "fun" cases where that suggestion and a touched suggestion would both be highlighted at the same time.

Part of me... actually kind of liked having the autocorrect "hint" active, but this was definitely not intended.

User Testing

TEST_ANDROID_AUTOHIGHLIGHT: Using Keyman for Android and sil_euro_latin set to English, type troub and verify that trouble is not automatically highlighted.

@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Jan 29, 2025
@keymanapp-test-bot keymanapp-test-bot bot added this to the A18S20 milestone Jan 29, 2025
Comment on lines +752 to +754
if(this.predictionContext.selected == suggestion) {
d.highlight(true);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we instead replace the if-condition with suggestion?.autoHighlight, we can keep the "autocorrect hint" around in a cleaner way. Any interaction with the banner would instantly (and permanently) deselect it this way.

@dinakaranr
Copy link

Test Results

I tested this issue with the attached "Keyman-18.0.180-alpha-test-13068" build(29/01/2025) on Android 14(physical device). Here I am sharing my observation.

  • TEST_ANDROID_AUTOHIGHLIGHT (Passed):
  1. Installed the "Keyman-18.0.180.apk" file from this PR build.
  2. Open the Keyman app.
  3. Checked the "Enable Keyman as system-wide keyboard". Set the keyboard as the default keyboard box on the settings page.
  4. Select the "SIL_Euro_Latin" keyboard and set it to English.
  5. Type the "troub" letters.
  6. Verified that the word "Trouble" is not automatically highlighted on the banner.
    It works great for me. Thank you.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Jan 29, 2025
@jahorton jahorton merged commit 3bf00b8 into master Jan 30, 2025
18 checks passed
@jahorton jahorton deleted the fix/web/disable-suggestion-autohighlight branch January 30, 2025 01:51
@keyman-server
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants