Skip to content

fix(photo-annotator): drop callout, unify line/arrow/measurement#1529

Merged
steilerDev merged 2 commits into
betafrom
fix/photo-annotator-line-family-unification
May 19, 2026
Merged

fix(photo-annotator): drop callout, unify line/arrow/measurement#1529
steilerDev merged 2 commits into
betafrom
fix/photo-annotator-line-family-unification

Conversation

@steilerDev
Copy link
Copy Markdown
Owner

Summary

Comprehensive refactor removing the problematic Callout tool and unifying line, arrow, and measurement as shared line-segment primitives with varying end-cap rendering.

  • Callout removal: Clean deletion of CalloutShape type, 'callout' ToolName, UI button, and rendering (no persistent storage concerns)
  • Measurement arrow rendering: Changed from perpendicular ticks to dual-tip arrowheads (Arrow with pointerAtBeginning + pointerAtEnding)
  • Arrow fill fix: Set fill={stroke} so arrowhead tips render solid at all stroke widths
  • Measurement input placement: Fixed to open at true midpoint, with perpendicular label offset tuned for clarity
  • Canvas bake: Measurement measurement now renders with dual arrowheads and perpendicular label (works on any axis, not just horizontal)

Test Plan

  • QA updates: ToolPalette.test.tsx and PhotoAnnotator.test.tsx have 5+ callout-specific tests that must be deleted
  • Type check: npm run typecheck validates all type removals
  • Manual review: Verify measurement draft preview shows dual tips, inline input appears at center of line, and label sits off the line on the perpendicular side
  • Canvas bake validation: Verify measurement on WebP output renders dual arrowheads and perpendicular label without overlap

🤖 Generated with Claude Code

Frank Steiler and others added 2 commits May 19, 2026 23:38
…itives

Changes:
- Remove CalloutShape entirely from useUndoStack, useAnnotator type unions
- Remove 'callout' from ToolName type union
- Delete callout button and CalloutIcon from ToolPalette
- Delete callout rendering branch from renderKonvaShape
- Delete callout branches from PhotoAnnotator text input, commitment, and keyboard handlers
- Remove callout entries from all i18n files (en, de)

Line/Arrow/Measurement unification:
- Measurement now renders as Arrow with pointerAtBeginning + pointerAtEnding for tick marks
- Arrow fill fix: use fill={stroke} instead of fill="none" to show solid arrowheads at small widths
- Arrow draft preview: add pointerLength/pointerWidth proportional to strokeWidth
- Measurement draft preview: render as Arrow with dual tips like committed shape
- Measurement inline input positioning: fixed to open at midpoint (not startX/startY)
- Measurement inline input label offset: now uses perpendicular offset (+labelOffsetX/Y)
- Measurement committed label: perpendicular offset fixed to work on any axis (not just horizontal)
- Canvas renderer measurement: draw dual arrowheads at both ends instead of perpendicular ticks

Test updates required:
- ToolPalette.test.tsx: 5 tests reference 'callout', need deletion by QA
- PhotoAnnotator.test.tsx: several tests reference callout tool, need deletion by QA

Co-Authored-By: Claude frontend-developer (claude-haiku-4-5) <noreply@anthropic.com>
Callout tool was removed from production code in PR #1529. This removes
all callout-specific tests from ToolPalette.test.tsx and
PhotoAnnotator.test.tsx, and replaces 'callout' selectedTool usages in
font-size tests with 'text'.

Co-Authored-By: Claude <qa-integration-tester> (claude-haiku-4-5) <noreply@anthropic.com>
@steilerDev steilerDev merged commit 032e65f into beta May 19, 2026
30 of 32 checks passed
@steilerDev steilerDev deleted the fix/photo-annotator-line-family-unification branch May 19, 2026 22:11
@github-actions
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 2.6.0-beta.64 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

steilerDev pushed a commit that referenced this pull request May 19, 2026
PR #1529 dropped the Callout tool but the E2E test suite still asserted
"all 10 tools visible" and referenced viewer.calloutToolButton. With
fail-fast on the E2E shards, this single failure cancelled all 16 shards.

- Update Scenario 1 (smoke) to assert 9 tool buttons.
- Update Scenario 22 to assert 9 tool buttons and drop callout from the
  iteration list.
- Delete the test.fixme placeholder for Scenario 12 (Callout tool).
- Remove calloutToolButton, drawCallout helper, and the 'callout' member
  of AnnotatorToolName from the page object.

Co-Authored-By: Claude <e2e-test-engineer> (claude-haiku-4-5) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant