feat(metadata-admin): polymorphic reference pickers + edge property panel#1424
Merged
hotlong merged 1 commit intoMay 31, 2026
Merged
Conversation
…anel Two flow-designer enhancements, both building on the server-driven node config form (#1423). 1. Polymorphic reference pickers (Tier-2) - Reference field kind now resolves its concrete picker at render time from a sibling field/column value (`xRef.kindFrom` + `map`) in addition to a static `xRef.kind`. Reference kinds extended to object / object-field / flow / role / node / user / team / queue / department / connector / email-template. - `ReferenceCombobox` is factored out of `FlowReferenceField` and reused per-row inside the `objectList` repeater, so an approver's `value` cell follows its row's `type` (user/role/team/department picker, or an object-field picker for `field`). Empty catalogs degrade to free text via a native <datalist>, so authors are never trapped. - Adapter (`json-schema-to-fields`) maps both static and polymorphic `xRef` onto reference fields/columns, validating each kind so an unknown kind degrades to plain text. Tests cover static-kind, polymorphic, and all-unknown-map cases (12/12). 2. Edge property panel - Connection edges are now selectable on the canvas: a transparent wide hit-path over each edge (and its branch-label pill) emits an `{ kind: 'edge' }` selection; the selected edge highlights in primary. - A new `FlowEdgeInspector` edits the edge's routing semantics — branch label, condition (CEL), and the default ("else") branch toggle (which clears + disables label/condition) — with source/target shown read-only. - The single `flow` inspector becomes a thin `FlowInspector` router that forwards node vs. edge selections to the right scoped editor. - Stable `edgeKey(edge, i)` (id, else `source->target#index`) keys selection, traversal highlighting, and inspector lookup off one helper. - i18n keys added for en + zh.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
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.
Summary
Two flow-designer enhancements in
metadata-admin, both building on the server-driven node config form (#1423).1. Polymorphic reference pickers (Tier-2)
referencefield kind now resolves its concrete picker at render time from a sibling field/column value (xRef.kindFrom+map), in addition to a staticxRef.kind. Reference kinds extended toobject / object-field / flow / role / node / user / team / queue / department / connector / email-template.ReferenceComboboxis factored out ofFlowReferenceFieldand reused per-row inside theobjectListrepeater, so an approver'svaluecell follows its row'stype(user/role/team/department picker, or an object-field picker forfield). Empty catalogs degrade to free text via a native<datalist>— authors are never trapped.json-schema-to-fields) maps both static and polymorphicxRefonto reference fields/columns, validating each kind so an unknown kind degrades to plain text.2. Edge property panel
{ kind: 'edge' }selection; the selected edge highlights in primary.FlowEdgeInspectoredits the edge's routing semantics — branch label, condition (CEL), and the default ("else") branch toggle (which clears + disables label/condition) — with source/target shown read-only.flowinspector becomes a thinFlowInspectorrouter that forwards node vs. edge selections to the right scoped editor.edgeKey(edge, i)(id, elsesource->target#index) keys selection, traversal highlighting, and inspector lookup off one helper.en+zh.Test plan
tsc --noEmitclean for@object-ui/app-shell.json-schema-to-fields.test.ts— 12/12 (adds static-kind, polymorphic, and all-unknown-map cases).opportunity_won_notification): clicking an edge opens the panel; editing the branch label round-trips to the draft and renders the pill; the default-branch toggle disables/clears label+condition and shows theelsepill; selected edge highlights.