feat: expand floating parameters#29
Open
rauhryan wants to merge 2 commits into
Open
Conversation
commit: |
This was referenced May 9, 2026
cowboyd
requested changes
May 9, 2026
cowboyd
reviewed
May 9, 2026
Member
|
For some reason it looks like your agent isn't picking up the organization's PR template. Have a look at this one for an example. |
rauhryan
added a commit
that referenced
this pull request
May 10, 2026
cowboyd
reviewed
May 11, 2026
| target, z-index) | ||
| - **`scroll`** — scroll container configuration | ||
|
|
||
| The current floating surface is: |
Member
There was a problem hiding this comment.
Remove current. The spec addresses what is.
cowboyd
approved these changes
May 11, 2026
Member
cowboyd
left a comment
There was a problem hiding this comment.
Approved. Can you remove the references to current in the comment?
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.
Motivation
Clay exposes more floating-element controls than clayterm previously made available through the TypeScript directive API. Higher-level UI code needs those controls for popovers, tooltips, modals, and attached floating surfaces without reaching through to renderer internals.
Approach
Expands the
open(..., { floating })surface to cover the currently needed Clay floating options:expand.{ width, height }attachPoints.{ element, parent }pointerCaptureModeclipTozIndexThe public TypeScript API uses string literal values for enum-like options, while
ops.tsprivately maps those strings to Clay's numeric transfer representation during packing.The root renderer spec documents the complete current floating shape, and tests cover packing/rendering plus validation of the new fields.
Alternate Designs
Considered exporting numeric constants that mirror Clay's C enums. That was rejected because it leaks implementation details into the public TypeScript surface. String literals better match the existing clayterm API style.
Possible Drawbacks or Risks
floating.parentremains a numeric parent id in this PR. Converting that to an element-id string would require an additional design pass around hashing and transfer encoding, so this PR keeps the scope focused on the enum-like floating controls.