Skip to content

fix(web): Fix clearing of deadkeys#9944

Merged
ermshiperete merged 9 commits intomasterfrom
fix/web/8568_deadkeys
Nov 8, 2023
Merged

fix(web): Fix clearing of deadkeys#9944
ermshiperete merged 9 commits intomasterfrom
fix/web/8568_deadkeys

Conversation

@ermshiperete
Copy link
Copy Markdown
Contributor

@ermshiperete ermshiperete commented Nov 6, 2023

  • don't clear deadkeys after pressing backspace
  • add unit test
  • also some small refactorings

Fixes #8568.

User Testing

TEST_8568: Verify that #8568 is fixed

  1. Type phaa saa laaw ko then press bksp, bksp
  2. Verify you get the following output: ພາສາລາວ

Since things are working in both cases it seems that the problem got
fixed and the comments are obsolete.
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Nov 6, 2023
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Nov 6, 2023

User Test Results

Test specification and instructions

  • TEST_8568 (PASSED): Tested with the attached PR build (Keyman Developer 17.0.206-alpha-test-9944) on Windows 10 OS and here is my observation: 1. Installed Keyman 17.0.206-alpha build in the system. 2. Installed Lao Phonetic keyboard. 3. Opened the text editor. 3. Verified that it outputs the expected result. 4. Opened Lao Phonetic project in Keyman developer. Repeat step 1 as it mentioned in the User Testing. I have attached the screenshot for your reference. 5. Open the keyboard in Chrome mobile emulator mode. (notes)

Test Artifacts

@keymanapp-test-bot keymanapp-test-bot bot added this to the A17S25 milestone Nov 6, 2023
@ermshiperete ermshiperete marked this pull request as draft November 6, 2023 05:39
Also adds a similar testcase to the baseline keyboard tests.
@ermshiperete ermshiperete force-pushed the fix/web/8568_deadkeys branch from 56be76b to a43fad4 Compare November 6, 2023 06:36
@github-actions github-actions bot added web/ and removed web/ labels Nov 6, 2023
@ermshiperete ermshiperete marked this pull request as ready for review November 6, 2023 06:38
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.

This looks okay, but I have some questions around the testing of the default backspace handling with deadkeys -- are all the scenarios in k_020__deadkeys_and_backspace being covered? Are they being tested automatically at present or did you manually test?

Also can you split out the change you made to k_020 because it is a different test case?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

While I'm guessing this test keyboard was under consideration for use, it looks like that got cancelled. Not sure about the removal of a few comments from lines 25 and 26, so I'll leave that aspect of the review to others.

@github-actions github-actions bot added web/ and removed web/ labels Nov 6, 2023
@ermshiperete ermshiperete force-pushed the fix/web/8568_deadkeys branch from 53d95e5 to 4851c54 Compare November 6, 2023 08:57
@github-actions github-actions bot added web/ and removed web/ labels Nov 6, 2023
@ermshiperete ermshiperete requested a review from mcdurdin November 6, 2023 08:58
c keys: [K_1][K_BKSP][K_2][K_BKSP][K_3][K_BKSP][K_4][K_BKSP][K_5][K_BKSP][K_6][K_BKSP]
c expected: 78aa
c 7. Two chars and one deadkey in between in context: 'c' (dk7) 'd' + BKSP = 'ok'
c keys: [K_1][K_BKSP][K_2][K_BKSP][K_3][K_BKSP][K_4][K_BKSP][K_5][K_BKSP][K_6][K_BKSP][K_7][K_BKSP] [K_BKSP]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
c keys: [K_1][K_BKSP][K_2][K_BKSP][K_3][K_BKSP][K_4][K_BKSP][K_5][K_BKSP][K_6][K_BKSP][K_7][K_BKSP] [K_BKSP]
c keys: [K_1][K_BKSP][K_2][K_BKSP][K_3][K_BKSP][K_4][K_BKSP][K_5][K_BKSP][K_6][K_BKSP][K_7][K_BKSP][K_BKSP]

c 6. One char and two deadkeys and one char and two deadkeys in context 'a' dk(6a) dk(6b) 'b' dk(6c) dk(6d) + BKSP = 'a'
c keys: [K_1][K_BKSP][K_2][K_BKSP][K_3][K_BKSP][K_4][K_BKSP][K_5][K_BKSP][K_6][K_BKSP]
c expected: 78aa
c 7. Two chars and one deadkey in between in context: 'c' (dk7) 'd' + BKSP = 'ok'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
c 7. Two chars and one deadkey in between in context: 'c' (dk7) 'd' + BKSP = 'ok'
c 7. Tests behaviour when deleting two characters with deadkey prior to first character,
c verifying that deadkeys are preserved with the first backspace event:
c 'c' (dk7) 'de' + BKSP + BKSP = 'ok'

c 4. Two deadkeys in a row in context dk(4a) dk(4b) + BKSP = nul
c 5. One char and two deadkeys in context 'a' dk(5a) dk(5b) 'b' + BKSP = 'a'
c 6. One char and two deadkeys and one char and two deadkeys in context 'a' dk(6a) dk(6b) 'b' dk(6c) dk(6d) + BKSP = 'a'
c 7. Two chars and one deadkey in between in context: 'c' (dk7) 'd' + BKSP = 'ok'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Need to update this test to match k_020

@github-actions github-actions bot added web/ and removed web/ labels Nov 6, 2023
@github-actions github-actions bot added web/ and removed web/ labels Nov 7, 2023
@github-actions github-actions bot added web/ and removed web/ labels Nov 7, 2023
@bharanidharanj
Copy link
Copy Markdown

Test Results

  • TEST_8568 (PASSED): Tested with the attached PR build (Keyman Developer 17.0.206-alpha-test-9944) on Windows 10 OS and here is my observation: 1. Installed Keyman 17.0.206-alpha build in the system. 2. Installed Lao Phonetic keyboard. 3. Opened the text editor. 3. Verified that it outputs the expected result. 4. Opened Lao Phonetic project in Keyman developer. Repeat step 1 as it mentioned in the User Testing. I have attached the screenshot for your reference. 5. Open the keyboard in Chrome mobile emulator mode.

..in Windows

..in the Debugger window

..in Web

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Nov 7, 2023
@ermshiperete ermshiperete merged commit cbec636 into master Nov 8, 2023
@ermshiperete ermshiperete deleted the fix/web/8568_deadkeys branch November 8, 2023 01:13
@keyman-server
Copy link
Copy Markdown
Collaborator

Changes in this pull request will be available for download in Keyman version 17.0.208-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(web): different output with lao_phonetic keyboard

5 participants