Repository navigation
fix(layout): keep the flow readable on hubs, replies and groups that feed each other - #52
Merged
Merged
Conversation
… give labelled and distinct edges their own ports, and seat labels by the card they name
…at all past 60 nodes
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
🎉 This PR is included in version 0.4.0-rc.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Merged
Contributor
|
🎉 This PR is included in version 0.4.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This branch was successfully deployed
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.
Architecture and dataflow layouts broke down on common shapes: a request handler calling many cards, a client that sends a request and shows the reply, groups that feed each other. The entry call wrapped round the whole diagram, edges of every colour left a card from one shared point, and labels piled up on the shared line far from what they named.
Layout
returnedges, and any edge that closes a cycle (found by a walk from the entry points in draft order), are laid out reversed. The caller stays upstream of what it calls.Viewer
Before and after
Each image shows the whole diagram, then a close-up of what changed.
A label moves off a shared trunk. "lookup" (orders to users) used to sit by the line into users that it shares with gateway to users. It now sits on its own run.

More labels move off shared lines. "consume" and "SMS" now sit on runs of their own edge.

A shallow step becomes a straight line. "payment facts" ran between two ports 14px out of line.

A break where lines cross. The grey trunk breaks where the white main flow crosses it, so the crossing can't be read as a junction.

Validation and skill
semantics/duplicate-row-label.return, busy cards, and one row per label.Tests
packages/layout/test/stress.ts, made-up diagrams): hub top-down and left-to-right, fan-in, cycle, nested groups, two-way pairs, mesh, self-loop, staged compact, single, pair.quality.test.ts): no port shared by edges that look different, every edge enters its target from the facing side, no long detours, every segment along an axis, no shallow step between ports.Across 31 diagrams (shipped samples and examples plus the stress set):
Trade-offs