v0.6.20 — per-edge routing style (curve / orthogonal)
v0.6.20 — Per-edge routing style (curve / orthogonal)
Each /compose edge can now pick between the original cubic bezier
("curve", the v0.6.19 look) and a 3-segment right-angle polyline
("orthogonal", Visio / Lucidchart style). The choice is per-edge,
so a single board can mix both: a "main flow" line curves smoothly
while a "control plane" line goes through right angles.
What you get
- Inspector gets a 5th control: a
<select>with the two
options. The label ("Routing" / "路径") and option labels
("Curve" / "曲线" and "Orthogonal" / "直角") are i18n'd. - Canvas uses a single SVG
<path>for both styles. The
curvecase is the original cubic bezier; theorthogonal
case is a 3-segment polyline (right → up/down → right). Both
end with a horizontal segment, so the v0.6.18 marker logic
(markerStart/markerEndwith
orient="auto-start-reverse") keeps working without any marker
changes — the orthogonal case's arrow head still sits on the
last horizontal segment pointing right (or left for backward).
Scope of v0.6.20 (deliberately minimal)
- The two routing styles are the v0.6.20 surface — pick one,
the renderer takes care of the rest. - Block-center avoidance is out of scope. A connection that
goes through other blocks in the middle will still do so with
"orthogonal". A real A* grid router (or visibility-graph) on
top of this enum is a separate concern and would need its own
release. Theroutefield is designed to extend (a future
obstacleAvoidance?: booleancan layer on top without a v7
bump).
Files touched (15)
| Area | Files |
|---|---|
| Schema | web/src/lib/types.ts, src/core/compose-boards.ts (zod enum + v6 version union) |
| Compose state | web/src/lib/compose-history.ts, web/src/app/compose/ComposeBoard.tsx |
| UI | web/src/app/compose/Inspector.tsx, web/src/app/compose/ConnectionPath.tsx |
| i18n | web/src/lib/i18n/types.ts, web/src/lib/i18n/dict.en.ts, web/src/lib/i18n/dict.zh.ts (+4 keys) |
| Docs | CHANGELOG.md, docs/roadmap.md |
| Tests | 3 schema + 4 history + 1 backward-compat (v5↔v6 round-trip) |
Backward compat
route is optional in the schema and omitted by default —
same pattern as v0.6.18's dir and v0.6.19's color. A v0.6.19
board saved before this release round-trips through v0.6.20
byte-identical. The schema is now v6; v1 / v2 / v3 / v4 / v5 boards
all continue to load.
Why a minor bump
Same hotfix / additive-feature precedent as v0.6.6, v0.6.13,
v0.6.17, v0.6.18, v0.6.19: v0.6.20 is purely additive (every
v0.6.19 board still opens and edits fine), so a minor bump is in
line with the project's release conventions.
Backlog after v0.6.20
v0.6.21— block-center avoidance (real A* grid router on
top of the v0.6.20routeenum) + hooks 抽离- placeholder parameter audit (15 keys remain hardcoded)
- per-direction palette (e.g. "all forward connections get this
color") — deferred; per-edge is the v0.6.19 minimum