feat: add html-form-ports demo#20
Merged
Merged
Conversation
Data-mapping demo: elements render HTML via foreignObject and each form field / list row gets a port in a single absolute-position ports group. Port coordinates are measured from the rendered HTML, so they stay aligned with any layout. Values propagate along the mapping links with live snap preview and direction validation.
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.
What
New
html-form-portsdemo (TypeScript,@joint/core, Vite) — a small data-mapping application:<foreignObject>; every field has a port placed directly under its input. Editable input fields (hollow ports, in) and computed read-only fields (solid ports, out) derived live from the inputs.side: 'left' | 'right'). Used as the Input (out ports, solid) and Output (in ports, hollow) interfaces.position: 'absolute'— coordinates are measured from the rendered HTML (HtmlPortsElementViewbase class), so ports stay aligned with any HTML layout (multi-row, wrapping, resize, zoom).Behavior
link:snap:connect/link:snap:disconnect— live value preview while dragging a link, with restore on un-snap.Notes
onMountdeferred by one frame — the HTML has no dimensions before the view is attached, and a port update fired mid paper-batch is not flushed.change:portsper resize (batched port writes).npm run lintclean for this demo; screenshot generated via the root screenshot script.Screenshot
🤖 Generated with Claude Code