Interconnection views: allow a layout direction and ranking by metadata in Mermaid output

未关闭
#2,233 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
go

调研方向

The issue names the Mermaid output path for interconnection views (-render-form mermaid), which always writes flowchart LR, and the DOT rankdir setting. Before coding, ask the maintainers whether direction should be a CLI flag or read from view metadata, since the issue offers both. Done means a view can set the layout direction and order sibling parts by a named metadata attribute, with the output matching the reporter's test model.

由索引模型根据 Issue 内容生成。

描述

enhancement

When rendering an interconnection view with -render-form mermaid, OpenSysML 0.12.1 always writes flowchart LR, so nested parts are laid out left to right. We model a layered platform architecture where each layer is a part, and the convention for our diagrams is that layer 1 sits at the top and the last layer at the bottom. At the moment there is no way to get that from a declared view.

Two features would let us generate these diagrams directly from the model:

A layout direction for a view. For example, a render option such as -render-direction TB|LR|BT|RL, or a view-level setting read from metadata, which sets the Mermaid flowchart direction for interconnection views (and DOT rankdir for the DOT form).
Ranking by a metadata attribute. An option that orders sibling parts by the value of a named metadata attribute (for us, a layer position), so that the order on the page follows the model and not the declaration order. In Mermaid this can be done with invisible links between consecutive ranks, which we have tested with Pele 1.13.0, the Mermaid renderer Obsidian uses: it keeps the order top to bottom.
Environment: OpenSysML 0.12.1 (commit b2f0e9b), macOS, rendering for Obsidian (Mermaid) and D2.

We are happy to provide a small test model that shows the case.

主要语言
Go
星标
59
派生
20
平均合并
10 小时 23 分钟
30 天内合并 PR
897

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Open-MBEE/OpenSysML 的其他 Issue

查看 Open-MBEE/OpenSysML 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。