Derive edge arrow icons from cytoscape arrow geometry#1983
Draft
kmcginnes wants to merge 1 commit into
Draft
Conversation
kmcginnes
force-pushed
the
derive-arrow-icons
branch
2 times, most recently
from
July 24, 2026 17:14
6bc0a0e to
8fc7405
Compare
The 11 hand-drawn Arrow* icons duplicated the arrow-head geometry that arrowShapes.ts already ports verbatim from cytoscape. Replace them with a single ArrowStyleIcon that renders the resolved geometry for any ArrowStyle, so the picker and edge details always match what the canvas draws. - Add ArrowStyleIcon: a short edge line ending in the arrow head, with a shared viewBox so line thickness and zoom are constant and head trailing edges align across styles; line length varies with head depth. - Extract ArrowPrimitiveShape from EdgePreview as the shared primitive renderer for both the preview and the icon. - Rewire the arrow-style picker and EdgeDetail to ArrowStyleIcon; delete the 11 Arrow* icon files and their barrel exports.
kmcginnes
force-pushed
the
derive-arrow-icons
branch
from
July 24, 2026 20:58
8fc7405 to
7bfaa02
Compare
5 tasks
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.
Description
The 11 hand-drawn
Arrow*SVG icons (ArrowTriangle,ArrowVee,ArrowCircle,ArrowDiamond,ArrowSquare,ArrowTee,ArrowNone,ArrowTriangleTee,ArrowTriangleCross,ArrowTriangleCircle,ArrowTriangleBackCurve) were a second, hand-maintained copy of geometry thatarrowShapes.tsalready derives (a verbatim port of cytoscape's arrow shapes). Replaced all 11 with a singleArrowStyleIconthat renders the resolved geometry for anyArrowStyle, so the picker glyphs are guaranteed to match the canvas. The 11 icon files and their barrel exports are deleted.Supporting:
ArrowPrimitiveShape(the polygon/path/circle primitive renderer) is extracted fromEdgePreviewso it can be shared withArrowStyleIcon.How to read
resolveArrowGeometryArrowStylevaluescomponents/icons/Arrow*.tsx— the 11 hand-drawn glyphsArrowStyleIconreplacesValidation
pnpm checkspasses (types, lint, format);pnpm testpassesArrowStyleIcon.test.tsx— shared viewBox, shaft, per-style head counts, tip-shift mathRelated Issues
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures.