Skip to content

feat(editor): show contour direction and first point in the object tree - #485

Merged
kostyafarber merged 2 commits into
mainfrom
feat/object-tree-contour-direction
Oct 2, 2026
Merged

kostyafarber merged 2 commits into
mainfrom
feat/object-tree-contour-direction

Conversation

@kostyafarber

Copy link
Copy Markdown
Collaborator

Summary

  • Closed contours in the Objects tree show their winding direction (Lucide rotate icons). The icon appears on hover and stays visible while the contour is selected. Clicking it reverses that contour as one undoable step without changing the selection; the canvas "Reverse Contour" command now uses the same reverseContours helper.
  • The first point of each contour has its own triangle icon.
  • Selecting a contour highlights its point rows as one block, matching how a selected category covers its subcategories in the glyph catalog, and draws its point handles as selected on the canvas. The selection still holds only the contour id, so contour commands (reverse, boolean ops, dragging the whole contour) are unchanged.
  • The tree no longer shows the browser focus outline when a key such as Shift is pressed after a click. The focused row gets a ring only during arrow/Home/End navigation.

Issue

Closes #484

Testing

  • pnpm check (typecheck, lint, all unit tests)
  • New unit tests: contour direction for clockwise, counter-clockwise and open contours, plus the first-point icon (createObjectTree.test.ts); a selected contour draws all its handles as selected (GlyphHandleStates.test.ts, confirmed failing without the change)
  • Manual check in the app: hover/selected visibility, reversing without selection change, dragging a contour selected from the tree, the triangle's weight next to the point icons
  • E2E not run locally. editor.spec.ts "selects displayed glyph objects from the Objects tab" has goldens (objects-sidebar.png, objects-sidebar-selection.png) that should change because of the first-point icon. They need regenerating and inspecting on CI.

Follow-up

  • Screenshots of the hover, selected and covered-row states still need attaching before review.

Closed contours show their winding on hover (kept visible while
selected) and reverse in place without changing the selection. The
first point gets its own icon. A selected contour now highlights its
point rows and draws its handles as selected, while selection still
holds only the contour id so contour commands keep working. The tree's
focus ring only appears during keyboard navigation.
@kostyafarber
kostyafarber marked this pull request as ready for review October 2, 2026 06:57
@kostyafarber kostyafarber added ci: update visual snapshots Regenerate visual snapshots on a same-repository pull request release: nightly Run a Nightly build after this pull request merges labels Oct 2, 2026
@kostyafarber
kostyafarber added this pull request to the merge queue Oct 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Oct 2, 2026
@kostyafarber
kostyafarber added this pull request to the merge queue Oct 2, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 2, 2026
@kostyafarber
kostyafarber added this pull request to the merge queue Oct 2, 2026
Merged via the queue into main with commit d641450 Oct 2, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci: update visual snapshots Regenerate visual snapshots on a same-repository pull request release: nightly Run a Nightly build after this pull request merges

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show contour direction and first point in the Objects sidebar

1 participant