Skip to content

feat(developer): LDML keyboard test window marker support 🌱#10472

Merged
mcdurdin merged 7 commits intoepic/core/9999-normalizationfrom
feat/developer/10416-10458-ldml-debugger-markers
Jan 26, 2024
Merged

feat(developer): LDML keyboard test window marker support 🌱#10472
mcdurdin merged 7 commits intoepic/core/9999-normalizationfrom
feat/developer/10416-10458-ldml-debugger-markers

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

@mcdurdin mcdurdin commented Jan 23, 2024

Fixes #10458.
Fixes #10416.

Moves from using action queue to action struct for the LDML keyboard debugger. Does not do the same for the KMX keyboard debugger, because that relies on action items to do single-step debugging.

Refactors the LDML keyboard test window significantly, in order to be able to support markers. Cleans up the state machine for the debug window in the process, as that was complicating the changes. Removes a lot of extraneous code in the debug window.

User Testing

  • TEST_LDML_DEBUGGER: Create a test LDML keyboard, open it, and paste the sample keyboard XML from below into the text editor. Select Keyboard/Test Keyboard. Try the following interactions with the keyboard debugger and make sure it works as expected:
  1. basic output: type x, output should be hello!
  2. marker output: type y, output should be \m{3} in the character preview
  3. basic transform: type abc, output should be Congratulations!
  4. marker transform: type yz, output should be b, \m{2} in the character preview

sample keyboard

<?xml version="1.0"?>
<!DOCTYPE keyboard3 SYSTEM "ldmlKeyboard3.dtd">
<keyboard3 locale="en" conformsTo="techpreview">
  <info author="Marc" name="sample_ldml"/>
  <version number="1.0.0"/>
  <keys>
    <import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/>
    <import base="cldr" path="techpreview/keys-Zyyy-currency.xml"/>
    <key id="x" output="hello!" />
    <key id="y" output="\m{y}" />
  </keys>
  <layers formId="us">
    <layer modifiers="none">
      <row keys="grave 1 2 3 4 5 6 7 8 9 0 hyphen equal"/>
      <row keys="q w e r t y u i o p open-square close-square backslash"/>
      <row keys="a s d f g h j k l semi-colon apos"/>
      <row keys="z x c v b n m comma period slash"/>
      <row keys="space"/>
    </layer>
    <layer modifiers="shift">
      <row keys="tilde bang at hash dollar percent caret amp asterisk open-paren close-paren underscore plus"/>
      <row keys="Q W E R T Y U I O P open-curly close-curly pipe"/>
      <row keys="A S D F G H J K L colon double-quote"/>
      <row keys="Z X C V B N M open-angle close-angle question"/>
      <row keys="space"/>
    </layer>
    <layer modifiers="caps">
      <row keys="grave 1 2 3 4 5 6 7 8 9 0 hyphen equal"/>
      <row keys="Q W E R T Y U I O P open-square close-square backslash"/>
      <row keys="A S D F G H J K L semi-colon apos"/>
      <row keys="Z X C V B N M comma period slash"/>
      <row keys="space"/>
    </layer>
    <layer modifiers="shift caps">
      <row keys="tilde bang at hash dollar percent caret amp asterisk open-paren close-paren underscore plus"/>
      <row keys="q w e r t y u i o p open-curly close-curly pipe"/>
      <row keys="a s d f g h j k l colon double-quote"/>
      <row keys="z x c v b n m open-angle close-angle question"/>
      <row keys="space"/>
    </layer>
  </layers>
  <transforms type="simple">
    <transformGroup>
        <transform from="abc" to="Congratulations!" />
        <transform from="\m{y}z" to="a\m{b}" />
    </transformGroup>
    <transformGroup>
        <transform from="a\m{b}" to="b\m{c}" />
    </transformGroup>
  </transforms>
</keyboard3>

…debugger

Relates to #10416.

Moves from using action queue to action struct for the LDML keyboard
debugger. Does not do the same for the KMX keyboard debugger, because
that relies on action items to do single-step debugging.
Fixes #10458.

Refactors the LDML keyboard test window significantly, in order to be
able to support markers. Cleans up the state machine for the debug
window in the process, as that was complicating the changes. Removes
a lot of extraneous code in the debug window.
@keymanapp-test-bot keymanapp-test-bot bot added has-user-test user-test-required User tests have not been completed labels Jan 23, 2024
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Jan 23, 2024

User Test Results

Test specification and instructions

  • TEST_LDML_DEBUGGER (PASSED): all tests passed per the instructions given, running with Keyman Developer 17.0.248-alpha-test-10472 on a VM.

Test Artifacts

@keymanapp-test-bot keymanapp-test-bot bot changed the title feat(developer): LDML keyboard test window marker support feat(developer): LDML keyboard test window marker support 🌱 Jan 23, 2024
@keymanapp-test-bot keymanapp-test-bot bot added this to the A17S31 milestone Jan 23, 2024
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

@bharanidharanj
Copy link
Copy Markdown

Test Results

  • TEST_LDML_DEBUGGER (FAILED): Tested with the attached PR build (Keyman Developer 17.0.247-alpha-test-10472) on Windows 10 OS and here is my observation: 1. Created an LDML keyboard project. 2. Opened the project. 3. Clicked the Keyboard / Test Keyboard option and got an error message. Seems to be an issue.

@keymanapp-test-bot keymanapp-test-bot bot added user-test-failed and removed user-test-required User tests have not been completed labels Jan 25, 2024
…t/developer/10416-10458-ldml-debugger-markers
Base automatically changed from refactor/developer/10214-debugger-app-context to epic/core/9999-normalization January 25, 2024 23:18
Rolls back the privatisation of the km_core_context_get and
km_core_context_length APIs because the debugger uses them.
@mcdurdin
Copy link
Copy Markdown
Member Author

@bharanidharanj the branch was not up to date so we didn't have the fix for that issue you experienced applied to this PR. I have updated the branch and am rebuilding now; please retest 😄

@keymanapp-test-bot retest

@keymanapp-test-bot keymanapp-test-bot bot added user-test-required User tests have not been completed and removed user-test-failed labels Jan 25, 2024
@mcdurdin
Copy link
Copy Markdown
Member Author

Test Results

  • TEST_LDML_DEBUGGER (PASS): all tests passed per the instructions given, running with Keyman Developer 17.0.248-alpha-test-10472 on a VM.

@keymanapp-test-bot keymanapp-test-bot bot removed the user-test-required User tests have not been completed label Jan 26, 2024
@mcdurdin mcdurdin merged commit fa91bdc into epic/core/9999-normalization Jan 26, 2024
@mcdurdin mcdurdin deleted the feat/developer/10416-10458-ldml-debugger-markers branch January 26, 2024 04:31
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(developer): LDML keyboard debugger does not show markers refactor(developer): Use km_core_state_action_items struct instead of queue

3 participants