Show EA's own diagram images, and EA's arrows in neighbourhoods (1.2.0) #14

Merged
moof merged 5 commits from ea-diagrams into main 2026-10-22 14:10:36 +00:00
Owner

Requested by Moof · project thread

Moof found that the Graphviz layouts of the model's diagrams fall well short of EA's, and lack details such as arrow types. This PR switches to EA's own images wherever they exist.

Changes

  • Diagram pages show EA's image from transmodel-cen.eu for all 996 diagrams that have one, with the image map's areas pointed at the local class, diagram and package pages. Graphviz now draws only the 4 diagrams whose image can't be found.
  • Neighbourhood drawings on class pages, which EA has no picture of, use EA's notation: an open arrow on each end an association can be navigated towards (from the connector's direction in the XMI, which is now kept in the model data), and a diamond on the whole of an aggregation, filled for a composition.
  • scripts/update_transmodel_model.py reads EA's image and image map for every diagram. The bundled SVGs shrink from 5.5 MB to 2.6 MB, and the model data grows from 759 KB to 912 KB with the extra image maps.
  • README, PLAN and the attribution line now describe the new behaviour. Version 1.2.0, since #13 takes 1.1.0.

Checks

  • uv run pytest: 61 passed. New assertions cover navigability arrows and the image map on the FO Stop Place MODEL diagram page.
  • A local nx build with --transmodel-pages gives a 45 MB transmodel/ section (63 MB before), and the 111,103 internal links checked have no broken targets.

This only touches the Transmodel diagram code, scripts/update_transmodel_model.py, the bundled data, two templates, the docs and the version. Rebased onto main after #13 (1.1.0) merged; 63 tests pass.

