]> Repositorios git - classgraph.git/commit
Family node labels show tyvars, with (data) on its own italic line
authorJavier Sagredo <[email protected]>
Thu, 7 May 2026 00:22:15 +0000 (02:22 +0200)
committerJavier Sagredo <[email protected]>
Thu, 7 May 2026 00:22:15 +0000 (02:22 +0200)
commitee1ad15ad3bc96a130275c299c576beded9d4706
treeed6954b0e96b6dc65bc1054477fe58a6168d0e2a
parente174401caa10fe2a06534e5b0a9b54237c7f8d76
Family node labels show tyvars, with (data) on its own italic line

Family nodes now carry their tyvars in the label (e.g. @BftDSIGN c@,
@LedgerState blk mk@), matching the recent class-node tyvar change.
For data families, @(data)@ goes on a new line via @\n@ in the
label and the cytoscape stylesheet italicises the whole node label
via @node[kind = "family"][?isData]@.

Cytoscape can't style only one line of a label, so the family name
itself ends up italicised too. That's a deliberate trade-off — the
italic doubles as a "this is a data family, not a type family" cue
without requiring any additional iconography.

Render.hs's familyNodeLabel and viewer.js's ensureFamilyNode +
focused-family-node code path all updated together so the
classes-view, instance-view and family-view family nodes all read
the same way.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
data/viewer.js
src/Classgraph/Render.hs