You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An edge style stored with an empty color renders as no color at all. The equivalent defect for vertex styles was fixed in #2102; edges were left because they need a transform that does not exist yet.
Why it happens
stylingParser.ts validates every color as a bare optional string, so a styling file carrying "lineColor": "" is stored verbatim. resolveEdgeStyle (core/StateProvider/graphStyles.ts) then plain-spreads the user entry over the defaults:
A spread only skips absent keys, so "" overrides the default. Consumers read the value directly — useGraphStyles passes lineColor to cytoscape line-color and labelColor to text-background-color — and an empty string is not a color, so the edge or its label badge renders without one.
Three fields are exposed, all from EdgeVisualStyle / LabelVisualStyle:
lineColor (default #b3b3b3)
labelColor (default #17457b)
labelBorderColor (default #17457b)
Fix
Mirror what #2102 did for vertices. That fix lives in transformVertexStyles, a read-time transform wired onto user-vertex-styles — the home the read-time-transform-for-persisted-values ADR assigns to intra-key value normalization, and the point where persisted storage and file import converge.
user-edge-styles has no transform today, so this needs:
A new core/StateProvider/edgeStylesTransform.ts exporting transformEdgeStyles, dropping the three color fields when blank (use .trim() so whitespace-only counts).
Wiring in storageAtoms.ts, alongside the existing reconcile for that key.
Tests in the describe("backward compatibility: ...") form the vertex transform test uses.
Drop the field rather than substituting a default, so "no user value" stays the representation and the style keeps following the app default if it ever changes. Follow the vertex version, which names the color fields explicitly rather than cleaning all strings — for edges there is no iconUrl equivalent, but being explicit keeps the two transforms symmetrical.
Notes
Pre-existing; not introduced by #2102. Reachable through a hand-edited or third-party styling file, or storage written by an older build — the color picker in the UI cannot produce an empty value.
Important
Internal only — this issue is maintained by the core team and is not accepting external contributions.
An edge style stored with an empty color renders as no color at all. The equivalent defect for vertex styles was fixed in #2102; edges were left because they need a transform that does not exist yet.
Why it happens
stylingParser.tsvalidates every color as a bare optional string, so a styling file carrying"lineColor": ""is stored verbatim.resolveEdgeStyle(core/StateProvider/graphStyles.ts) then plain-spreads the user entry over the defaults:A spread only skips absent keys, so
""overrides the default. Consumers read the value directly —useGraphStylespasseslineColorto cytoscapeline-colorandlabelColortotext-background-color— and an empty string is not a color, so the edge or its label badge renders without one.Three fields are exposed, all from
EdgeVisualStyle/LabelVisualStyle:lineColor(default#b3b3b3)labelColor(default#17457b)labelBorderColor(default#17457b)Fix
Mirror what #2102 did for vertices. That fix lives in
transformVertexStyles, a read-time transform wired ontouser-vertex-styles— the home theread-time-transform-for-persisted-valuesADR assigns to intra-key value normalization, and the point where persisted storage and file import converge.user-edge-styleshas no transform today, so this needs:core/StateProvider/edgeStylesTransform.tsexportingtransformEdgeStyles, dropping the three color fields when blank (use.trim()so whitespace-only counts).storageAtoms.ts, alongside the existingreconcilefor that key.describe("backward compatibility: ...")form the vertex transform test uses.Drop the field rather than substituting a default, so "no user value" stays the representation and the style keeps following the app default if it ever changes. Follow the vertex version, which names the color fields explicitly rather than cleaning all strings — for edges there is no
iconUrlequivalent, but being explicit keeps the two transforms symmetrical.Notes
Pre-existing; not introduced by #2102. Reachable through a hand-edited or third-party styling file, or storage written by an older build — the color picker in the UI cannot produce an empty value.
Important
Internal only — this issue is maintained by the core team and is not accepting external contributions.