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

epic: Keyman Core normalization 🌱 #10390

Merged
merged 135 commits into from Jan 30, 2024
Merged

Conversation

mcdurdin
Copy link
Member

Fixes #9999.

@keymanapp-test-bot skip

mcdurdin and others added 23 commits January 15, 2024 07:19
Fixes #10365.

Adds a `km_core_state_context_debug` function that returns a km_core_cp
string containing the current cached or intermediate context. The
function must be used only for debug logging purposes -- the string is
not intended to parsed for other purposes and the format may change in
the future.

This commit adds the function and corresponding unit tests. Subsequent
commits will update existing context debug functions in various engines
to use this API endpoint instead.
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
Note: resolved merge conflict with action_api.cpp by shifting new code
into state_context_api.cpp.
Co-authored-by: Steven R. Loomis <srl295@gmail.com>
…ore/9999-normalization-of-context

Note: shifted minor changes from action_api.cpp to new
state_context_api.cpp.
@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 changed the title feat(core): seed Keyman Core normalization epic: Keyman Core normalization 🌱 Jan 15, 2024
ermshiperete and others added 19 commits January 25, 2024 20:02
…t/developer/10416-10458-ldml-debugger-markers
…ugger-app-context

refactor(developer): update app context as well as cached context for keyboard debuggers 🌱
Rolls back the privatisation of the km_core_context_get and
km_core_context_length APIs because the debugger uses them.
…dml-debugger-markers

feat(developer): LDML keyboard test window marker support 🌱
…oard3-tag

fix(developer): use keyboard3 tag rather than DTD to identify LDML keyboard xml files 🌱
…board-template

fix(developer): tidy up LDML keyboard project template 🌱
Fixes #10530.

Adds the deleted_context member to the km_core_actions struct, and
associated unit tests. Simplifies integration by providing the consumer
with all the data they need in order to execute the transform,
specifically around number of delete operations required, without
needing to query the target application context again. The number of
delete operations will vary according to application compliance and
selected encoding; for example a UTF-16 string may require 2
delete-backs for surrogate pairs in the text buffer for a compliant app,
whereas there will be a single delete-back key event for a non-compliant
app.

The deleted_context member should also be used for debug assertions.
…alization' into fix/core/10100-ContextNuances

# Conflicts:
#	core/tests/unit/kmnkbd/state_context_api.cpp
fix(core): Fix nuances when updating context 🌱
…truct

refactor(linux): Use `km_core_actions` struct instead of queue 🌱
…ugger-surrogate-pairs

fix(developer): support surrogate pairs in ldml debugger 🌱
…ted-context

feat(core): add `deleted_context` to `km_core_actions` struct 🌱
chore(core): `process_output_action` needs const `output_utf32` parameter 🌱
Copy link
Contributor

@rc-swag rc-swag left a comment

Choose a reason for hiding this comment

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

RSLGTM

@mcdurdin mcdurdin merged commit f546c44 into master Jan 30, 2024
24 of 25 checks passed
@mcdurdin mcdurdin deleted the epic/core/9999-normalization branch January 30, 2024 23:45
@keyman-server
Copy link
Collaborator

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

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

Successfully merging this pull request may close these issues.

feat(core): support normalization in Core 🌱
5 participants