Repository navigation
feat(luau): a cursor prop on ui nodes - #2127
Merged
Merged
Conversation
CSS cursor by name, applied with El::cursor. A script could not set the pointer's shape over what it draws.
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.
Compiled
Compiled on Windows x64, Windows arm64, macOS and Linux x64 in anomalyco/opencode-rune#1137, all four build jobs green: the app with Rune pinned to a check commit, the rev the app pins today (
4d8df909) plus this change and the five other cursor changes, cherry-picked. That is this change on the app's rev, not on this branch's base (devis 117 commits past it); everymatchonCursorthatdevhas was checked by reading.Why
A script could not set the pointer's shape. Everything a Luau view drew showed the arrow (a text field, the I-beam), whatever the design it follows shows there: a field-like button that should read as text, a disabled control, a handle.
What changes
A
cursorprop onui.*nodes, by CSS name:default,pointer,text,grab,grabbing,not-allowed,move,col-resize,row-resize,ew-resize,ns-resize,nwse-resize,nesw-resize,crosshair,cell,zoom-in,zoom-out.It is
El::cursor: the shape shows over the node and over what is inside it that sets none, while the pointer is over a hit target there (a pressable, hoverable or text node). An unknown name is a render error, as an unknowndiris.What it can change for an app
Nothing for a script that does not use it. A host that checks a script's props against its own list of names sees a new name from
rune_luau::prop_names().Not run
The new test has not been run: this repo's tests run on the scheduled macOS job, which I read after the merge.
cursor_names_the_pointers_shape_over_a_node_and_rejects_an_unknown_namecovers a node with a cursor, one without, and an unknown name.