Repository navigation
fix(native): honor typed vlist props and read-only edits - #402
Merged
Merged
Conversation
Native layout now reads overscan/item-extent with legacy data-attrs fallback, and text input rejects edits on read-only fields while keeping focus, selection, copy and navigation. Restore prop coverage inventory and fix Lui_native_bridge registrar polymorphism so the shared library typechecks. Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
Comment on lines
+334
to
+340
| let reject_edit = | ||
| match ev with | ||
| | `Editing _ | `Commit _ -> | ||
| st.node <> 0 && not (accepts_edits store st.node) | ||
| | `Focus _ | `Caret _ -> false | ||
| in | ||
| if reject_edit then (st, []) |
Contributor
There was a problem hiding this comment.
🔍 Read-only transitions retain active composition
When read-only activates during composition, feed_ime discards commits and cancellation reports without clearing marked text. Ui.handle suppresses keyboard handling while composition remains active. Existing tests cover initially read-only fields, leaving this reactive transition untested.
Was this helpful? React with 👍 or 👎 to provide feedback.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes the two critical native-backend protocol gaps found in review:
Lui_layoutnow reads wireoverscan/item-extent, with legacydata-overscan/data-item-extentas fallback (typed wins).read-onlytext controls —Lui_text_input.accepts_editsgates insert, delete, paste, cut-deletion, undo and IME composition/commit; focus, selection, copy and caret navigation remain available.Also restores the native
prop_coveragegate (including the newly admitted wire props), marksoverscan/item-extent/read-onlyin store dirty masks, and fixesLui_native_bridge.registerto take a rank-2{ register_named }record so the shared library typechecks on OCaml 5.2.Test plan
dune exec platform/native/lui_layout/test/lui_layout_test.exe(includesvlist typed props)dune exec platform/native/lui_input/test/lui_input_test.exe(includesread-only)dune exec platform/native/lui_paint/test/lui_paint_test.exe(coverage gate restored)dune exec platform/native/lui_window/test/lui_window_test.exe(includes clipboardread-only)