Skip to content

Derive edge arrow-style icons from cytoscape arrow geometry #1985

Description

@kmcginnes

Task

The edge arrow-style picker and the edge details panel each had their own set of 11 hand-drawn Arrow* SVG icons (ArrowTriangle, ArrowVee, ArrowCircle, …). These duplicated the arrow-head geometry that EdgePreview/arrowShapes.ts already ports verbatim from cytoscape, so the picker glyphs could drift from what the canvas actually renders.

Replace the 11 icons with a single ArrowStyleIcon that renders the resolved cytoscape geometry for any ArrowStyle, so the picker, edge details, and canvas all draw from one source of truth.

Scope

  • Add ArrowStyleIcon (short edge line + arrow head) drawn from resolveArrowGeometry, with a shared viewBox so line thickness/zoom are constant and head trailing edges align across styles; line length varies with head depth.
  • Extract ArrowPrimitiveShape as the shared primitive renderer for both the edge preview and the icon.
  • Rewire the arrow-style picker (arrowsStyling/EdgeStyleDialog) and EdgeDetail to ArrowStyleIcon.
  • Delete the 11 Arrow* icon files and their barrel exports.

Notes

Implemented on branch derive-arrow-icons.

Important

Internal only — this issue is maintained by the core team and is not accepting external contributions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    internalSignals that the team will work on this issue internally.tech debtIssues, typically tasks, that are mainly about cleaning up code that is problematic in some way

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions