Editor's Path Properties has 'Path length' but no 'Path bounding box position' (where it is in the hoop) — user with a path at (50, 50) wanting to know 'is this in the hoop?' has to compute from the nodes #365

Closed
opened 2026-10-04 03:58:09 +00:00 by Mark · 1 comment
Owner

Finding

grep -rn 'pathPosition\|pathTopLeft' src/components/editor/EditorRightPanel.tsx returns 0. The right panel shows the path's length but not its position in the hoop.

A user with a path:

  • Wants to know "is this path in the 4x4 hoop?"
  • Has to check the bounding box manually
  • Or export and see the error

The fix is to show the path's top-left position in the Path Properties section.

Where

  • Path Properties: src/components/editor/EditorRightPanel.tsx
  • No position: grep -rn 'pathPosition' src/components/editor/ returns 0
  • The bounding box: per pathBoundingBox in geometry.ts

Suggested fix shape

  1. UI: in the Path Properties section, add "Position" displays:
<div className="text-[11px]">
  Top-left: ({bbox.x.toFixed(2)}, {bbox.y.toFixed(2)}) mm
</div>
<div className="text-[11px]">
  Bottom-right: ({(bbox.x + bbox.width).toFixed(2)}, {(bbox.y + bbox.height).toFixed(2)}) mm
</div>
  1. Hoop check: highlight in red if outside the hoop:
{isOutsideHoop(bbox, hoopSize) && (
  <p className="text-[10px]" style={{ color: '#DC2626' }}>
    ⚠ Path extends beyond the {hoopSize} hoop
  </p>
)}
  1. Use cases:
  • The user wants to know "is this in the hoop?"
  • The user is positioning a path

Severity

Low. The user can compute. Power users notice.

Discovered by

Gap analysis (2026-10-02) of editor path properties.

  • #260 (open) — Hoop size mismatch. The whole-design version; this is the per-path.
  • #353 (open) — Position input. The input; this is the display.
  • #356 (open) — Bounding box dimensions. The width/height; this is the position.
## Finding `grep -rn 'pathPosition\|pathTopLeft' src/components/editor/EditorRightPanel.tsx` returns 0. The right panel shows the path's length but not its position in the hoop. A user with a path: - Wants to know "is this path in the 4x4 hoop?" - Has to check the bounding box manually - Or export and see the error The fix is to show the path's top-left position in the Path Properties section. ## Where - Path Properties: `src/components/editor/EditorRightPanel.tsx` - No position: `grep -rn 'pathPosition' src/components/editor/` returns 0 - The bounding box: per `pathBoundingBox` in geometry.ts ## Suggested fix shape 1. **UI**: in the Path Properties section, add "Position" displays: ```tsx <div className="text-[11px]"> Top-left: ({bbox.x.toFixed(2)}, {bbox.y.toFixed(2)}) mm </div> <div className="text-[11px]"> Bottom-right: ({(bbox.x + bbox.width).toFixed(2)}, {(bbox.y + bbox.height).toFixed(2)}) mm </div> ``` 2. **Hoop check**: highlight in red if outside the hoop: ```tsx {isOutsideHoop(bbox, hoopSize) && ( <p className="text-[10px]" style={{ color: '#DC2626' }}> ⚠ Path extends beyond the {hoopSize} hoop </p> )} ``` 3. **Use cases**: - The user wants to know "is this in the hoop?" - The user is positioning a path ## Severity Low. The user can compute. Power users notice. ## Discovered by Gap analysis (2026-10-02) of editor path properties. ## Related - #260 (open) — Hoop size mismatch. The whole-design version; this is the per-path. - #353 (open) — Position input. The input; this is the display. - #356 (open) — Bounding box dimensions. The width/height; this is the position.
Author
Owner

Closing as duplicate of #356 (commit 547222c on origin/main).

#365 asked for a "path bounding box position" (Top-left x,y in mm) row in Path Properties. That display shipped on main via #356 — see data-testid="path-statistics-bbox-position" in src/components/editor/EditorRightPanel.tsx around line 3205, which renders the Top-left corner of the per-path bounding box as (x.toFixed(2), y.toFixed(2)) mm.

Related asks referenced in the body are also resolved on main:

  • #353 -> precise X/Y position INPUT in Path Properties Transform (commit d99fe73).
  • #260 -> design-wide "N paths extend beyond the hoop" alert (editor-hoop-overflow-badge in EditorCanvas.tsx).
  • #356 -> per-path Bounding box (width x height) + Top-left (position) rows in Path Statistics (commit 547222c).

Just landed: docs-only tie-in comment annotating the Top-left row as the canonical home for this ask (commit 74b1a55). No new behavior.

Closing as duplicate of #356 (commit 547222c on origin/main). #365 asked for a "path bounding box position" (Top-left x,y in mm) row in Path Properties. That display shipped on main via #356 — see `data-testid="path-statistics-bbox-position"` in src/components/editor/EditorRightPanel.tsx around line 3205, which renders the Top-left corner of the per-path bounding box as `(x.toFixed(2), y.toFixed(2)) mm`. Related asks referenced in the body are also resolved on main: - #353 -> precise X/Y position INPUT in Path Properties Transform (commit d99fe73). - #260 -> design-wide "N paths extend beyond the hoop" alert (`editor-hoop-overflow-badge` in EditorCanvas.tsx). - #356 -> per-path Bounding box (width x height) + Top-left (position) rows in Path Statistics (commit 547222c). Just landed: docs-only tie-in comment annotating the Top-left row as the canonical home for this ask (commit 74b1a55). No new behavior.
Mark closed this issue 2026-10-05 14:20:42 +00:00
Sign in to join this conversation.
No description provided.