Feature request: bus / vector wires — render one edge for a contiguous port slice
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
- 领域
- frontend
调研方向
首先跟踪 PathView 前端中现有的边渲染、端口句柄拖动行为以及多边处理。定义连续切片、标签、折叠/展开交互和组拖动应如何适配当前视图模型,同时不改变 .pvm 图、Connection 对象或导出的 Python。完成的标准是:总线边仍然仅用于查看,可以展开并重新折叠,并保留现有的图输出。
由索引模型根据 Issue 内容生成。
描述
Description
Allow a set of edges connecting a contiguous port slice between two blocks to be rendered and
manipulated as a single bus edge:
- Collapsed by default when a drag connects a slice, or when N parallel edges between the same
block pair are detected — drawn as one thicker line, labelled with the slice (e.g.species[0:10]
or a user-supplied name likeexhaust). - Expandable on demand — click to fan out into the individual edges for inspection or to rewire
one channel, then re-collapse. - Purely a view concern. The underlying
.pvmgraph, theConnectionobjects, and the exported
Python would be unchanged — a bus is a grouping annotation over existing edges, not a new
connection type. That keepspathview convertoutput identical and means no PathSim-side change
is needed.
Two smaller things that would compose well with it, though they're separable:
- Drag from a port group (shift-drag, or drag from a block edge rather than a handle) to create the
whole slice in one gesture, instead of ten drags. - A bus label on the edge — this overlaps with #8 (Add labels/annotations to Edges), so the two may
want to share an implementation.
Problem
PathSim handles multi-variable signals well via port slices — Connection(a[0:10], b[0:10]) is
concise in Python and works exactly as you'd want. In PathView the same connection is 10 separate
edges, because each port is an individual handle.
For anything with a chemical or multi-species signal this scales badly. We're building a fusion
fuel-cycle and balance-of-plant block library on PathSim, where every stream carries a molar-flow vector over a species basis, typically 10 species (H2, HD, HT, D2, DT, T2, He3, He4, N2, NT3), and users can extend the basis at runtime.
A ~25-block fuel cycle therefore draws roughly 250 edges for what a person reading the diagram
thinks of as ~25 pipes.
The Python model is fine. It's the diagram that stops being readable, which is a shame because the
diagram is the reason to use PathView at all.
This isn't fusion-specific — it applies to any chemistry, thermofluid, or power-system model where a
"signal" is naturally a vector.
Alternatives Considered
No response
Additional Context
No response
- 主要语言
- TypeScript
- 星标
- 91
- 派生
- 14
- 平均合并
- 4 分钟
- 30 天内合并 PR
- 7
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pathsim/pathview 的其他 Issue
-
enhancement
难度 4/5 3-5 天 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 42/100
-
backend enhancement frontend functionality
难度 5/5 一周以上 新手友好度 25/100
-
backend frontend functionality
难度 5/5 一周以上 新手友好度 20/100
-
Scale for scope 未关闭backend frontend functionality
难度 3/5 1-2 天 新手友好度 35/100
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100