Skip to content

feat(core): add deleted_context to km_core_actions struct 🌱#10533

Merged
mcdurdin merged 2 commits intoepic/core/9999-normalizationfrom
feat/core/10530-actions-deleted-context
Jan 30, 2024
Merged

feat(core): add deleted_context to km_core_actions struct 🌱#10533
mcdurdin merged 2 commits intoepic/core/9999-normalizationfrom
feat/core/10530-actions-deleted-context

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

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.

@keymanapp-test-bot skip

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.
@keymanapp-test-bot
Copy link
Copy Markdown

keymanapp-test-bot bot commented Jan 29, 2024

User Test Results

Test specification and instructions

User tests are not required

@keymanapp-test-bot keymanapp-test-bot bot changed the title feat(core): add deleted_context to km_core_actions struct feat(core): add deleted_context to km_core_actions struct 🌱 Jan 29, 2024
@keymanapp-test-bot keymanapp-test-bot bot added this to the A17S31 milestone Jan 29, 2024
@mcdurdin mcdurdin linked an issue Jan 29, 2024 that may be closed by this pull request
Copy link
Copy Markdown
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.

lgtm

Just a suggestion about how the end of the context is described.

// -1=unchanged, 0=off, 1=on
km_core_caps_state new_caps_lock_state;

// reference copy of actual UTF32 codepoints deleted from rhs of context
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.

I think in the past we avoided "rhs" in the past due to right-to-left orientation. I believe kmx_context refers to the caret.
reference copy of actual UTF32 codepoints deleted from the end of the context closest to the caret

Base automatically changed from fix/developer/10501-ldml-debugger-surrogate-pairs to epic/core/9999-normalization January 30, 2024 00:45
@mcdurdin mcdurdin merged commit 4c95fef into epic/core/9999-normalization Jan 30, 2024
@mcdurdin mcdurdin deleted the feat/core/10530-actions-deleted-context branch January 30, 2024 00:46
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.

feat(core): actions struct should report on deleted_context

2 participants