aws / aws/graph-explorer

Derive edge arrow-style icons from cytoscape arrow geometry

Open
#1,985 0 comments 0 reactions 0 assignees View on GitHub
internal tech debt
Dominant language
TypeScript
Stars
481
Forks
108
Avg merge
6d 8h
Merged PRs (30d)
5

Description

## 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.

Contributor guide

Open the contributing guide

Research direction

Start with EdgePreview/arrowShapes.ts and trace resolveArrowGeometry and the existing preview renderer. Then inspect arrowsStyling/EdgeStyleDialog and EdgeDetail to identify the picker and detail-panel integrations; done means both use ArrowStyleIcon, the shared ArrowPrimitiveShape is used by the preview and icon, and the 11 old Arrow* files and barrel exports are removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.