Second round (Moof's feedback)

  • EA-style neighbourhoods: class colours as gradients, «stereotype» lines, attributes grouped under «UID», Package:: prefixes for classes from other packages, +role labels, and orthogonal lines instead of curves.
  • Class pages put the text first. The neighbourhood follows Associations as a 220 px preview; a click (or Enter on its button) expands it to full size with working links, and the × button shrinks it again.
  • Diagram pages show only the image, with no caption about where it came from.
  • Package index starts with every heading collapsed, at the model's top-level parts.
  • New Work Items: their diagrams only show other diagrams, so they had no pages. Every diagram EA published now gets a page with its image (1,084 diagram pages), and their image maps link to the other diagram pages.
  • Checks: 61 tests pass, and the local nx build has 113,067 internal links with no broken targets.

Sidebar (Moof's pick from the mockups)

  • On Transmodel pages, the sidebar browses the model instead of the schema. It shows the package tree, opened at the current page, with each package's Diagrams and Concepts in separate groups. A Packages / A–Z switch (remembered between pages) shows every concept and diagram alphabetically.
  • Pictograms tell packages (folder), diagrams (linked boxes) and concepts (class box) apart.
  • The filter searches concept and diagram names and package names. It ranks exact matches first, then names that start with the query.
  • The data is one shared assets/transmodel-nav.js (117 KB), and each package's contents are built when it's first opened. A link at the top goes back to the schema's elements and types.

🤖 Generated with Claude Code

https://claude.ai/code/session_019EUw76i961mxumC6sVRdBV

<!-- claude-projects-attribution --> _Requested by **Moof** · [project thread](https://claude.ai/code/project/chan_01BmPQxcG1UuS21Gfai9Zcdh?thread=cmsg_01BmPQxcG1UuS21Gfai9ZcdhSAMdDbSmRt4P2BBhadPt1K)_ Moof found that the Graphviz layouts of the model's diagrams fall well short of EA's, and lack details such as arrow types. This PR switches to EA's own images wherever they exist. ## Changes - **Diagram pages** show EA's image from transmodel-cen.eu for all 996 diagrams that have one, with the image map's areas pointed at the local class, diagram and package pages. Graphviz now draws only the 4 diagrams whose image can't be found. - **Neighbourhood drawings** on class pages, which EA has no picture of, use EA's notation: an open arrow on each end an association can be navigated towards (from the connector's `direction` in the XMI, which is now kept in the model data), and a diamond on the whole of an aggregation, filled for a composition. - `scripts/update_transmodel_model.py` reads EA's image and image map for every diagram. The bundled SVGs shrink from 5.5 MB to 2.6 MB, and the model data grows from 759 KB to 912 KB with the extra image maps. - README, PLAN and the attribution line now describe the new behaviour. Version 1.2.0, since #13 takes 1.1.0. ## Checks - `uv run pytest`: 61 passed. New assertions cover navigability arrows and the image map on the FO Stop Place MODEL diagram page. - A local `nx` build with `--transmodel-pages` gives a 45 MB `transmodel/` section (63 MB before), and the 111,103 internal links checked have no broken targets. This only touches the Transmodel diagram code, `scripts/update_transmodel_model.py`, the bundled data, two templates, the docs and the version. Rebased onto main after #13 (1.1.0) merged; 63 tests pass. ## Second round (Moof's feedback) - **EA-style neighbourhoods**: class colours as gradients, «stereotype» lines, attributes grouped under «UID», `Package::` prefixes for classes from other packages, `+role` labels, and orthogonal lines instead of curves. - **Class pages** put the text first. The neighbourhood follows Associations as a 220 px preview; a click (or Enter on its button) expands it to full size with working links, and the × button shrinks it again. - **Diagram pages** show only the image, with no caption about where it came from. - **Package index** starts with every heading collapsed, at the model's top-level parts. - **New Work Items**: their diagrams only show other diagrams, so they had no pages. Every diagram EA published now gets a page with its image (1,084 diagram pages), and their image maps link to the other diagram pages. - Checks: 61 tests pass, and the local nx build has 113,067 internal links with no broken targets. ## Sidebar (Moof's pick from the mockups) - On Transmodel pages, the sidebar browses the model instead of the schema. It shows the package tree, opened at the current page, with each package's **Diagrams** and **Concepts** in separate groups. A **Packages / A–Z** switch (remembered between pages) shows every concept and diagram alphabetically. - Pictograms tell packages (folder), diagrams (linked boxes) and concepts (class box) apart. - The filter searches concept and diagram names and package names. It ranks exact matches first, then names that start with the query. - The data is one shared `assets/transmodel-nav.js` (117 KB), and each package's contents are built when it's first opened. A link at the top goes back to the schema's elements and types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_019EUw76i961mxumC6sVRdBV
Graphviz layouts of the model's diagrams fell well short of EA's
hand-made ones, so every diagram page now shows EA's image from
transmodel-cen.eu, with its image map pointed at the local pages.
Graphviz only draws the four diagrams whose image can't be found.

Neighbourhood drawings on class pages, which EA has no picture of, now
use EA's notation: an open arrow on each end an association can be
navigated towards (from the connector's direction in the XMI), and a
diamond on the whole of an aggregation, filled for a composition.

The bundled drawings shrink from 5.5 MB to 2.6 MB.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EUw76i961mxumC6sVRdBV
- Neighbourhoods are drawn in EA's style: class colours, stereotypes,
  «UID» attribute groups, package prefixes and orthogonal lines.
- On class pages the neighbourhood comes after the text, as a small
  preview that expands on a click.
- Diagram pages show just the image, with no caption.
- The package index starts collapsed, at the model's top-level parts.
- Every diagram EA published gets a page with its image, so the New Work
  Items overview diagrams are no longer empty.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EUw76i961mxumC6sVRdBV
Transmodel pages browse the model in their sidebar instead of the
schema's elements and types: the package tree, opened at the current
page, with each package's diagrams and concepts in separate groups, or
every concept and diagram A to Z. Pictograms tell packages, diagrams and
concepts apart, and the filter searches names and package names. The
data is one shared assets/transmodel-nav.js (117 KB).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EUw76i961mxumC6sVRdBV
The small neighbourhood drawing sits to the right of the definition, and
moves below it at full width when expanded. On narrow screens it stacks
under the text.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019EUw76i961mxumC6sVRdBV
moof force-pushed ea-diagrams from 2bd0ca9ac9 to 6d44334714 2026-10-22 14:09:55 +00:00 Compare
moof merged commit 88d120a60b into main 2026-10-22 14:10:36 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Reference4PT/prettyxsd!14
No description provided.