Skip to content

feat(webkit): render flow connectors port-to-port and add a terminal node - #845

Open
gabriel-lisboa-azion wants to merge 2 commits into
mainfrom
feat/flow-connector-ports
Open

feat(webkit): render flow connectors port-to-port and add a terminal node#845
gabriel-lisboa-azion wants to merge 2 commits into
mainfrom
feat/flow-connector-ports

Conversation

@gabriel-lisboa-azion

Copy link
Copy Markdown
Collaborator

Summary

Flow connectors now terminate on a visible attachment point instead of a bare node edge, and flow-node gains a terminal prop for leaf steps.

Connector ports. A styled flow-node renders an 8px square port just outside each of its edges; a flow-anchor renders one outside the edge it attaches to. The arrowhead polygon is removed — the port is the endpoint treatment. Ports sit fully clear of the box (offset back over the border, then translated out), so neither the node's surface nor its focus-visible ring can crop them.

Ports only where a connector attaches. connectors.ts stamps data-flow-leading / data-flow-trailing on the outer children while it measures, and the root hides the ports on those two outer edges — so the chain opens and closes on a node rather than on a stub. An unstyled node renders no ports at all (its slot content owns its appearance); put a flow-anchor inside it to place ports on the parts a connector should touch.

terminal (new flow-node prop). The node receives an incoming connector but originates none, so the chain continues through its siblings while that branch ends there — the shape a leaf needs (an attached resource that hangs off the chain rather than passing it on). A terminal node renders no outgoing port, including one a nested flow-anchor would draw.

Tokens. Connector stroke and port fill move to --accent; the port border is --border-muted and its shape --radius-sm; a styled node gains --shadow-xs. The spec's Figma frame is now filled in (Illustrations 129:2056) as the source for the port.

Notes

  • No new dependencies.
  • Not breaking. FlowPath.arrow / FlowPoint are removed from connectors.ts, but that module is internal — it is not in packages/webkit/package.json#exports and is imported only by flow.vue. The public prop/event/slot surface only grows (terminal).
  • spec_version 2, .specs/flow.md checksum refreshed; catalog.json regenerated (flow purpose only).
  • Tests: flow.test.ts grows to 35 passing cases, covering port presence per edge, aria-hidden on ports, no ports on unstyled, and connector counts for terminal branches (2 in + 1 out vs 2 in + 2 out).
  • Linux visual baselines are regenerated on this branch in a follow-up test(storybook) commit.

…node

Connectors now terminate on a visible attachment point instead of a bare
edge. A styled flow-node renders an 8px square connector port just outside
each of its edges, and a flow-anchor renders one outside the edge it
attaches to; the arrowhead polygon is gone, since the port is the endpoint
treatment. Ports sit fully clear of the box so neither the node surface nor
its focus ring crops them.

A port is only drawn where a connector actually attaches: connectors.ts
stamps data-flow-leading / data-flow-trailing on the outer children as it
measures, and the root hides those two edges, so the chain opens and closes
on a node rather than on a stub. An unstyled node renders no ports at all —
its slot content owns its appearance.

New flow-node prop `terminal`: the node receives an incoming connector but
originates none, so the chain continues through its siblings while that
branch ends there. That is the shape a leaf needs — an attached resource
hanging off the chain rather than passing it on.

Connector stroke and port fill move to --accent, and the node gains
--shadow-xs.
@gabriel-lisboa-azion
gabriel-lisboa-azion force-pushed the feat/flow-connector-ports branch from 8f28fd2 to 374598f Compare August 3, 2026 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant