Skip to content

Apply the Inherited toggle to expanded boxes in the diagram - #13

Merged
MathiasVDA merged 1 commit into
mainfrom
fix/inherited-toggle-expanded-boxes
Nov 18, 2026
Merged

MathiasVDA merged 1 commit into
mainfrom
fix/inherited-toggle-expanded-boxes

Conversation

@MathiasVDA

@MathiasVDA MathiasVDA commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The Inherited toggle in the diagram panel only applied to the focused type. Expanded boxes (x= in the URL) list their attributes too, but always showed only their own declarations. For example, with RTM_LinearAnchorPoint focused and RTM_LinearPositioningSystem expanded in railML 3.4-RC, the positioning system's box did not show @id, which it inherits from RTM_NamedResource.

Change

web/src/graph.ts, buildNeighborhood:

  • addType passes inherited: o.inherited && (focus || o.expanded.has(id)) to typeNode, so expanded boxes list inherited rows.
  • walk uses the same rule for inh, so inherited complex child elements (arrows) and enumerated attribute types are drawn around expanded boxes as well, consistent with their rows.

The toggle's tooltip in views/diagramPanel.ts now says it covers expanded types.

Collapsed neighbour boxes are unchanged: they still show only the name.


Generated by Claude Code

The Inherited toggle only listed inherited attributes and child elements
in the focused type's box. Expanded boxes, which also list their rows,
kept showing only their own declarations, so an inherited attribute such
as @id from a base type was invisible there.

The toggle now applies to the focused box and every expanded box, both
for the rows in the box and for the inherited child elements and
enumerations drawn around it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECW7omsQVpMFUZecXai17r
@MathiasVDA MathiasVDA self-assigned this Nov 18, 2026
@MathiasVDA
MathiasVDA merged commit 3f0b18c into main Nov 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant