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

feat(core): normalize input context 🌱 #10382

Merged

Conversation

mcdurdin
Copy link
Member

@mcdurdin mcdurdin commented Jan 15, 2024

First half of #9999.

Adds the application context member of state object, which starts the process of verifying the handling of the application context.

Adds support for normalization (to NFD) of input app context into the cached context. The keyboard processor will work with the NFD cached context.

Adds unit tests for the normalization as part of the LDML keyboard processor test suite.

For follow-up PRs:

  • Comparing modified cached context to app context to determine the transform required to send to the app
  • Handling illegal unicode and unpaired surrogates on input context

@keymanapp-test-bot skip

Adds the application context member of state and a corresponding,
failing unit test, which starts the process of verifying the handling
of the application context.
First half of #9999.

Adds support for normalization (to NFD) of input app context into the
cached context. The keyboard processor will work with the NFD cached
context.

Adds unit tests for the normalization as part of the LDML keyboard
processor test suite.

TODO:
* Comparing modified cached context to app context to determine the
  transform required to send to the app
* Handling illegal unicode and unpaired surrogates on input context
@keymanapp-test-bot
Copy link

keymanapp-test-bot bot commented Jan 15, 2024

User Test Results

Test specification and instructions

User tests are not required

Test Artifacts

@keymanapp-test-bot keymanapp-test-bot bot added this to the A17S30 milestone Jan 15, 2024
@github-actions github-actions bot added core/ Keyman Core feat labels Jan 15, 2024
@mcdurdin mcdurdin marked this pull request as ready for review January 15, 2024 06:32
@@ -0,0 +1,222 @@
/*
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, refactored km_core_state_context_set_if_needed() and related helper functions out of km_core_state_api.cpp. It's been extensively rewritten so should be reviewed in its entirety anyway.

Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

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

LGTM

core/include/keyman/keyman_core_api.h Show resolved Hide resolved
core/tests/unit/kmnkbd/debug_api.cpp Show resolved Hide resolved
…ore/9999-normalization-of-context

Note: shifted minor changes from action_api.cpp to new
state_context_api.cpp.
@mcdurdin mcdurdin changed the title feat(core): normalize input context feat(core): normalize input context 🌱 Jan 15, 2024
Base automatically changed from feat/core/10365-context-debug to epic/core/9999-normalization January 16, 2024 02:38
@mcdurdin mcdurdin merged commit a97237b into epic/core/9999-normalization Jan 16, 2024
15 of 17 checks passed
@mcdurdin mcdurdin deleted the feat/core/9999-normalization-of-context branch January 16, 2024 02:39
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.

2 participants