Repository navigation
Apply the Inherited toggle to expanded boxes in the diagram - #13
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, withRTM_LinearAnchorPointfocused andRTM_LinearPositioningSystemexpanded in railML 3.4-RC, the positioning system's box did not show@id, which it inherits fromRTM_NamedResource.Change
web/src/graph.ts,buildNeighborhood:addTypepassesinherited: o.inherited && (focus || o.expanded.has(id))totypeNode, so expanded boxes list inherited rows.walkuses the same rule forinh, 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.tsnow says it covers expanded types.Collapsed neighbour boxes are unchanged: they still show only the name.
Generated by Claude Code