Skip to content

fix(windows): Add invalidate context action to non-updatable parse#7089

Merged
rc-swag merged 2 commits intomasterfrom
fix/7078/invalidate-context-on-enter
Aug 23, 2022
Merged

fix(windows): Add invalidate context action to non-updatable parse#7089
rc-swag merged 2 commits intomasterfrom
fix/7078/invalidate-context-on-enter

Conversation

@rc-swag
Copy link
Copy Markdown
Contributor

@rc-swag rc-swag commented Aug 22, 2022

Fixes #7078

Rename ProcessActionsTestParse to NonUpdatable parse as it does more than just test. Add handling for the invalidate context action to this parse. In the case when an emit keystroke is in the action list it will be emitted and the Updateable round will never occur so we need to invalidate the context now in the non-updatable parse.

User Testing

Install the keyman for windows build associated with this PR
The key referred to as "enter" also has key cap labelled "return" on many keyboards.
TEST_ENTER_INVALIDATE

  1. Install gff_ethiopic_7 from Keyman.com Ethiopic - (Language Neutral)
  2. Open Notepad
  3. Select Ethiopic - (Language Neutral) as the current keyboard.
  4. Type asdfEntera

Expected Result:
"አስድፍ
አ"

Keyboards for the following test are found in the zip file 7077_test_keyboards.zip . Reusing keyboards from PR#7077
TEST_OUTPUT_KEYSTROKE

  1. Install 043 - output and keystroke.kmx
  2. Open Notepad
  3. Select 043 - output and keystroke.kmx as the current keyboard.
  4. Type 123
    Expected Result: "abd3"

TEST_OUTPUT_KEYSTROKE_INVALID_CONTEXT

  1. If not installed from the previous test - Install 043 - output and keystroke.kmx
  2. Open Notepad
  3. Select 043 - output and keystroke.kmx as the current keyboard.
  4. Type 12Enter3
    Expected Result:
    "abc
    3"

TEST_DEADKEY_AND_CONTEXT

  1. Install 045 - deadkey and context.kmx
  2. Open Notepad
  3. Select 045 - deadkey and context.kmx as the current keyboard.
  4. Type yzShift+/
    Expected Result: "correct"

Rename ProcessActionsTestParse to NonUpdatable parse. It does
more then just test. Add handling for the invalidate context action
to this parse, so that if we emit a keystroke we invalidate the context
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Aug 22, 2022
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Aug 22, 2022

User Test Results

Test specification and instructions

  • TEST_ENTER_INVALIDATE (PASSED): Retested with the latest Ethiopic Keyboard and it is working as expected. Thanks, Ross! (notes)
  • TEST_OUTPUT_KEYSTROKE (PASSED): Tested this as per the instructions and it is working as expected.
  • TEST_OUTPUT_KEYSTROKE_INVALID_CONTEXT (PASSED): Tested this as per the instructions and it is working as expected.
  • TEST_DEADKEY_AND_CONTEXT (PASSED): Tested this as per the instructions and it is working as expected.

Test Artifacts

@rc-swag rc-swag added this to the A16S9 milestone Aug 22, 2022
@rc-swag rc-swag marked this pull request as ready for review August 22, 2022 03:43
@rc-swag rc-swag requested a review from sgschantz as a code owner August 22, 2022 03:43
@mcdurdin mcdurdin changed the title fix: Add invalidate context action to non-updatable parse fix(windows): Add invalidate context action to non-updatable parse Aug 22, 2022
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin left a comment

Choose a reason for hiding this comment

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

LGTM

@bharanidharanj
Copy link
Copy Markdown

  • TEST_ENTER_INVALIDATE (FAILED): Tested this as per the instructions and it seems that the expected output differs from the actual output.

  • TEST_OUTPUT_KEYSTROKE (PASSED): Tested this as per the instructions and it is working as expected.

  • TEST_OUTPUT_KEYSTROKE_INVALID_CONTEXT (PASSED): Tested this as per the instructions and it is working as expected.

  • TEST_DEADKEY_AND_CONTEXT (PASSED): Tested this as per the instructions and it is working as expected.

@keymanapp-test-bot keymanapp-test-bot bot added user-test-failed and removed user-test-required User tests have not been completed labels Aug 22, 2022
@rc-swag
Copy link
Copy Markdown
Contributor Author

rc-swag commented Aug 23, 2022

My mistake @bharanidharanj I put in the wrong test keys to type. I have updated the test input keys. Please retest

@keymanapp-test-bot retest TEST_ENTER_INVALIDATE

@keymanapp-test-bot keymanapp-test-bot bot added user-test-required User tests have not been completed and removed user-test-failed labels Aug 23, 2022
@bharanidharanj
Copy link
Copy Markdown

My mistake @bharanidharanj I put in the wrong test keys to type. I have updated the test input keys. Please retest

@keymanapp-test-bot retest TEST_ENTER_INVALIDATE

@rc-swag Okay. I will retest.

@bharanidharanj
Copy link
Copy Markdown

bharanidharanj commented Aug 23, 2022

  • TEST_ENTER_INVALIDATE (PASSED): Retested with the latest Ethiopic Keyboard and it is working as expected. Thanks, Ross!

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Aug 23, 2022
@rc-swag rc-swag merged commit ca50f67 into master Aug 23, 2022
@rc-swag rc-swag deleted the fix/7078/invalidate-context-on-enter branch August 23, 2022 23:07
@mcdurdin
Copy link
Copy Markdown
Member

Note: this needs a cherry-pick to stable-15.0 🍒

@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 16.0.51-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.

bug(windows): Context is not reset on "Enter/Return"

4 participants