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

Abierto
#2,233 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Go
Estrellas
59
Forks
20
Merge medio
10 h 23 min
PR fusionados (30 d)
897

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Open-MBEE/OpenSysML

Todos los issues de Open-MBEE/OpenSysML

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.